5885 Commits

Author SHA1 Message Date
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
Noa Resare
0055d80211 CLOUDSTACK-771: maven: add mysql version reference to enable non-snapshot builds
If you update your build to build a version with a name not ending in -SNAPSHOT,
you are required to declare versions on all your depdendencies. There is already
a cs.mysql.version property, this patch makes sure it is used where appropriate.

Signed-off-by: Chip Childers <chip.childers@gmail.com>
2013-01-04 12:20:06 -05:00
Wido den Hollander
7240204a50 Pass on the destination host in StartCommand
I added this in commit bc94948e0604e0e5931759be3c3d3155e84686f6 to be able to bind
the VNC on KVM on the Private IP Address of the Hypervisor.

This got (accidentally) reverted in commit 110903a91a21c04b931a26354a04bd7f534ba050 breaking
this behaviour with KVM.

By passing the destination host again in StartCommand we are able to bind the VNC to the private
IP address of the hypervisor.

This makes sure the VNC is not open for the world and users don't have to firewall these ports, nor
do they have to change "vnc_listen" in their qemu.conf libvirt settings.
2013-01-04 14:37:23 +01:00
Rohit Yadav
6929bd9473 server: Don't silently ignore uuid param translation for required param in case they fail
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-03 22:32:47 -08:00
Rohit Yadav
98d5719b57 server: Make ApiDispatcher backward compatible to not throw error on incorrect params
Incorrect params are silently ignored in 4.0 and before. The fix would log the error
in debug log, but will continue processing. In case of an issue with uuid or param
an empty response is sent, for ex. in case of deleted entities as well.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-03 22:32:46 -08:00
Min Chen
daeb4abcca Create DB views for AsyncJobResponse to speed up listAsyncJobsCmd.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-03 15:35:26 -08:00
Min Chen
ff8fdbd194 Add missing @Id annotation to id fields for all the join VOs to support
findById call.
2013-01-03 14:12:15 -08:00
Kelven Yang
01701b1d9c Missing two files in last check-in 2013-01-03 14:11:16 -08:00
Kelven Yang
25d14418b9 Replace Adapters<T> with standard List<T> to work with Spring injection 2013-01-03 13:33:52 -08:00
Rohit Yadav
edb00bb613 Merge branch 'master' into api_refactoring 2013-01-03 08:32:56 -08:00
Hugo Trippaers
cc3d692ab8 Summary: Remove useless and commented code 2013-01-03 11:57:37 +01: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
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
Kelven Yang
e2078ec6e4 Solve Spring loading issues with a few Dao and Manager components 2013-01-02 13:55:26 -08:00
John Burwell
e4583ced2e S3-backed Secondary Storage 2013-01-02 10:28:47 -08:00
Alex Huang
e936c32a04 Fixed problems with inject checkin 2012-12-28 16:24:54 -08:00
Kelven Yang
259e6d5f74 Fix a few Spring bootstrap issues 2012-12-27 17:46:52 -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
Kelven Yang
877e16029c Fix a few Spring issues to Bootstrap javaline server 2012-12-21 16:49:27 -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