1489 Commits

Author SHA1 Message Date
Prasanna Santhanam
39db3be294 Simulator: Fixing the listTemplatesCommand
Should return the ListTemplatesAnswer and ListVolumes returns
ListVolumesAnswer

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-26 19:20:32 -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
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
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
Edison Su
d99161399e so many traps in rpc call: you can't use aop in a thread, you need to intercept finalize call etc 2012-12-24 02:37:32 -08:00
Prasanna Santhanam
1f1a13448f simulator: resurrect simulator hypervisor as plugin
Multiple fixes:
1. changes to the mvn configuration
    a. include simulator to client.war
    b. activate simulator by profile
2. templates for simulator
3. developer prefill for simulator
    a. Use deplydb-simulator to setup simulator db
4. Inherit components-simulator.xml from components.xml
5. ListVolumesCommand missed for MockStorageManager
6. Include simulator properties into utils/db.properties

TODO:
 Secondary storage VMs don't come up because ComponentLocator doesn't
retain a unique set of adapaters by name. Fix this in subsequent
checkin.
2012-12-23 19:28:57 -08:00
Rohit Yadav
a3c2bb7418 Merge branch 'master' into api_refactoring
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 19:12:04 -08:00
Devdeep Singh
8f6fdc3efc CLOUDSTACK-227: Fix NPE and throw an exception if the network is not found in Xen
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 19:03:03 -08:00
Rohit Yadav
018b5215e0 api: Annotate apis in various plugins
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 18:03:23 -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
Edison Su
4b2d9f4415 refactor test cases: use testNG instead of junit, as testNG can group test cases and pass parameter to test case 2012-12-22 22:10:39 -08:00
Prasanna Santhanam
f0c3b4c62a simulator:Using the priority to decide b/w MASTER/BACKUP
BootArgs carry router priority for master and backup and simulator will
reuse the priority to decide RvR status. Deprecating the odd/even logic.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-22 14:09:59 -08:00
Prasanna Santhanam
ed25ec0500 simulator: simulator maintenance mode and simulator latency per command
Detail:
To induce latency for a command you have to use an API call like so
http://localhost:8096/client/api?command=configureSimulator&zoneid=1&podid=1&name=CheckRouterCommand&value=wait:80|timeout:0

(This is a hidden API command just for the simulator)

You will see the configuration effected in the mockconfiguration table of
simulator db. You can introduce the latency at runtime without restarting
management server.

mysql> select * from mockconfiguration;
+----+----------------+--------+------------+---------+--------------------+-------------------+
| id | data_center_id | pod_id | cluster_id | host_id | name               | values            |
+----+----------------+--------+------------+---------+--------------------+-------------------+
|  1 |              1 |      1 |       NULL |    NULL | CheckRouterCommand | wait:80|timeout:0 |
+----+----------------+--------+------------+---------+--------------------+-------------------+
1 row in set (0.00 sec)

By providing the optional zoneid, podid, clusterid, hostid you can induce the
latency at various levels. This delay will happen before the command is
processed and post-execution return Command's Answer back to management
server.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-22 13:57:13 -08:00
Prasanna Santhanam
beff1f45b1 Simulator: components-simulator.xml resource
The extended simulator component including the Simulator Managers and
Discoverers
2012-12-22 13:55:32 -08:00
Prasanna Santhanam
d6083ce51d Simulator: moving hypervisor simulator into plugin
Simulator just like any hypervisor should be a plugin.
resurrecting it to aid api refactoring tests. WIP

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-22 13:02:57 -08:00
Edison Su
ac88c16be6 finaly, finish download template to primary storage 2012-12-20 19:06:02 -08:00
Edison Su
c216990e1c trying to add code to download url into devcloud 2012-12-19 18:43:04 -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
Edison Su
8214f18897 fix build, due to refactor rpc 2012-12-19 12:02:11 -08:00
Edison Su
0581ea763a add xenserver backend code: download template from http directly 2012-12-18 18:34:13 -08:00
Kelven Yang
c1ed9a9010 Modify Async callback setup convention 2012-12-17 20:37:19 -08:00
Marcus Sorensen
6ed1989133 Summary: Allow for custom storage adaptors based on pool type in KVM
Detail: Instead of using LibvirtStorageAdaptor for everything, you can create
your own storage adaptor and use it. We select storage adaptor based on storage
pool type, thus we needed to adjust LibvirtComputingResource to pass pool type
to everything in KVMStoragePoolManager. This in turn required that we pass the
info necessary to LibvirtComputingResource as well, so a few agent Commands were
modified.

