You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2014/08/04 08:51:54 UTC
git commit: updated refs/heads/master to c32b19a
Repository: cloudstack
Updated Branches:
refs/heads/master 2231fc892 -> c32b19a07
CLOUDSTACK-7215: Make expunge=True as default parameter value while calling destroyVirtualMachine through base library
Signed-off-by: Santhosh Edukulla <sa...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c32b19a0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c32b19a0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c32b19a0
Branch: refs/heads/master
Commit: c32b19a07d0eaa6dc0195ecf1aa9b952a91dc997
Parents: 2231fc8
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Thu Jul 31 20:19:15 2014 +0530
Committer: Santhosh Edukulla <sa...@gmail.com>
Committed: Mon Aug 4 12:21:32 2014 +0530
----------------------------------------------------------------------
.../component/test_advancedsg_networks.py | 2 +-
.../component/test_multiple_ips_per_nic.py | 2 +-
.../component/test_ps_domain_limits.py | 2 +-
test/integration/component/test_ps_limits.py | 2 +-
.../component/test_vpc_vm_life_cycle.py | 18 +++++++++---------
tools/marvin/marvin/lib/base.py | 3 ++-
6 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c32b19a0/test/integration/component/test_advancedsg_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_advancedsg_networks.py b/test/integration/component/test_advancedsg_networks.py
index 2794f96..85ab697 100644
--- a/test/integration/component/test_advancedsg_networks.py
+++ b/test/integration/component/test_advancedsg_networks.py
@@ -1911,7 +1911,7 @@ class TestNetworksInAdvancedSG_VmOperations(cloudstackTestCase):
self.debug("SSH into VM: %s" % vm.nic[0].ipaddress)
vm.get_ssh_client(ipaddress=vm.nic[0].ipaddress)
self.debug("SSH to VM successful, proceeding for %s operation" % value)
- vm.delete(self.api_client)
+ vm.delete(self.api_client, expunge=False)
if value == "recover":
vm.recover(self.api_client)
vm.start(self.api_client)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c32b19a0/test/integration/component/test_multiple_ips_per_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_multiple_ips_per_nic.py b/test/integration/component/test_multiple_ips_per_nic.py
index 24b85df..58aac9f 100644
--- a/test/integration/component/test_multiple_ips_per_nic.py
+++ b/test/integration/component/test_multiple_ips_per_nic.py
@@ -1042,7 +1042,7 @@ class TestVmNetworkOperations(cloudstackTestCase):
StaticNATRule.enable(self.apiclient, public_ip_2.ipaddress.id, virtual_machine.id,
network.id, vmguestip=ipaddress_2.ipaddress)
- virtual_machine.delete(self.apiclient)
+ virtual_machine.delete(self.apiclient, expunge=False)
virtual_machine.recover(self.apiclient)
retriesCount = 10
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c32b19a0/test/integration/component/test_ps_domain_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_ps_domain_limits.py b/test/integration/component/test_ps_domain_limits.py
index afb0955..39add1e 100644
--- a/test/integration/component/test_ps_domain_limits.py
+++ b/test/integration/component/test_ps_domain_limits.py
@@ -670,7 +670,7 @@ class TestMultipleChildDomain(cloudstackTestCase):
self.assertFalse(result[0], result[1])
self.assertTrue(result[2], "Resource count does not match")
- vm_1.delete(self.apiclient)
+ vm_1.delete(self.apiclient, expunge=False)
result = isDomainResourceCountEqualToExpectedCount(
self.apiclient, self.account.domainid,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c32b19a0/test/integration/component/test_ps_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_ps_limits.py b/test/integration/component/test_ps_limits.py
index 1993e93..cbedfe7 100644
--- a/test/integration/component/test_ps_limits.py
+++ b/test/integration/component/test_ps_limits.py
@@ -199,7 +199,7 @@ class TestVolumeLimits(cloudstackTestCase):
expectedCount = self.initialResourceCount
# Stopping instance
try:
- self.virtualMachine.delete(self.apiclient)
+ self.virtualMachine.delete(self.apiclient, expunge=False)
except Exception as e:
self.fail("Failed to destroy instance: %s" % e)
response = matchResourceCount(
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c32b19a0/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index fd995cd..8664e01 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -634,8 +634,8 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
self.debug("Destroying the virtual machines in account: %s" %
self.account.name)
try:
- self.vm_1.delete(self.apiclient)
- self.vm_2.delete(self.apiclient)
+ self.vm_1.delete(self.apiclient, expunge=False)
+ self.vm_2.delete(self.apiclient, expunge=False)
except Exception as e:
self.fail("Failed to stop the virtual instances, %s" % e)
@@ -678,8 +678,8 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
self.debug("Deleted instacnes ..")
try:
- self.vm_1.delete(self.apiclient)
- self.vm_2.delete(self.apiclient)
+ self.vm_1.delete(self.apiclient, expunge=False)
+ self.vm_2.delete(self.apiclient, expunge=False)
except Exception as e:
self.fail("Failed to stop the virtual instances, %s" % e)
@@ -1399,7 +1399,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
self.cleanup.append(self.vm_2)
try:
- self.vm_2.delete(self.apiclient)
+ self.vm_2.delete(self.apiclient, expunge=False)
except Exception as e:
self.fail("Failed to destroy the virtual instances, %s" % e)
@@ -2426,8 +2426,8 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
self.debug("Destroying the virtual machines in account: %s" %
self.account.name)
try:
- self.vm_1.delete(self.apiclient)
- self.vm_2.delete(self.apiclient)
+ self.vm_1.delete(self.apiclient, expunge=False)
+ self.vm_2.delete(self.apiclient, expunge=False)
except Exception as e:
self.fail("Failed to stop the virtual instances, %s" % e)
@@ -3208,7 +3208,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase):
self.debug("Destroying the virtual machines in account: %s" %
self.account.name)
try:
- self.vm_1.delete(self.apiclient)
+ self.vm_1.delete(self.apiclient, expunge=False)
list_vm_response = list_virtual_machines(
self.apiclient,
@@ -3223,7 +3223,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase):
"VM state should be destroyed"
)
- self.vm_2.delete(self.apiclient)
+ self.vm_2.delete(self.apiclient, expunge=False)
list_vm_response = list_virtual_machines(
self.apiclient,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c32b19a0/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 58033c6..eb05a18 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -612,10 +612,11 @@ class VirtualMachine:
[setattr(cmd, k, v) for k, v in kwargs.items()]
return(apiclient.updateVirtualMachine(cmd))
- def delete(self, apiclient, **kwargs):
+ def delete(self, apiclient, expunge=True, **kwargs):
"""Destroy an Instance"""
cmd = destroyVirtualMachine.destroyVirtualMachineCmd()
cmd.id = self.id
+ cmd.expunge = expunge
[setattr(cmd, k, v) for k, v in kwargs.items()]
apiclient.destroyVirtualMachine(cmd)