2348 Commits

Author SHA1 Message Date
Harikrishna Patnala
215b638e8e CLOUDSTACK-2347: Zone filter for listSnapshots API
Added new optional parameter zone id in listSnapshots API which allows to list snapshots with additional criteria.
   Signed off by :- Nitin Mehta <nitin.mehta@citrix.com>
2013-06-12 13:35:58 +05:30
Jayapal
c1ad3b7974 CLOUDSTACK-2604 Fixed deleting secondary ip when no PF rules set
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-10 12:13:08 +05:30
Prachi Damle
8c9f681f9e CLOUDSTACK-2350: Anti-Affinity - As admin user, when tryinto update the affinity group for a Vm that is deployed by a regular user , he is presented with admin's affinity groups.
Changes:
- listAffinityGroups API takes in accountname and domainId parameter
- For admin, listall=true should return all affinity groups of all users
2013-06-07 15:28:28 -07:00
Sateesh Chodapuneedi
58b57ca5db CLOUDSTACK-2805 [VMware] addVmwareDc fails with NPE when non-existent DC name is passed to the API
Made vcenter as required parameter to addVmwareDc API.
Removed stale parameter url from addVmwareDc API.
Improved Exception handling, logging remote exception details.
2013-06-06 15:33:10 +05:30
SrikanteswaraRao Talluri
4da995238b CLOUDSTACK-2783: FIXED listHypervisorCapabilities API response to include the following fields: 1. maxdatavolumes 2. maxhostspercluster 3. storagemotionenabled 2013-06-05 13:50:41 +05:30
Prasanna Santhanam
bc345e5520 CLOUDSTACK-2837 : InternalLoadBalancer greets Alena
Extraneous logs used while debugging. :)

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-04 14:26:40 +05:30
Prasanna Santhanam
0401774a09 StoragePoolForMigrationResponse -> StoragePoolResponse
The additional response type is basically the same as
StoragePoolResponse. Only additional state reported is whether the
storage pool is suitable for migration. Since this is fetched from
hypervisor capabilities there is no need for a new response type.

Tested with the simulator and I can see the response format correctly.

mysql> select * from hypervisor_capabilities where id=18\G
*************************** 1. row ***************************
                      id: 18
                    uuid: 98b88e6e-ccf1-11e2-bd2a-af89de8bd27e
         hypervisor_type: Simulator
      hypervisor_version: NULL
        max_guests_limit: 100
  security_group_enabled: 1
  max_data_volumes_limit: 100
   max_hosts_per_cluster: 100
storage_motion_supported: 1
     vm_snapshot_enabled: 1
1 row in set (0.00 sec)

CloudMonkey output as below:
> find storagepoolsformigration id=0a644f79-53dd-4eb6-a871-64679a47cfc6
count = 1
storagepool:
name = PS0
id = 7c07ec9b-a3c6-3466-ab5a-f5669ead0b22
clusterid = 71fb5c34-4852-46e6-bb8f-c9da4e8f827c
clustername = C0
created = 2013-06-04T14:06:55+0530
disksizeallocated = 0
disksizetotal = 1099511627776
disksizeused = 0
ipaddress = 10.147.28.6
jobstatus = 0
path = /export/home/sandbox/primary0
podid = 560d9600-35dd-4a50-addd-81d5618536e9
podname = POD0
scope = CLUSTER
state = Up
suitableformigration = True
type = NetworkFilesystem
zoneid = 3108f711-0db6-4dad-a0d0-2fd7d413e5ef
zonename = Sandbox-simulator

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-04 14:26:40 +05:30
Bharat Kumar
0a69b82899 CLOUDSTACK-2620 [Multiple_IP_Ranges] Guest vm's nameserver is not set to VRs guest IP address in case of multiple subnets
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2013-06-03 19:09:01 +05:30
Wei Zhou
f714d26039 Revert "CLOUDSTACK-1301: Add VM Disk I/O Throttling"
This reverts commit 6dad8adf8fc22417f0242126b8f52ee081f74f49.
2013-06-03 07:48:03 +02:00
Wei Zhou
6dad8adf8f CLOUDSTACK-1301: Add VM Disk I/O Throttling 2013-06-01 08:03:02 +02:00
Wei Zhou
b9b0168da4 CLOUDSTACK-1192: Add Disk I/O Statistics 2013-06-01 08:00:48 +02:00
Sateesh Chodapuneedi
7998413f48 CLOUDSTACK-2029 zone wide primary storage support for cloudstack over vmware deployments
Added hypervisor type to CreateStoragePoolCmd & Storage pool responses.
DatastoreLifeCycle would consider hypervisor type while attaching datastore to zone.
ZoneWideStoragePoolAllocator would filter zone wide primary storage pools by hypervisor type along with tags in disk profile.
hypervisor type is mandatory parameter if scope is specified as ZONE while creating primary storage pool.
As of now KVM, VMware are allowed to use ZoneWideStoragePoolAllocator.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-06-01 00:05:27 +05:30
Prasanna Santhanam
16a76e92ab CLOUDSTACK-2789: updateVPC takes in id and name as required
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-31 19:35:14 +05:30
Prasanna Santhanam
49b5e61869 CLOUDSTACK-2788: restartVpc should have id as required
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-31 19:35:14 +05:30
Murali Reddy
9c0f9aceb8 CLOUDSTACK-2332:[GSLB] deleteAccount is not cleaning the gslb rules
created by the account