Note this patch in and of itself shouldn't change any existing behavior, just
allow for new storage adaptors to be selected based on storage pool type.

Reviewed-by: Edison Su
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1355769696 -0700
2012-12-17 11:41:36 -07:00
Edison Su
b70c1a5a84 Backs NFS-based secondary storage with an S3-compatible object store. Periodically, a reaper thread synchronizes templates and ISOs stored on a NFS secondary storage mount with a configured S3 object store. It also pushes snapshots to the object store when they are created and downloads them in other zones on-demand. In addition to permitting the use of commodity or IaaS storage solutions for static assets, it provides a means of automatically synchronizing template and ISO assets across multiple zones. 2012-12-13 23:18:37 -08:00
Devdeep Singh
5405242674 master - Bug ID: CLOUDSTACK-369. Unable to add XenServer 6.1 to cloudstack. Created a new resource for XS 6.1. Also introduced a guest map for the list of supported os.
Signed-off-by: Devdeep Singh <devdeep.singh@citrix.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2012-12-10 15:17:07 +05:30
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
Hugo Trippaers
2b74b6e827 Start removing the old ant build files
Removed all build.xml files from the plugins
2012-12-07 15:58:56 +01:00
Marcus Sorensen
7ce2227108 Summary: master - Copy qcow2 instead of converting if source and dest are qcow2
Detail: If source image is qcow2, and we want a qcow2 image, then doing a
convert strips off compression and any snapshots the user had in that image. If
a backing file exists, we stick with convert so we can pull in both the backing
file and the COW image, otherwise we just cp the qcow2 file. This is also faster

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354755241 -0700
2012-12-05 17:54:01 -07:00
anthony
40682fc43d CLOUDSTACK-587:
use setMemoryLimits instead
2012-12-05 05:24:46 -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
Marcus Sorensen
05d3f86b16 Summary: Fix orphaned patch disks for system VMs on KVM
Detail: This patch deletes any patchdisk found when deleting root volume for
system VM.

BUG-ID: CLOUDSTACK-566
Bugfix-for: 4.0.1
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354222335 -0700
2012-11-29 13:52:15 -07:00
Marcus Sorensen
5aad7cc307 Summary: Pull patch from 4.0 that skips deleting patchVbd when systemvms are
stopped

Detail: This patch fixed an issue with hosts trying to stop system vms that were
already not running and deleting a patch disk for the system vm running on
another host. It got applied to 4.0 but not master.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354222160 -0700
2012-11-29 13:49:20 -07:00
Marcus Sorensen
88180fc139 Summary: Direct template imaging for CLVM, bypass copy template to primary
Detail: Because of the way most other primary storage types work with cloudstack
   (i.e. backing stores) CLVM actually copies the template to a local logical
   volume on primary storage, then uses that. This causes all of your primary
   storage to be littered with a copy of every template used. Since we're not
   using these, dump the template direct to the newly created logical volume.
   This is faster as well since the template is sparse; we're not creating a fat
   template on primary storage and then copying that to a logical volume when we
   deploy from template.

BUG-ID: CLOUDSTACK-508
Bugfix-for: 4.1
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1353221260 -0700
2012-11-17 23:47:39 -07:00
Kelven Yang
cea8f3bf37 Switch inject annotation to javax and let ComponentLocator to recognize both the new and original inject annotation 2012-11-07 15:03:22 -08:00
Kelven Yang
aab02e2743 Add Spring annotation to major components 2012-11-07 14:53:39 -08:00
Marcus Sorensen
b42f3f53d8 Summary: Fix empty traffic labels causing NullPointerExceptions on KVM
Detail: In com.cloud.hypervisor.kvm.resource.BridgeVifDriver.java, in 2 places
an if block should have evaluated to true if trafficLabel was null, however it
was causing a NullPointerException instead.

