Min Chen
c1a540c6bb
Merge branch 'master' into api_limit
...
Conflicts:
api/src/org/apache/cloudstack/api/BaseCmd.java
server/src/com/cloud/api/ApiServer.java
server/src/com/cloud/api/ApiServlet.java
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-16 22:48:22 -08:00
Min Chen
3dabd5fbf3
Clean up ApiServer, ApiServlet and ApiDispatcher flow to handle various CloudRuntimeException
...
and CloudException in one place, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-16 22:36:34 -08:00
Min Chen
bdcfa1919b
Clean up ApiServer, ApiServlet and ApiDispatcher in handling various
...
exceptions, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.
2013-01-16 21:52:48 -08:00
Kelven Yang
4c1257bf18
Handle proxy object situation in dispatching API command
2013-01-16 11:28:09 -08:00
Kelven Yang
df684261cf
Put command classes under Spring injection framework
2013-01-15 18:07:19 -08:00
Min Chen
4355d06a86
Reuse APIChecker adapter interface for APi Rate limit checking and optimize ApiRateLimitService interface.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-15 15:53:19 -08:00
Min Chen
7f1486e2dc
We need to catch PermissionDeniedException in checking if command is
...
available to an user.
2013-01-15 11:43:59 -08:00
Rohit Yadav
8f27c711e5
ApiServer: Process through chain of api access checker, on failure it will throw exception
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 19:01:26 -08:00
Min Chen
4d0c850dc8
Fix plugin component configuration.
2013-01-14 17:13:18 -08:00
Rohit Yadav
896e505da6
APIChecker: Make interface generic, pass user and not just role
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 15:08:45 -08:00
Kelven Yang
6dfbcee63d
Fix singleton initialization in ApiServer/ApiDispatcher to make it work under Spring bootstraped environment
2013-01-14 13:57:30 -08:00
Rohit Yadav
38eaa04b98
Pull changes from master into javelin
...
- Disables simulator plugin, breaks build, available via simulator profile
- Fixes spring injections
- Fix api,acl plugins, ApiServer, ApiDispatcher
- Fix other merge conflicts
Conflicts:
docs/en-US/external-firewalls-and-load-balancers.xml
plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java
server/src/com/cloud/api/ApiDispatcher.java
server/src/com/cloud/api/ApiServer.java
server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
utils/test/com/cloud/utils/log/CglibThrowableRendererTest.java
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-12 06:02:54 -08:00
Rohit Yadav
ad063ed610
StaticRoleBasedAPIAccessChecker: Throw exception on failed check
...
Plugin should not be responsible for existence of checking an API, this was wrong.
Throw exception boldly when checkAccess fails.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 19:24:11 -08:00
Rohit Yadav
0dca44efe8
ApiServer: Debug messages, don't spam with info, remove identity helper in ResponseGenerator
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
24687973a8
ApiServer: Get rid of IdentityDao, reuse domain manager to get domain id
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:19 -08:00
Min Chen
57e67c57d7
Merge branch 'master' into api_limit
...
Conflicts:
server/src/com/cloud/api/ApiServer.java
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-11 15:50:21 -08:00
Kelven Yang
f57dcaa820
Loadable components to be in separted Spring component bundling
2013-01-11 15:33:15 -08:00
Kelven Yang
53da542001
Another round of fixes after merge
2013-01-11 15:21:04 -08:00
Rohit Yadav
74bb043c37
APIChecker: Rename refactor and add interface checkExistence
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 18:51:30 -08:00
Alex Huang
757e1a931b
cleanup warnings in utils
2013-01-10 17:19:30 -08:00
Rohit Yadav
e63e352508
ApiServer: Log a better message if api access fails and debug it
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 16:08:16 -08:00
Alex Huang
1294cdc701
pulled from master
2013-01-10 16:01:01 -08:00
Alex Huang
d6f44a4d6a
merged from master
2013-01-10 15:55:42 -08:00
Rohit Yadav
a56f355ceb
ApiServer: get role type from account manager using account
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:01 -08:00
Rohit Yadav
62a42723f9
APIAccessChecker: Make it check based on role type and not user
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 11:49:15 -08:00
Alex Huang
56e5fbdee2
removed import of componentlocator and inject from all files
2013-01-10 11:44:47 -08:00
Min Chen
0b69d9449a
Merge branch 'master' into api_limit
2013-01-10 09:51:41 -08:00
Min Chen
7f8262d45e
Remove IdentityProxy and IdentityTypeAdapter class.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-09 17:40:58 -08:00
Rohit Yadav
657fb6ac0b
ApiServer: Don't depend on plugin for apiname:cmd class mapping
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 17:20:46 -08:00
Rohit Yadav
72693ea382
server: Fix ApiServer init method, we won't use cfg files and it's not used there
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 17:20:46 -08:00
Min Chen
8d98daa1be
Add API throttling config items and APILimitChecker Adapter interface,
...
add api limit checking in APIServer flow.
2013-01-09 16:11:23 -08:00
Alex Huang
b6c56736e5
merge from master
2013-01-09 05:20:36 -08:00
Alex Huang
0bcb64605f
all built with the latest
2013-01-09 05:02:39 -08:00
Alex Huang
14bd345f1f
merge compiles
2013-01-09 04:41:27 -08:00
Rohit Yadav
765504c070
ApiServer: Fix apidiscovery fail case, fix comment
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 04:18:35 -08:00
Rohit Yadav
2c04dad529
ApiDiscovery: New plugin to help discover apis on mgmt server
...
- Introduces api/discovery plugin that helps discover apis on the mgmt server
- It's a pluggable service, therefore has it's own api-discovery_commands.properties
where the discovery api, listApi can be blacklisted (by removing it), or it's
role mask can be changed
- By default its response has all the apis
- Changes in other parts of the code to make it work, viz. components.xml, pom.xml,
and in ApiServer where it is used as an adapter to get apiname, cmd mappings
The ApiDiscoveryService interface is a contract that the implementing class will
provide:
1. A means to get all the apis as a list of response, plugin is free to implement
the response class, as long as it extends on the BaseResponse:
ListResponse<? extends BaseResponse> listApis();
2. Provides a map of apiname as the key and cmd class as the value:
Map<String, Class<?>> getApiNameCmdClassMapping();
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 18:54:29 -08:00
Kelven Yang
b274c570f9
Cleanup places that use explicit wiring of the components
2013-01-08 17:45:33 -08:00
Alex Huang
30f2565d98
Merge branch 'api_refactoring' into javelin
2013-01-08 12:36:04 -08:00
Min Chen
74c15a22a0
Create DB view for ListStoragePools API performance optimization.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-08 12:33:18 -08:00
Kelven Yang
559933f062
First page of Javelin management server bootstraped by Spring is able to show now
2013-01-07 15:54:18 -08:00
Rohit Yadav
96b9164e4b
Fix ACL processor and methods in ApiDispatcher and their usages
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 17:18:45 -08:00
Rohit Yadav
19cf665094
ApiServer: Fix debug output for role based user access checking
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 16:51:14 -08:00
Rohit Yadav
ed0637b8c2
api: Refactor move acl to org.apache.cloudstack
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 15:30:58 -08:00
Rohit Yadav
0428b30a5a
Fix reflections cmd class loading in ApiServer
...
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 14:35:05 -08:00
Kelven Yang
2e9c55f8f6
More Spring issues to bootstrape javalin server
2013-01-04 14:25:12 -08:00
Rohit Yadav
580bf857ff
server: ApiServer inits with processing cmd classes to fill apiname:class mapping
...
- Add maven dependency reflections (wtfl license, apl compliant)
- Use reflections to recurse and get apiname:class mapping
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 18:43:59 -08:00
Min Chen
ebfb90e217
Create DB view for Account to speed up ListAccountsCmd, and add missing async job information for some response objects.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-02 17:38:58 -08:00
Min Chen
21c1623a03
Create DB view for Volume to speed up ListVolumesCmd.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-25 17:08:50 -08:00
Rohit Yadav
296b49c2f8
Merge branch 'master' into test-merge-api
...
Conflicts:
api/src/com/cloud/agent/api/BackupSnapshotCommand.java
api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java
api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
api/src/com/cloud/network/NetworkService.java
api/src/com/cloud/resource/ResourceService.java
api/src/org/apache/cloudstack/api/ApiConstants.java
api/src/org/apache/cloudstack/api/ResponseGenerator.java
api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java
client/tomcatconf/commands.properties.in
core/src/com/cloud/storage/SnapshotVO.java
pom.xml
server/src/com/cloud/api/ApiDispatcher.java
server/src/com/cloud/api/ApiResponseHelper.java
server/src/com/cloud/api/ApiServer.java
server/src/com/cloud/configuration/ConfigurationManagerImpl.java
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/network/rules/RulesManagerImpl.java
server/src/com/cloud/offerings/NetworkOfferingVO.java
server/src/com/cloud/resource/ResourceManagerImpl.java
server/src/com/cloud/upgrade/dao/Upgrade40to41.java
server/src/com/cloud/vm/UserVmManagerImpl.java
server/test/com/cloud/vpc/MockNetworkManagerImpl.java
setup/db/create-schema.sql
setup/db/db/schema-40to410.sql
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 13:54:46 -08:00
Min Chen
e7fa1a86fb
Create DB views to improve ListHostsCmd performance.
...
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-22 21:47:05 -08:00