14632 Commits

Author SHA1 Message Date
Min Chen
e017dc2c00 commit ba3fef5d0650c42463d0f225f4ca14b5f9046c44
Author: Min Chen <min.chen@citrix.com>
Date:   Mon Dec 17 17:42:30 2012 -0800

    Remove IdentityProxy from AlertResponse and AsyncJobResponse.

Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-17 17:44:39 -08:00
Min Chen
348d3ae448 Conflicts:
api/src/org/apache/cloudstack/api/response/AccountResponse.java

Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-17 15:41:56 -08:00
Rohit Yadav
de8aa86542 api: Work in progress code in ApiDispatcher to process annotations
- All id params are now uuids, basically for documentation
- Use injections and not component locator
- Remove resourceType field checking, it's now called entityType
- Fix indents

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-17 10:00:27 -08:00
Likitha Shetty
cba97b1742 api_refactoring: add parameter annotation for user 'security-group'
- Add the entityType to the parameter annotation
- Annotate SecurityGroupRules response

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-17 09:57:04 -08:00
Rohit Yadav
f8a483fc5a api: Include cloudstack-version in both xml and json api response
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-16 21:37:03 -08:00
Rohit Yadav
59fc89abe3 api: Fix ApiServer role base acl logic and response type value
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-16 18:13:29 -08:00
Rohit Yadav
429b430721 api: Fix DeployVMCmd to use only entityType and not resourceType
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-16 18:12:01 -08:00
Rohit Yadav
6db279583e api: Remove resourceType, use only entityType
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-16 18:09:33 -08:00
Rohit Yadav
cc4030be41 api: Add UUID type to CommandType in BaseCmd
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-16 18:08:49 -08:00
Fang Wang
efa034e821 API-refactoring -- Add pod annotation, needed for the deployVM flow test.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-14 13:52:21 -08:00
Fang Wang
a2a3ef63c2 API refactoring -- add annotation for cluster group cmds and response.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-14 13:50:39 -08:00
Fang Wang
7ea690c74d API refactoring -- add annotation for Account group and account response.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-14 13:49:38 -08:00
Fang Wang
27482045ce API refactoring -- More parameter for counter group. 2012-12-14 11:52:08 -08:00
Fang Wang
44ef998cfc api: Add Validator interface that will be used for the @Validator annotation
The @Validator (defined as @validate in wiki/FS) will do the following things:
- DBEntityValidator (verifies if the entity exists in the db or not)
- RangeValidator (min, max; limits)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-14 11:42:49 -08:00
Min Chen
c167ad45e3 Move view based VO and Dao classes to cloud-server module to hide the
details from API client, also extract query related methods into
QueryService interface.
2012-12-14 10:47:58 -08:00
Rohit Yadav
88b7af18e6 api: Revert "Move all the DB view DAOs from cloud-server to cloud-api for future api-server package."
Reverting commit as we don't want the daos to move to cloud-api.
We'll eventually breakout cloud-server and create cloud-api-server for the standalone
api server.

This reverts commit 7597a38f7a255e49b73c833918f30b51504e0c53.
2012-12-13 09:42:28 -08:00
Min Chen
7597a38f7a Move all the DB view DAOs from cloud-server to cloud-api for future api-server package.
BUG-ID: CLOUDSTACK-527

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-13 09:28:42 -08:00
Rohit Yadav
7dbdf786cc api: FIXME for api access checker adapter
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-12 14:21:38 -08:00
Min Chen
472f4f91b9 Refactor ListProjectInvitationsCmd and ProjectInvitationResponse. 2012-12-12 09:04:43 -08:00
Min Chen
3661f7f992 Fix several bugs of new refactored list apis. 2012-12-11 17:37:16 -08:00
Min Chen
9c93fee0dc Refactor ListProjectAccountCmd and ProjectAccountResponse. 2012-12-11 15:49:15 -08:00
Rohit Yadav
c455cf9271 api: refactor common code to get classname for an api in ApiServer
- Refactor common code to get classname from apiname
- Fix search mechanism within api access checker adapter to:
  * check permissions
  * get class name for an apiname

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-11 14:17:47 -08:00
Rohit Yadav
79b54e6ac1 api: Fix obj injections in ApiServer
- Inject classes using Inject annotation
- Don't misuse component locator

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-11 14:16:25 -08:00
Rohit Yadav
6ce68b93cc api: Fix APIAccessChecker and StaticRoleBasedAPIAccessChecker
- Add getCmd api interface in APIAccessChecker adapter to get cmd properties
- Add mechanism in StaticRoleBasedAPIAccessChecker to get config properties
- Add public interface to get the cmd properties for the adapter impl

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-11 14:10:36 -08:00
Rohit Yadav
f4892fbb84 api: remove those evil extra newlines
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-11 13:38:32 -08:00
Min Chen
8735716ba0 Refactor ListProjectsCmd and ProjectResponse. 2012-12-11 12:51:08 -08:00
Min Chen
c83323fea7 api: Refactoring ListUsersCmd and UserResponse.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 17:45:40 -08:00
Rohit Yadav
8c4096dc59 api: Have apiserver injected by component locator
- Instantiate apiserver by injection, so all its entities are also created and injected
- Make the constructor protected

