5766 Commits

Author SHA1 Message Date
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
Rohit Yadav
65e4f00a10 Annotate api name on usage related apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 18:43:58 -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
Rohit Yadav
bc8e0af0a3 plugin: ACL Static Role Based api access checker
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 17:06:19 -08:00
Rohit Yadav
d235859168 Fix PluggableService to provide interface for ACL adapters etc. to get configs
- Fix interface to return array of strings, or filenames
- Fix StaticRoleBased ACL adapter to process config files by going through all pluggable services
- Refactor interface names

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 16:29:39 -08:00
Rohit Yadav
d8d87adc22 Merge branch 'master' into api_refactoring
Conflicts:
	api/src/com/cloud/api/commands/ListS3sCmd.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 13:57:55 -08:00
John Burwell
e4583ced2e S3-backed Secondary Storage 2013-01-02 10:28:47 -08:00
Rohit Yadav
623e7389ef api: Make APIServer backward compatible to accept both uuid and id for pre 3.x apis
- Allow both uuid and id in param for pre 3.x apis
- Enforce uuid as param for all >= 3.x apis
- Use regex to better match uuid param

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-27 15:24:17 -08:00
Prasanna Santhanam
840da55520 api: Entities will extend InternalIdentity and Identity
Entities correlated to the Identity and carry a uuid and those
correlated to InternalIdentity carry an id. Those entities that carry
both will correlated to Identity and InternalIdentity.

This refactors entities wherever possible to ensure the VO only
implements the first class entity.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-26 19:11:15 -08:00
Rohit Yadav
7a7fe583e0 Rename Implementation annotation to APICommand
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-26 15:55:34 -08:00
Rohit Yadav
a18464dbe5 Rename @Entity to @EntityReference used in Response classes
- Renames to @EntityReference as @Entity is too general and used in javax's pkg
- Remove redundant imports

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-26 15:34:35 -08:00
Rohit Yadav
057ac12d23 Enforce InternalIdentity interface on all VO classes that impls long getId()
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-26 15:09:44 -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
78d70d349b Merge branch 'master' into api_refactoring
- Applies Isaac Chian'gs fix (CLOUDSTACK-648) to allow user change their password
- TODO: Fix response, only partially applied

Conflicts:
	api/src/org/apache/cloudstack/api/response/UserResponse.java
	client/tomcatconf/commands.properties.in
	server/src/com/cloud/api/ApiResponseHelper.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-25 09:51:17 -08:00
Isaac Chiang
5aefd77f77 Fix for CloudStack-648
Signed-off-by: Gavin Lee <gavin.lxh@gmail.com>
2012-12-26 00:00:58 +08:00
Rohit Yadav
beb2fccf1c api: Finally get rid of IdentityMapper annotation processing in ApiDispatcher
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 18:06:36 -08:00
Rohit Yadav
9d3ab8ded7 server: Get rid of db helpers that work with IdentityMapper
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 18:04:32 -08:00
Rohit Yadav
e849d70af1 api: Annotate some juniper-src apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 17:41:10 -08:00
Rohit Yadav
a4fed07a7e api: Annotate usage related apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 17:33:30 -08:00
Rohit Yadav
a5dddb4a83 api: Extend or Implement InternalIdentity's getId method on a lot of VOs and Interfaces
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 16:52:35 -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
503db14127 Add back Identity interface to most VO class to avoid cast error in
ApiDispatcher.setupParameter call.
2012-12-22 22:35:09 -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
Rohit Yadav
5d8e106602 api: Add method in ApiDispatcher to be reused for both UUID and List<Uuid>
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-22 18:57:26 -08:00
Rohit Yadav
2140ff55ea api: Refactor and move VPN related api cmd classes to command.user.vpn
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-22 16:13:37 -08:00
Rohit Yadav
024f0d95dd api: Use Identity interface instead of java reflect to getId
- Add new interface method to getId
- Fix method definition in AsyncJob
- Get rid of mechanism to getId using reflect, use Identity interface

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-21 19:05:45 -08:00
Rohit Yadav
08892c51a3 api: Fix jobid and entitytype for BaseResponse and QueryAsyncJob*
- Fix jobid serialization issue that broke the UI
- Fix AsyncJob Result and Response
- Get rid of getUuid(), setUuid(), just use getId, setId for uuid...
- All uuids from over the wire are UUIDs

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-21 19:05:45 -08:00
Sheng Yang
96c7bbeb86 Update the router status after start network
Start network can possible start the router as well. If it's already started by
start network, then we won't need to start it again.
2012-12-21 15:22:07 -08:00
Sheng Yang
9f257aa60b Using different MAC for a pair of redundant routers
In the past, we use same MAC address therefore once MASTER is down, the packet
to the same MAC would go to BACKUP ASAP.

