71 Commits

Author SHA1 Message Date
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
eaa250fd3c Formatted again after all the tab expansions and eol removals 2013-11-21 04:47:01 -08:00
Alex Huang
224f479974 Removed trailing spaces 2013-11-21 04:08:01 -08:00
Alex Huang
8d62744681 Reformat all source code. Added checkstyle to check the source code 2013-11-20 07:26:53 -08:00
Bharat Kumar
7095ea2b5e CLOUDSTACK-4738 Dynamic compute offering.
Signed-off-by: Koushik Das <koushik@apache.org>
2013-11-07 12:41:20 +05:30
Wei Zhou
059e3beb28 CLOUDSTACK-4505: add ExpungeVM command to expunge a destroyed VM on demand 2013-10-24 11:52:00 +02:00
Nitin Mehta
4eb310e926 iCLOUDSTACK-2321
Fix the response of scaleVMCmd
Add Scale System vm command
2013-05-17 17:43:43 +05:30
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Nitin Mehta
d1642a489c =initial changes 2013-04-25 18:29:57 +05:30
Vijayendra Bhamidipati
b0caae6b33 CLOUDSTACK-1086: DeployVirtualMachine userdata enhancements
Description:

	Currently, userdata sent over to the DeployVMCmd and
	updateVMCmd commands can be upto 2K in length, whether
	sent over GET or POST. We remove this limitation for
	POST to change this limit to 32K. Also enabling lazy
	load on userdata to improve performance during reads
	of large sized userdata from user VM records.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-04-24 13:42:38 +05:30
Devdeep Singh
21ce3befc8 Storage motion for Xenserver changes: 1. Implemented Api findStoragePoolsForMigration. Added a new response objects to list storage pools available for migration. 2. Updated migrateVolume api for allowing migrating volumes of running vms. These changes are integrated into the latest storage refactoring changes. 3. Added the implementation for findHostsForMigration api. It lists the hosts to which an instance can be migrated, including hosts from within and across clusters to which an instance may be migrated with storage motion. The work of migrating a volume of a running vm is also done in copyAsync. 4. Updated the listHosts api for backward compatibility. 5. Added the implementation for migrateVirtualMachineWithVolume api. It migrates an instance with its volumes within a cluster and also across clusters. Also introduced a new XenServerStorageMotionStrategy for migrating volumes of a vm. When a vm is being migrated with its volumes, the vm is put in migrating state and a request is send to the volume manager to migrate the vm and its volumes. Volume manager calls into the volume service which forwards the request to data motion service after moving all the volumes to migrating state. Data motion service enumerates the strategies and the request reaches the XenServerStorageMotionStrategy. It calls in to the resource to complete the operation. 6. Resolved an issue where storage xenmotion of 2nd VM created from the same template to a host was failing with duplicate_vm exception. Made changes to remove the mac_seed key value pair from other_config when vms are created. This is was storage motion to fail. 7. Updated the db upgrade schema script. 8. Added the right permissions in commands.properties 9. Marvin tests for testing storage motion. Following scenarios are tested. 9.1. A virtual machine is migrated to another host. Its volumes are also migrated to another storage pool. 9.2. Just the volumes of a vm are migrated to another storage pool while the vm continues to run on the same host. 10. Unit tests for testing migration of a vm with its volumes.
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-04-19 11:36:42 +05:30
Prachi Damle
fe2a86871f Changes to add AffinityGroupprocessor, deployVM changes 2013-04-11 13:22:42 -07:00
Nitin Mehta
3e4430d811 CLOUDSTACK-658 - Scaleup vm support for Xenserver
Added the framweork so that it can be extended for vmware and kvm as well.
Added unitests and marvin tests.
2013-03-28 16:43:37 +05:30
Sanjay Tripathi
105618896b CLOUDSTACK-1645 : Resources limit is not validated with update compute offering [ Instances are updated to higher CPU/Memory resources though there are no resources available @ account/domain] 2013-03-14 13:44:34 -07:00
Nitin Mehta
b12aebefee Revert "CLOUDSTACK-658 - Adding Scalevm command and XS related changes"
This reverts commit e0019eccd997d9b2b3ff9395bcd99f821f5121db.
2013-03-04 23:32:52 +05:30
Nitin Mehta
e0019eccd9 CLOUDSTACK-658 - Adding Scalevm command and XS related changes 2013-03-04 14:47:55 +05:30
Edison Su
a22403edcd squash changes into one giant patch 2013-02-21 11:22:48 -08:00
Kelven Yang
7bd8bec68a Sync javelin with master up to 894cb8f7d9fc8b5561754a9fa541fef8f235148a 2013-01-31 17:20:19 -08:00
Sheng Yang
5cb9df91a1 Merge branch 'ipv6'
Conflicts:
	api/src/com/cloud/network/NetworkProfile.java