Thanks to Alex for helping out on this one.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 17:38:44 -08:00
Rohit Yadav
2146687112 api: initialize vars in constructor of StaticRoleBasedAPIAccessChecker
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 17:28:06 -08:00
Rohit Yadav
503082a49e api: Add ACL adapter for components.xml
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 17:27:11 -08:00
Rohit Yadav
151a7643ce api: Don't silently fail apiserver instance initialization
- ApiServer instance assumes cloudstartup servlet will initialize it
- Check and log if initialization fails

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 16:27:33 -08:00
Rohit Yadav
8fbbc76466 api: minor fixes in ApiServlet
- Reusing local variable for string splitting/processing
- Fix comments
- Fix indentations

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 16:19:40 -08:00
Rohit Yadav
c8923c9625 api: Fix license header for acl/Role.java
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 16:18:35 -08:00
Rohit Yadav
293665fafb api: Add license headers for APIAccessChecker and StaticRoleBasedAPIAccessChecker
- Fix license headers
- Fix tabs, trailing whitespaces

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 15:29:33 -08:00
Min Chen
1cf8b86ce5 api: Load InstanceGroupJoinDao to component Library
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 15:17:07 -08:00
Min Chen
bba96254f5 Refactoring ListVMGroupsCmd and InstanceGroupResponse. 2012-12-10 13:59:20 -08:00
Rohit Yadav
98033905e4 api: Add missing license header to BaseViewVO
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-10 11:34:10 -08:00
Min Chen
9a3632d807 Create Base view VO object to remove some code duplication. 2012-12-10 11:30:28 -08:00
Rohit Yadav
e398b1e47a api: Refactor command and response classes to org.apache.cloudstack.api.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 19:23:24 -08:00
Fang Wang
ad50d226cd api: Refactoring, add the parameter annotation for user VM.
- Fix some errors in the previous deployVMCmd.

	modified:   api/src/org/apache/cloudstack/api/user/vm/command/DeployVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/DestroyVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/GetVMPasswordCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/ListVMsCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/RebootVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/ResetVMPasswordCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/RestoreVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/StartVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/StopVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/UpdateVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vm/command/UpgradeVMCmd.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:33:07 -08:00
Rohit Yadav
af28c06998 api: move and group all under command, org.apache.cloudstack.command.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:30:54 -08:00
Fang Wang
fa7527b77e API_refactoring Add parameter annotation to the admin virtual machine group.
modified:   api/src/org/apache/cloudstack/api/admin/vm/command/AssignVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/admin/vm/command/MigrateVMCmd.java
	modified:   api/src/org/apache/cloudstack/api/admin/vm/command/RecoverVMCmd.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 17:08:33 -08:00
Min Chen
30941c2d31 api: Refactoring ListEventsCmd and EventResponse, and create Event db view.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 16:54:45 -08:00
Rohit Yadav
41268d1237 api: Fix test failure in cloud-server
Added newly added dao class as part of list api optimizations to be picked up
by the locator.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 15:06:51 -08:00
Min Chen
acf7afd7f5 api: Refactor ResourceTagResponse and ListTagsCmd, add db view for ResourceTag.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 09:57:52 -08:00
Min Chen
2bbd023eb6 api: Add SecurityGroup DB view creation into db create_schema and fix a bug in ListSecurityGroupsCmd
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 09:45:16 -08:00
Rohit Yadav
947ac982bc api: fix apidocs build bug
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 17:38:12 -08:00
Fang Wang
a6c02e1483 api_refactoring: VMgroup parameter annotation.
modified:   api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java
	modified:   api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 16:09:43 -08:00
Min Chen
8a313d7f84 api: SecurityGroupResponse and SecurityGroupRuleResponse refactoring
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 16:04:48 -08:00
Min Chen
eba353099e api_refactoring: Fix build issue with api_refactoring branch.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 15:00:48 -08:00