revoking GSLB rules of account on delete
2013-05-31 19:08:40 +05:30
Prasanna Santhanam
aefcee5753 CLOUDSTACK-2787: updateVpcOffering should have id as a required
without the id you cannot update a VPC offering. The docs for API will
go wrong and Marvin tests using update VPC will fail.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-31 17:49:19 +05:30
Rajesh Battala
af4177b86c Fixed CLOUDSTACK-2662 Preferred implicit dedication fails with insufficient capacity even if shared hosts are available.
Issues:
In Implicit planner resource usage is fixed to "Dedicated". It should be Dedicated/Shared depending upon the Implict Planner strict/preferred modes and hosts availability.

Fixed:
Issue is fixed by determining the resource usage to be "Dedicated/Shared" depending upon the Implicit strict/preferred mode and the hosts availability for the planner.
2013-05-31 00:28:56 -07:00
Alena Prokharchyk
1300fc8128 AccountManager/Service: reduced visibility for methods that are called only from AccountManagerImpl itself 2013-05-30 11:18:32 -07:00
Alena Prokharchyk
973fc84d6c AccountManager: fixed unchecked conversion warning 2013-05-30 11:18:32 -07:00
Kishan Kavala
3115ddf007 Added networkAclId to listNetworkResponse. Log ACL provider while applying network ACLs 2013-05-30 16:36:21 +05:30
Saksham Srivastava
17267794ad CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host. <Patch1>
This feature allows a user to deploy VMs only in the resources dedicated to his account or domain.

1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account or domain.
   Implemented 12 new APIs to dedicate/list/release resources:
   - dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
   - dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
   - dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a Cluster
   - dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. clusters/hosts) inside that cannot be further dedicated.
3. Once a resource is dedicated to a domain, other resources inside that can be further dedicated to its sub-domain or account.
4. If any resource (eg.cluster) is dedicated to a account/domain, then resources(eg. Pod) above that cannot be dedicated to different accounts/domain (not belonging to the same domain)
5. To use Explicit dedication, user needs to create an Affinity Group of type 'ExplicitDedication'
6. A VM can be deployed with the above affinity group parameter as an input.
7. A new ExplicitDedicationProcessor has been added which will process the affinity group of type 'Explicit Dedication' for a deployment of a VM that demands dedicated resources.
   This processor implements the AffinityGroupProcessor adapter. This processor will update the avoid list.
8. A VM requesting dedication will be deployed on dedicatd resources if available with the user account.
9. A VM requesting dedication can also be deployed on the dedicated resources available with the parent domains iff no dedicated resources are available with the current user's account or
   domain.
