Min Chen
fc56e29a3e
Guard null pointer exceptions.
2012-12-18 22:26:38 -08:00
Rohit Yadav
7b6132e8e2
api: Skip empty uuid processing in ApiDispatcher for received params
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-18 18:16:18 -08:00
Rohit Yadav
a9df2cb0f5
api: Fix NullPointerException for listProjects in ProjectJoinDaoImpl
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-18 17:44:18 -08:00
Rohit Yadav
434258080f
api: Fix NullPointerException in ApiResponseHelper for DomainResponse
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-18 17:44:17 -08:00
Rohit Yadav
22ee4200c3
api: Fix findByXId to findByUuid in EntityManager and ApiDispatcher
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-18 17:44:17 -08:00
Min Chen
4b75132aa2
Remove IdentityProxy from Response classes.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-18 16:33:12 -08:00
Min Chen
16be94e9d7
Remove IdentityProxy from OfferingResponse, FirewallResponse,
...
FirewallRuleResponse, HypervisorCapabilitiesResponse, IPAddressResponse.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-18 12:02:08 -08:00
Min Chen
1aa30f03e7
Remove IdentityProxy from AutoScale responses.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-18 11:19:36 -08:00
Min Chen
a390b273ae
Merge branch 'api_refactoring' of https://git-wip-us.apache.org/repos/asf/incubator-cloudstack into api_refactoring
2012-12-18 10:07:51 -08:00
Rohit Yadav
5fdce84e81
api: Process UUID and Parameter annotations in ApiDispatcher
...
- Use @Parameter's entityType and type annotation fields
- Use @Entity annotation in Reponse class to get table info for Dao
- Use findByXId to process all entities and translate UUID to ID
- Handle error in reflection method invoking
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-18 04:16:33 -08:00
Rohit Yadav
837d21bb2d
api: Implement findByXId in GenericDaoBase and EntityManagerImpl
...
Declare and define findByXId() in GenericDao and EntityManager.
This method would return a VO by UUID and EntityManager's interface would
take in the VO Interface.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-18 04:10:36 -08:00
Min Chen
3d344738b1
Fix ControlledEntityResponse interface to remove IdentityProxy for
...
projectId and domainId.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-17 23:24:08 -08:00
Min Chen
57eda4e3f4
Merge branch 'api_refactoring' of https://git-wip-us.apache.org/repos/asf/incubator-cloudstack into api_refactoring
2012-12-17 23:03:55 -08:00
Rohit Yadav
d54d8cbcd7
api: Fix ApiServer's handle() which runs on integration.api.port
...
- Fix URI parsing using apache hc
- Remove bloated c-like parsing code
- Fix param processing
- TODO: To use Guava's multimap
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-17 20:51:51 -08:00
Rohit Yadav
5572707ec6
maven: Bump httpcore version, add guava and httpclient dependency
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-17 20:44:48 -08:00
Min Chen
79f8c104eb
Remove IdentityProxy from GuestOSResponse and GuestOSCategoryResponse.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-17 18:01:31 -08:00
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
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
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
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
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
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
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
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
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
Rohit Yadav
da6e81aa21
api_refactoring: Fix build issues and incorrect imports
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 13:48:20 -08:00
Rohit Yadav
089db9c631
api_refactor: capacity, hypvsr, alert and cert apis
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 11:25:56 -08:00