2013-01-31 15:07:33 -08:00
Kelven Yang
1b2b369ecb Merge latest master into javelin 2013-01-31 11:34:49 -08:00
Harikrishna Patnala
b21595c10d CLOUDSTACK-297: Reset SSH key to access VM
This feature provides resetting a SSH key for an existing VM which means,
setting the old ssh key that is assigned to the VM previously with the new ssh
key.

Signed-off-by: Harikrishna Patnala <harikrishna.patnala@citrix.com>
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-30 17:33:44 -08:00
Marcus Sorensen
15906c03ca Summary: add/remove/update default nics feature
Description: Adds API calls updateDefaultNicForVirtualMachine,
addNicToVirtualMachine, and removeNicFromVirtualMachine. These are
intended to allow a user to modify a VM's configuration post
deployment, to adjust the networks to which the VM belongs.

BUG-ID: CLOUDSTACK-645
Submitted-by: Brian Angus <blangus@betterservers.com>
Submitted-by: Ryan Dietrich <ryan@betterservers.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1359494800 -0700
2013-01-30 17:43:21 -07:00
Sheng Yang
2cbca372bf IPv6: Add support for IPv6 on DeployVMCmd 2013-01-28 18:54:34 -08:00
Alex Huang
fe6f0457d5 fixed unit tests from merge 2013-01-18 15:58:55 -08:00
Min Chen
c167ad45e3 Move view based VO and Dao classes to cloud-server module to hide the
details from API client, also extract query related methods into
QueryService interface.
2012-12-14 10:47:58 -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
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
8773fc2a55 api_refactor: refactor volume apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-04 11:20:48 -08:00
Rohit Yadav
46353e0916 api_refactor: refactor vmgroup apis
- Fix refactored apis, fix mappings in commands*.in
- Fix comments etc.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:35:30 -08:00
Rohit Yadav
3e0b2164be api_refactor: refactor template apis
- Fix refactored apis, fix mapping in commands*.in
- Fix comments etc.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:05:44 -08:00
Rohit Yadav
5e0501d116 api_refactor: refactor project apis
- Fix refactored apis in commands*.in
- Fix comments etc.
- Expand tabs, remove trailing whitespace
- Fix trailing whitespaces for all *.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 22:10:32 -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
4c86b1545d CLOUDSTACK-424: Update userdata should propagate to VR
The code that would propage userdata to router, when updateVirtualMachine api
is called, was missing. As per the docs [0], userdata should be a base64 encoded
string upto 2KB which is put on domr's html directory adn using HTTP GET the
userdata information can be obtained from the domr.

The updateVirtualMachine api [0] would accept a base64 encoded string
and decoded and put into the domr's /var/www/html/userdata/<uservm ip>/user-data
file. The operation does not require the VM to be in stopped state, though it is
advised to stop and call this api in case the user vm has a script which gets
the userdata information from domr while starting.

For example, this script can be used to fetch the data:
server_ip=$(grep dhcp-server-identifier /var/lib/dhclient-eth0.leases | tail -1 | awk '{print $NF}' | tr '\;' ' ')
wget http://${server_ip}/latest/user-data

This feature can be useful, for example to use into puppet facts [1], or to do
automation and horizontal scaling etc. based on userdata.

[0] http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/domain_admin/updateVirtualMachine.html
[1] http://geek.jasonhancock.com/2011/11/09/cloudstack-userdata-into-puppet-facts/