But now we also have arping after BACKUP become MASTER, which should update the
ARP cache of public gateway router quickly. Though it would be a little
delay(likely less than 1 second), it's still fine for different MAC.

And it would solve some cache issue for same mac on vSwitch different ports.
2012-12-21 15:21:53 -08:00
Min Chen
f4a90a151f Merge branch 'api_refactoring' of https://git-wip-us.apache.org/repos/asf/incubator-cloudstack into api_refactoring 2012-12-21 15:11:54 -08:00
Kishan Kavala
3ae5986b87 Update DB version during DB deploy
1. Modified create-schema.sql to add version as 4.1.0 instead of 4.0.0
	2. Removed schema-40to41.sql amd moved the content to schema-40to410.sql
	3. Added to schema-40to410.sql Upgrade40to41.java

Conflicts:
	server/src/com/cloud/upgrade/dao/Upgrade40to41.java
	setup/db/create-schema.sql
	setup/db/db/schema-40to41.sql
	setup/db/db/schema-40to410.sql

Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-21 15:11:05 -08:00
Rohit Yadav
03b47cb501 api: Temp. fix to be backward compatible to old way of id passing
For some apis, the param=-1 is used to evaluate conditionals. Allow -1 to be passed
for now. This is a APITODO/FIXME to fix stuff in service layer and then only get rid of it.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-21 14:41:14 -08:00
Kishan Kavala
8acc85ca53 Update DB version during DB deploy
1. Modified create-schema.sql to add version as 4.1.0 instead of 4.0.0
	2. Removed schema-40to41.sql amd moved the content to schema-40to410.sql
	3. Added to schema-40to410.sql Upgrade40to41.java
2012-12-21 15:27:00 +05:30
Sheng Yang
d72f8a695d Add new global configuration option to enable user specify guest OS DHCP policy
This is improvement of:

commit 1ca493e4facf190a288012bf9b888f90e2bc2855
Author: Sheng Yang <sheng.yang@cloud.com>
Date:   Wed Feb 29 17:43:50 2012 -0800

    bug 14042: Don't set dhcp:router option on DHCP server for non-default
network on CentOS/RHEL

The old solution only works on CentOS/RHEL, this one would enable the ability to more
guest OS, and enable user to choose what policy should be for each guest os
type.
2012-12-20 19:21:02 -08:00
Sheng Yang
53e6825b74 CLOUDSTACK-689: Clean stop pending flags when VR start/stop 2012-12-20 18:51:01 -08:00
Min Chen
e4dbc2033f Add upgrade script from 4.0 to 4.1.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-20 18:18:06 -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
Min Chen
98b022a430 Remove IdentityProxy from plugin response classes.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-19 13:09:02 -08:00
Min Chen
e397f23f6b Revert "Guard null pointer exceptions."
This reverts commit fc56e29a3ec22035c744e276538e8a20e5923996.

Conflicts:
	server/src/com/cloud/api/ApiResponseHelper.java

Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-19 11:23:09 -08:00
Min Chen
1d729578d4 Remove IdentityProxy from Response classes.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-18 23:16:38 -08:00
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