Min Chen
4d0c850dc8
Fix plugin component configuration.
2013-01-14 17:13:18 -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
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
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
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
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
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
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
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
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
Min Chen
b14b39a69f
Remove IdentityProxy from BaseResponse, ExtractResponse. Now
...
IdentityProxy is only referenced in CreateCmdResponse, which involves
some async job logic change. Since it is not impacting list performance,
will leave it there for now.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-20 16:52:52 -08:00
Min Chen
a88ce6bb7f
Remove IdentityProxy from CloudException and ExceptionResponse.
2012-12-19 23:49:44 -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
Chip Childers
44da7b1841
CLOUDSTACK-505: Reworked approach to cleaning request / response strings
...
As noted in the bug, several of the API command in question
are async calls. I've added a simple regex-based string cleaning
function, and have the request and response strings running through
it prior to being appended to the audit log.
Unit tests added for the new cleaning function as well.
The call to skip logging the createSSHKeyPair response remains intact
for now, although it should probably be scrubbed similarly to the
password fields.
Signed-off-by: Chip Childers <chip.childers@gmail.com>
2012-12-17 14:11:09 -05: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
Chip Childers
82a17a413b
CLOUDSTACK-505: Removed logging of deployVirtualMachine and resetPasswordForVirtualMachine commands.
...
Signed-off-by: Chip Childers <chip.childers@gmail.com>
2012-12-13 16:00:30 -05: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
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
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
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
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
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
b0ce8fd4ff
api: Optimize and improve api, db call perfomance
...
This is part 1 of list API refactoring. Commands covered:
listVmsCmd, listRoutersCmd Response covered:
UserVmResponse, DomainRouterResponse. DB views created:
user_vm_view, domain_router_view.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-05 20:06:20 -08:00
Rohit Yadav
6fc3bc3760
api_refactor: refactor vpn and vm apis
...
- Refactor VPN and VM APIs to admin and user pkgs
- Names space, org.apache.cloudstack
- Fix refactored apis in commands*.in
- Fix comments etc.
- Expand tabs, remove trailing whitespace
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 21:27:02 -08:00
Rohit Yadav
5edfc2760a
refactor: remove redundant imports, fix trailing chars
2012-12-03 13:54:37 -08:00
Prachi Damle
a2306f4917
some more poc work
2012-11-29 16:10:09 -08:00
Prachi Damle
073863249a
Some ACL POC work
...
Conflicts:
server/src/com/cloud/api/ApiDispatcher.java
2012-11-29 16:09:47 -08:00
Chip Childers
e4a5173199
CLOUDSTACK-505: Do not log the command response object for the createSSHKeyPair command.
...
Signed-off-by: Chip Childers <chip.childers@gmail.com>
2012-11-29 12:24:42 -05:00
Alena Prokharchyk
339aa41442
CLOUDSTACK-304: Synchronization support for createSnapshot command - don't sent more than "concurrent.snapshots.threshold.perhost" createSnapshots commands to the backend host.
...
Conflicts:
core/src/com/cloud/async/AsyncJobVO.java
core/src/com/cloud/async/SyncQueueVO.java
server/src/com/cloud/api/ApiDispatcher.java
server/src/com/cloud/api/ApiServer.java
server/src/com/cloud/async/AsyncJobManagerImpl.java
server/src/com/cloud/async/SyncQueueManager.java
server/src/com/cloud/async/SyncQueueManagerImpl.java
server/src/com/cloud/async/dao/SyncQueueDao.java
server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
server/test/com/cloud/async/TestSyncQueueManager.java
setup/db/create-schema.sql
2012-10-10 13:40:00 -07:00
Alena Prokharchyk
048c5e50cf
Merge branch 'master' into vpc
...
Conflicts:
utils/test/com/cloud/utils/component/MockComponentLocator.java
2012-08-08 11:50:39 -07:00
Alex Huang
c1c952b42b
should have used non url safe
2012-08-07 16:58:16 -07:00
Alex Huang
a6a864a1a8
Removed Base64 file and use the apache version
2012-08-07 15:41:54 -07:00
Alena Prokharchyk
31f9d718fb
Merge branch 'master' into vpc
...
Conflicts:
server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
2012-07-03 17:32:50 -07:00