10. A VM (without dedication) can be deployed on shared host but not on dedicated hosts.
11. To modify the dedication, the resource has to be released first.
12. Existing Private zone functionality has been redirected to Explicit dedication of zones.
13. Updated the db upgrade schema script. A new table "dedicated_resources" has been added.
14. Added the right permissions in commands.properties
15. Unit tests:  For the new APIs and Service, added unit tests under : plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
16. Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is deployed on the dedicated host.
2013-05-30 01:07:01 -07:00
Prachi Damle
34943adfc6 CLOUDSTACK-2366: Anti-Affinity - DeleteAffinityGroup API should allow for deletion of Afffinity group even when VMs are associated with it.
Changes:
- Allowing group to be deleted even when VMs are associated to it.
2013-05-29 17:59:32 -07:00
Nitin Mehta
8d1189c2ae CLOUDSTACK-2060
Global config to turn off dynamically scale vm functionality
2013-05-29 19:02:06 +05:30
Min Chen
6e55776795 CLOUDSTACK-2331: Failed to display exception object information in case of CloudRuntimeException. 2013-05-28 16:01:33 -07:00
Prasanna Santhanam
4a563b64ee CLOUDSTACK-2713: StoragePoolResponse for a createTemplate
createTemplate returns a templateresponse and not a storagepool
response. Correcting the mapping to fix API docs.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-28 16:37:23 +05:30
Prasanna Santhanam
75a8c1ca88 CLOUDSTACK-2712: updateHvCapability mapped to serviceOfferingResponse
response object of updateHypervisorCapabilities is set to
ServiceOfferingResponse

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-28 16:22:06 +05:30
Prasanna Santhanam
a0d5b78e84 CLOUDSTACK-2708: AutoScale listConditions response wrongly mapped
AutoScale - listConditions was mapped to CounterResponse instead of
ConditionResponse

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-28 14:14:19 +05:30
Murali Reddy
883333c214 CLOUDSTACK-2700:on network/vpc delete, portable IP should be still
associated with account

Unlike public ip which gets dis-associated (released) with the account
on network/VPC delete, portable IP should continue to be associated with
the account even when the network/VPC with which it is currently
associated in deleted. This fix ensures portable IP are associated to
account even after network/vpc is deleted.
2013-05-27 18:44:41 +05:30
Murali Reddy
ad48c83808 generate an action event when portable IP association is transferred
from a network to different network
2013-05-27 18:44:41 +05:30
Harikrishna Patnala
82974458a6 CLOUDSTACK-2672: Adding isVolatile parameter in service offering response object
Signed off by :- Nitin Mehta <nitin.mehta@citrix.com>
2013-05-27 18:25:29 +05:30
Mice Xia
cc2866c1ea CLOUDSTACK-2686 Upload volume to project is not shown in project storage view 2013-05-27 15:48:09 +08:00
Sheng Yang
e3a3286758 CLOUDSTACK-2681: Suppress failed to apply port forwarding rule error when rollback 2013-05-24 17:08:31 -07:00
Sheng Yang
a1437ae82e CLOUDSTACK-2563: Network ACL: Allow protocol 1(icmp) paired with icmp type/code 2013-05-24 16:46:44 -07:00
Murali Reddy
b000781bfc fixing disassociateIpAddress API to call 'releasePortableIpAddress'
network service method for portable ip address. Also fix ensures events
coresponding to the portabl ip are generated correctly.
2013-05-24 18:54:04 +05:30
Harikrishna Patnala
a34e577d1b CLOUDSTACK-1453: support restore for VM created from ISO
This is to support restore a vm to a new/currently_attached ISO.
In the restorevm API we have an optional parameter templateId to restore the vm to the new template/ISO ID.
2013-05-24 16:41:03 +05:30
Alena Prokharchyk
7e6f3f94ba CLOUDSTACK-2628: added networkId parameter to the list of request parameters in listLoadBalancerRules API 2013-05-23 16:06:57 -07:00
Alena Prokharchyk
c52879b88c CLOUDSTACK-2627: disassociate ip address - assign return value of releaseIpAddress backend call to the result returned to the API caller 2013-05-22 16:14:47 -07:00
Alena Prokharchyk
f41d398cf7 Remote access vpn: method name change 2013-05-22 16:05:03 -07:00
Hiroaki Kawai
7260e8d83f CLOUDSTACK-1638: Introduce NetworkMigrationResponder
The location of the virtual machine is provided by DeployDestination, which will
be passed in NetworkGuru#reserve and NetworkElement#prepare.