BUG-ID : CLOUDSTACK-424
Reviewed-by: Rohit Yadav <bhaisaab@apache.org>
Reported-by: Nick Wales

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-15 18:43:51 +05:30
Alena Prokharchyk
8f2d9a09e5 CLOUDSTACK-332: intermediate checkin fixing count parameter in listCommands
Fixes the count in commands:

listVolumes
listVirtualMachines
listSnapshots
listRouters
listFirewallRules
listPortForwardingRules
listLoadBalancerRules
listIpForwardingRules
listAccounts
listUsers
listDomains
listDomainChildren
listPublicIpAddresses
listAlerts
listAsyncJobs
listRemoteAccessVpns
listVpnUsers
listTags
listPrivateGateways
listNetworkACLs
listStaticRoutes

Conflicts:

	api/src/com/cloud/api/commands/ListVMsCmd.java
	api/src/com/cloud/api/commands/ListVolumesCmd.java
	api/src/com/cloud/network/lb/LoadBalancingRulesService.java
	server/src/com/cloud/network/firewall/FirewallManagerImpl.java
	server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/tags/TaggedResourceManagerImpl.java
2012-10-12 13:58:59 -07:00
Alena Prokharchyk
d9fd7e02a5 Plug nic support
Conflicts:

	server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java
	server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
2012-06-15 14:07:46 -07:00
David Nalley
c15948a3ef committing Chip Childers patches fixing licensing headers
Applying to the following directories:
* api
* deamonize
* agnet
* agent-simulator
* cloud-cli
2012-06-12 12:32:58 -04:00
Alena Prokharchyk
2d1a6b0b35 bug 14615: deployVm can work 2 diff ways now: 1) Default way - create and start the vm. 2) Create the vm without starting it. Note that vm's volumes stay in Allocated state -not created on the backend till the point where vm starts
status 14615: resolved fixed
2012-04-06 11:30:48 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
prachi
5148145d18 Bug 14028 - Add hostid parameter to StartVmCmd to enable admins to start VM on a particular host
Changes:
- Added hostid to StartVMCmd. Only root admin can use it.
2012-03-05 17:50:23 -08:00
Alena Prokharchyk
3a87cf8331 Code style fixes for API package 2012-02-03 14:25:26 -08:00
Alena Prokharchyk
ceb0a918a1 createTemplate/createSnapshot for project - allow to execute for Projects in Active state only 2011-12-19 16:20:40 -08:00
Abhinandan Prateek
abb37acbdd bug 8962: added usage related and resource count related code, changed the API name as suggested. Incorporated relevant review comments 2011-10-31 16:35:42 +05:30
root
a572205e3c Revert "bug 11311: vm summary command initial impl"
This reverts commit 0abc7e2ea8b9e222f1927aea72d46240bfe8c534.
2011-10-30 15:13:58 +05:30
Abhinandan Prateek
f456462443 bug 11311: vm summary command initial impl 2011-10-28 14:07:19 +05:30
frank
1460f3950e Bug 9949 - revert VM to template
1. able to restore VM from its original template
2. Only allow to restore when VM is running or stopped
3. after restoring, VM state will not change, e.g. running is still running

status 9949: resolved fixed
2011-10-25 13:52:39 -07:00
Edison Su
92eaf49f29 Add storage migration 2011-10-24 15:59:47 -07:00
prachi
9bd5e5871b Bug 11481 - get manual live migration working with all VMs
Changes:
- Added a new API  'migrateSystemVm'  backed by MigrateSystemVMCmd.java to migrate system VMs (SSVM, consoleproxy, domain routers(router, LB, DHCP))
- This is Admin only action
- The existing API 'migratevirtualmachine' is only for user VMs
2011-09-29 17:47:46 -07:00
Kelven Yang
d10c8e2a1d bug 10765: fix step 2 - programming VNC server to let it chose the right keyboard mapping to load into 2011-08-04 18:30:50 -07:00
alena
d380ce0897 bug 4706: added one more parameter - "ipaddress" to deployVm api. This parameter will apply to default network of vm
status 4706: resolved fixed
2011-06-23 11:31:39 -07:00