BUG-ID : NONE
Bugfix-for: 4.0
Reviewed-by: Marcus Sorensen
Reported-by: Dave Cahill
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1352307750 -0700
2012-11-07 10:02:30 -07:00
Alex Huang
91e68b5f2c A bunch of .project changes again 2012-11-04 19:25:03 -08:00
marcus
843e140858 Summary: Allow public and private nic to be the same bridge
Detail: There was a regression in functionality introduced by
915babd970a9b4f209deceb3c4973b7d1c9c0c12 where the public
bridge could not also be the private bridge. This had several
additional consequences, this patch should revert the behavior
back while keeping the functionality enhancements introduced by that
commit.

BUG-ID : NONE
Reviewed-by: Dave Cahill
Reported-by: Dave Cahill via cloudstack-dev
Signed-off-by: Marcus Sorensen <shadowsor@gmail.com> 1351574006 -0600
2012-10-29 23:13:26 -06:00
Hiroaki Kawai
c03712e86a CLOUDSTACK-423 : During VM migration on KVM, VifDriver.unplug is not
called.

VifDriver.unplug must be called in MigrateCommand which hooks VM
migration in source host, because plug will be called in
PrepareForMigration in destination host. But that operation is missing
in current LibvirtComputingResources.

Signed-off-by: Edison Su <sudison@gmail.com>
2012-10-29 11:36:25 -07:00
Hiroaki Kawai
cb9395498f kvm agent NIC unplug will always fail
On kvm computing host, vifdriver.unplug will always fails (throws
LibvirtException) and network cleanup will not be called. This was
because the code first undefine the computing domain, and then tries to
query the destroyed machine definition to fetch NIC information. IMHO,
kvm plugin code rounds LibvirtException too much.

Signed-off-by: Edison Su <sudison@gmail.com>
2012-10-29 11:35:49 -07:00
Hugo Trippaers
200703e9b8 VMware stuff should be compile time dependency 2012-10-29 08:55:24 +01:00
Alex Huang
f92ce72639 Correct dependency errors 2012-10-24 11:12:40 -07:00
Edison Su
059f605ace add more interfaces 2012-10-22 17:50:51 -07:00
Hugo Trippaers
6a20802640 Fix runtime dependencies for vmware modules
The vmware modules should be listed as provided so they are never
packaged. However this also means that you have to put them in the
web-inf/lib directory by hand.

Set the version of the api in the central pom for easy reference.

Add wsdl4j as a runtime requirement. It is actually required by the
vmware implementation but it is easier to list it as a requirements for
the component here as vmware is not in any maven repo

put the dependency on vim back in the dependencies. It is not required
for compile, but is required as runtime by apputils.
2012-10-22 17:58:36 +02:00
Hugo Trippaers
53cea844bc The interface change introduced by commit
214bbf3ebd957f571901869f319da61ebad7ed23 broke the nonoss build.
2012-10-18 09:40:13 +02:00
Hugo Trippaers
3bb136292b Double check vmware dependencies and provide information on where to get
them.
2012-10-15 16:57:59 +02:00
Rohit Yadav
9b1b145192 CLOUDSTACK-346: Replace vmware-lib-jaxrpc with axis-jaxrpc
vmware-lib-jaxrpc is now provided by axis-jaxrpc-1.4.jar, the former is
the same as latter (bit by bit) and only difference is the file name.

- Fix dependency in vmware-base's pom.xml
- Fix dependency in hypervisor-plugin-vmware's pom.xml
- Fix install-non-oss.sh by reverting commit:
    2e6ddc6c36f4ce79e67ad223647071bccfc41c52.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-15 16:44:30 +05:30
Kelven Yang
5fee891162 merge from master 2012-10-11 17:42:25 -07:00