During the virtual machine migration, it actually changes DeployDestination and
it looks like that it will tell that event to network components as it has
NetworkManager#prepareNicForMigration. The problem is that althogh the interface
has that method, NetworkManagerImpl does not tell the DeployDestination changes
to network components.

So IMHO, we need to add calls of NetworkGuru#reserve and NetworkElement#prepare
in NetworkManagerImpl#prepareNicForMigration . And then, we also need to add
calls NetworkGuru#release and NetworkElement#release after the migration,
otherwise the network resources that plugin reserved will be kept even when the
vm leaves off.

(Sheng Yang: rebase code, add license header)

Signed-off-by: Sheng Yang <sheng.yang@citrix.com>
2013-05-20 16:43:18 -07:00
Murali Reddy
d6452be861 CLOUDSTACK-652: meging 'portable public ip' feature
Squashed commit of the following:

commit f244f9ce7982db16984dd87c31545f1c0240c704
Merge: 993cbb0 f5c8e38
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 20 18:54:05 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java

commit 993cbb0df9fa6e64b96b18ed775b73cdf4a8f5d7
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 20 18:49:54 2013 +0530

    introduce 'transferPortableIP' interface method in network manger. This
    method will transfer association of portable ip from one network to
    another network.

commit 0c1c2652c1b39e9a81ca35464360e11ed9ef23f1
Merge: a718d35 a29e393
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Fri May 17 02:48:54 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	utils/src/com/cloud/utils/net/NetUtils.java

commit a718d353f7acf0328d928673df6f22de1abc0acb
Merge: ecca117 c211818
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 21:22:19 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	api/src/org/apache/cloudstack/api/ResponseGenerator.java
    	server/src/com/cloud/api/ApiResponseHelper.java
    	server/src/com/cloud/network/NetworkServiceImpl.java
    	server/src/com/cloud/network/addr/PublicIp.java
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/com/cloud/network/MockNetworkManagerImpl.java
    	server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
    	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
    	setup/db/db/schema-410to420.sql

commit ecca117e345224059297f5c1ffa0f442209b3160
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 20:05:29 2013 +0530

    added integration tests for testing portable ip ranges

commit 895a27c2771dbb497ecc6fe0d212589f012a48d8
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 15:12:19 2013 +0530

    - establish model for transferring portable IP association from a network
      with which it is associated to another network.

    - enabling static nat api, extended to transfer potrtable IP across the
      networks if the VM/network is different from the current associate
      network of the portable ip

commit 51509751b290c0e51cbdd104a9aebff189cbe806
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Mon May 13 12:05:33 2013 +0530

    seperate out associate/disassociate with guest network operations from
    alloc and release of portable ip

commit bd058f58c2d8d36ec25e31ed9de4cd414e0ca051
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sun May 12 21:14:48 2013 +0530

    enhance disasociateIPAddr API to release protable IP associated with a
    guest network or VPC

commit 27504d9098729e8c3ac3b33f053f2d66ac2c4401
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sun May 12 16:53:45 2013 +0530

    enhance asociateIPAddr API to acquire a protable IP and associate with a
    guest network or VPC

commit f82c6a8431647114462665c1306c6215cb92afd3
Merge: 3dbfb44 0749013
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 23:32:13 2013 +0530

    Merge branch 'master' into portablepublicip

    Conflicts:
    	api/src/com/cloud/network/IpAddress.java
    	api/src/org/apache/cloudstack/api/ResponseGenerator.java
    	client/tomcatconf/commands.properties.in
    	server/src/com/cloud/api/ApiResponseHelper.java
    	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
    	server/src/com/cloud/server/ManagementServerImpl.java
    	server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
    	server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
    	setup/db/db/schema-410to420.sql

commit 3dbfb44eb5b888367375a96b8ae0ac9cf54309a6
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 20:33:19 2013 +0530

    - add 'portable' boolean as property of IpAddress, persist the property in
    IPAddressVO, return the property in IpAddressResponse

    - add ability to request portable IP in associateIpAddress api

commit bf3cb274cfeb1ef41c63794ced83c7c6940f34cc
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 16:08:40 2013 +0530

    add the status of each portable IP (its state, details of associated data
    center/VPC/guest network etc) in the PortableIpRangeResponse returned by
    listPortableIpRanges API

commit e7b2fb22557cb4ef0ce9c8dde3ed1b9c857038bf
Author: Murali Reddy <muralimmreddy@gmail.com>
Date:   Sat May 11 14:36:01 2013 +0530

    Introdcues notion of 'portable IP' pool at region level.

    Introduces root admin only API's to provision portable ip to a region
       - createPortableIpRange
       - deletePortableIpRange
       - listPortableIpRanges
2013-05-20 20:05:47 +05:30
Prasanna Santhanam
6ea2b06aab Fixing multiple minor annoyances:
1. Keeping the description consistent - Memory not RAM when referring to
overcommit
2. getters And setters grouped, provided right casing.
3. Removed wildcard imports

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-05-19 18:34:26 +05:30
Prachi Damle
31a67706e4 CLOUDSTACK-2070: Anti-Affinity - When Vm deployment fails because of not being able to satisfy the anti-affinity rule , user should be provided with more informative message.
Changes:
- There is no good mechanism currently to figure out if the  deployment failed due to affinity groups only
- We can just hint the user that the deployment might have failed due to the affinity groups and ask to review the input
2013-05-17 14:36:23 -07:00
Nitin Mehta
4eb310e926 iCLOUDSTACK-2321
Fix the response of scaleVMCmd
Add Scale System vm command
2013-05-17 17:43:43 +05:30
Devdeep Singh
e520ff4568 CLOUDSTACK-2122. Virtual machine id should be a required parameter for findHostsForMigration api. Fixing it. 2013-05-17 17:01:17 +05:30
Devdeep Singh
adbebc1892 Changes for implicitly dedicating a resource. It includes a following:
1. A new implicit planner which extends the functionality provided by FirstFitPlanner.
2. Implicit planner can be used in either strict or preferred mode. In strict mode it tries to deploy a vm of a given account on a host on which vms of the account are already running. If no such host is found it'll search for an empty host to service the request. Otherwise the deploy vm request fails.
3. In preferred mode, if a host which is running vms of the account or an empty host isn't found, the planner then tries to deploy on any other host provided it isn't running implicitly dedicated strict vms of any other account.
4. Updated the createServiceOffering api to configure the details for the planner that the service offering is using.
5. Made db changes to store the service offering details for the planner.
6. Unit tests for testing the implicit planner functionality.
7. Marvin test for validating the functionality.
2013-05-17 11:40:31 +05:30
Dave Brosius
973c43a152 CLOUDSTACK-2530: fix npe if no network isolation methods
Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
2013-05-17 10:08:07 +08:00
Prachi Damle
a2eb7bab1e CLOUDSTACK-2056: DeploymentPlanner choice via ServiceOffering
- Changes merged from planner_reserve branch
- Exposing deploymentplanner as an optional parameter while creating a service offering
- changes to DeploymentPlanningManagerImpl to make sure host reserve-release happens between conflicting planner usages.
2013-05-16 15:02:17 -07:00
Murali Reddy
565d829c00 CLOUDSTACK-2460: fix the event descriptions for
create/delete/update/assign global load balancer rule apis
2013-05-16 15:19:41 +05:30
Murali Reddy
3c51c4e7ad CLOUDSTACK-2461: createGSLBRule API is failing to pick the default algorithm "round
robin" for parameter "gslblbmethod"

fix defaults to round robin when parameter not specified
2013-05-16 15:19:40 +05:30
Sheng Yang
2d2c0c48cd Merge branch 'pvlan'
Conflicts:
	scripts/vm/hypervisor/xenserver/xenserver60/patch
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/NetworkServiceImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/network/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java
2013-05-15 16:08:08 -07:00