cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [26/50] [abbrv] git commit: updated refs/heads/rbd-snap-clone to 2355a81
Date Thu, 23 May 2013 21:20:01 GMT
Bad indentation corrected

For some reason test got unindented wrongly by Eclipse.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b3096db6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b3096db6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b3096db6

Branch: refs/heads/rbd-snap-clone
Commit: b3096db600d433cf3ddbae83f8ad82ca4609cc6f
Parents: 44a81f0
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed May 22 16:22:26 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Wed May 22 16:22:26 2013 +0530

----------------------------------------------------------------------
 ...st_deploy_vms_with_varied_deploymentplanners.py |  360 +++++++-------
 1 files changed, 180 insertions(+), 180 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b3096db6/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index c557682..67532c7 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -56,195 +56,195 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-	cls.apiclient = super(TestDeployVmWithVariedPlanners, cls).getClsTestClient().getApiClient()
-	cls.services = Services().services
-	# Get Zone, Domain and templates
-	cls.domain = get_domain(cls.apiclient, cls.services)
-	cls.zone = get_zone(cls.apiclient, cls.services)
-	cls.template = get_template(
-	    cls.apiclient,
-	    cls.zone.id,
-	    cls.services["ostype"]
-	)
-	cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-	cls.services["template"] = cls.template.id
-	cls.services["zoneid"] = cls.zone.id
-
-	cls.account = Account.create(
-	    cls.apiclient,
-	    cls.services["account"],
-	    domainid=cls.domain.id
-	)
-	cls.services["account"] = cls.account.name
-	cls.cleanup = [
-	    cls.account
-	]
+        cls.apiclient = super(TestDeployVmWithVariedPlanners, cls).getClsTestClient().getApiClient()
+        cls.services = Services().services
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient, cls.services)
+        cls.zone = get_zone(cls.apiclient, cls.services)
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+        cls.services["template"] = cls.template.id
+        cls.services["zoneid"] = cls.zone.id
+
+        cls.account = Account.create(
+            cls.apiclient,
+            cls.services["account"],
+            domainid=cls.domain.id
+        )
+        cls.services["account"] = cls.account.name
+        cls.cleanup = [
+            cls.account
+        ]
 
     @attr(tags=["simulator", "advanced", "basic", "sg"])
     def test_deployvm_firstfit(self):
-	"""Test to deploy vm with a first fit offering
-	"""
-	#FIXME: How do we know that first fit actually happened?
-	self.service_offering_firstfit = ServiceOffering.create(
-	    self.apiclient,
-	    self.services["service_offering"],
-	    deploymentplanner='FirstFitPlanner'
-	)
-
-	self.virtual_machine = VirtualMachine.create(
-	    self.apiclient,
-	    self.services["virtual_machine"],
-	    accountid=self.account.name,
-	    zoneid=self.zone.id,
-	    domainid=self.account.domainid,
-	    serviceofferingid=self.service_offering_firstfit.id,
-	    templateid=self.template.id
-	)
-
-	list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id)
-	self.debug(
-	    "Verify listVirtualMachines response for virtual machine: %s"\
-	    % self.virtual_machine.id
-	)
-	self.assertEqual(
-	    isinstance(list_vms, list),
-	    True,
-	    "List VM response was not a valid list"
-	)
-	self.assertNotEqual(
-	    len(list_vms),
-	    0,
-	    "List VM response was empty"
-	)
-
-	vm = list_vms[0]
-	self.assertEqual(
-	    vm.state,
-	    "Running",
-	    msg="VM is not in Running state"
-	)
+        """Test to deploy vm with a first fit offering
+        """
+        #FIXME: How do we know that first fit actually happened?
+        self.service_offering_firstfit = ServiceOffering.create(
+            self.apiclient,
+            self.services["service_offering"],
+            deploymentplanner='FirstFitPlanner'
+        )
+
+        self.virtual_machine = VirtualMachine.create(
+            self.apiclient,
+            self.services["virtual_machine"],
+            accountid=self.account.name,
+            zoneid=self.zone.id,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering_firstfit.id,
+            templateid=self.template.id
+        )
+
+        list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id)
+        self.debug(
+            "Verify listVirtualMachines response for virtual machine: %s"\
+            % self.virtual_machine.id
+        )
+        self.assertEqual(
+            isinstance(list_vms, list),
+            True,
+            "List VM response was not a valid list"
+        )
+        self.assertNotEqual(
+            len(list_vms),
+            0,
+            "List VM response was empty"
+        )
+
+        vm = list_vms[0]
+        self.assertEqual(
+            vm.state,
+            "Running",
+            msg="VM is not in Running state"
+        )
 
     @attr(tags=["simulator", "advanced", "basic", "sg"])
     def test_deployvm_userdispersing(self):
-	"""Test deploy VMs using user dispersion planner
-	"""
-	self.service_offering_userdispersing = ServiceOffering.create(
-	    self.apiclient,
-	    self.services["service_offering"],
-	    deploymentplanner='UserDispersingPlanner'
-	)
-
-	self.virtual_machine_1 = VirtualMachine.create(
-	    self.apiclient,
-	    self.services["virtual_machine"],
-	    accountid=self.account.name,
-	    zoneid=self.zone.id,
-	    domainid=self.account.domainid,
-	    serviceofferingid=self.service_offering_userdispersing.id,
-	    templateid=self.template.id
-	)
-	self.virtual_machine_2 = VirtualMachine.create(
-	    self.apiclient,
-	    self.services["virtual_machine"],
-	    accountid=self.account.name,
-	    zoneid=self.zone.id,
-	    domainid=self.account.domainid,
-	    serviceofferingid=self.service_offering_userdispersing.id,
-	    templateid=self.template.id
-	)
-
-	list_vm_1 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_1.id)
-	list_vm_2 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_2.id)
-	self.assertEqual(
-	    isinstance(list_vm_1, list),
-	    True,
-	    "List VM response was not a valid list"
-	)
-	self.assertEqual(
-	    isinstance(list_vm_2, list),
-	    True,
-	    "List VM response was not a valid list"
-	)
-	vm1 = list_vm_1[0]
-	vm2 = list_vm_2[0]
-	self.assertEqual(
-	    vm1.state,
-	    "Running",
-	    msg="VM is not in Running state"
-	)
-	self.assertEqual(
-	    vm2.state,
-	    "Running",
-	    msg="VM is not in Running state"
-	)
-	self.assertNotEqual(
-	    vm1.hostid,
-	    vm2.hostid,
-	    msg="VMs meant to be dispersed are deployed on the same host"
-	)
+        """Test deploy VMs using user dispersion planner
+        """
+        self.service_offering_userdispersing = ServiceOffering.create(
+            self.apiclient,
+            self.services["service_offering"],
+            deploymentplanner='UserDispersingPlanner'
+        )
+
+        self.virtual_machine_1 = VirtualMachine.create(
+            self.apiclient,
+            self.services["virtual_machine"],
+            accountid=self.account.name,
+            zoneid=self.zone.id,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering_userdispersing.id,
+            templateid=self.template.id
+        )
+        self.virtual_machine_2 = VirtualMachine.create(
+            self.apiclient,
+            self.services["virtual_machine"],
+            accountid=self.account.name,
+            zoneid=self.zone.id,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering_userdispersing.id,
+            templateid=self.template.id
+        )
+
+        list_vm_1 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_1.id)
+        list_vm_2 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_2.id)
+        self.assertEqual(
+            isinstance(list_vm_1, list),
+            True,
+            "List VM response was not a valid list"
+        )
+        self.assertEqual(
+            isinstance(list_vm_2, list),
+            True,
+            "List VM response was not a valid list"
+        )
+        vm1 = list_vm_1[0]
+        vm2 = list_vm_2[0]
+        self.assertEqual(
+            vm1.state,
+            "Running",
+            msg="VM is not in Running state"
+        )
+        self.assertEqual(
+            vm2.state,
+            "Running",
+            msg="VM is not in Running state"
+        )
+        self.assertNotEqual(
+            vm1.hostid,
+            vm2.hostid,
+            msg="VMs meant to be dispersed are deployed on the same host"
+        )
 
     @attr(tags=["simulator", "advanced", "basic", "sg"])
     def test_deployvm_userconcentrated(self):
-	"""Test deploy VMs using user concentrated planner
-	"""
-	self.service_offering_userconcentrated = ServiceOffering.create(
-	    self.apiclient,
-	    self.services["service_offering"],
-	    deploymentplanner='UserConcentratedPodPlanner'
-	)
-
-	self.virtual_machine_1 = VirtualMachine.create(
-	    self.apiclient,
-	    self.services["virtual_machine"],
-	    accountid=self.account.name,
-	    zoneid=self.zone.id,
-	    domainid=self.account.domainid,
-	    serviceofferingid=self.service_offering_userconcentrated.id,
-	    templateid=self.template.id
-	)
-	self.virtual_machine_2 = VirtualMachine.create(
-	    self.apiclient,
-	    self.services["virtual_machine"],
-	    accountid=self.account.name,
-	    zoneid=self.zone.id,
-	    domainid=self.account.domainid,
-	    serviceofferingid=self.service_offering_userconcentrated.id,
-	    templateid=self.template.id
-	)
-
-	list_vm_1 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_1.id)
-	list_vm_2 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_2.id)
-	self.assertEqual(
-	    isinstance(list_vm_1, list),
-	    True,
-	    "List VM response was not a valid list"
-	)
-	self.assertEqual(
-	    isinstance(list_vm_2, list),
-	    True,
-	    "List VM response was not a valid list"
-	)
-	vm1 = list_vm_1[0]
-	vm2 = list_vm_2[0]
-	self.assertEqual(
-	    vm1.state,
-	    "Running",
-	    msg="VM is not in Running state"
-	)
-	self.assertEqual(
-	    vm2.state,
-	    "Running",
-	    msg="VM is not in Running state"
-	)
-	self.assertNotEqual(
-	    vm1.hostid,
-	    vm2.hostid,
-	    msg="VMs meant to be concentrated are deployed on the different hosts"
-	)
+        """Test deploy VMs using user concentrated planner
+        """
+        self.service_offering_userconcentrated = ServiceOffering.create(
+            self.apiclient,
+            self.services["service_offering"],
+            deploymentplanner='UserConcentratedPodPlanner'
+        )
+
+        self.virtual_machine_1 = VirtualMachine.create(
+            self.apiclient,
+            self.services["virtual_machine"],
+            accountid=self.account.name,
+            zoneid=self.zone.id,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering_userconcentrated.id,
+            templateid=self.template.id
+        )
+        self.virtual_machine_2 = VirtualMachine.create(
+            self.apiclient,
+            self.services["virtual_machine"],
+            accountid=self.account.name,
+            zoneid=self.zone.id,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering_userconcentrated.id,
+            templateid=self.template.id
+        )
+
+        list_vm_1 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_1.id)
+        list_vm_2 = VirtualMachine.list(self.apiclient, id=self.virtual_machine_2.id)
+        self.assertEqual(
+            isinstance(list_vm_1, list),
+            True,
+            "List VM response was not a valid list"
+        )
+        self.assertEqual(
+            isinstance(list_vm_2, list),
+            True,
+            "List VM response was not a valid list"
+        )
+        vm1 = list_vm_1[0]
+        vm2 = list_vm_2[0]
+        self.assertEqual(
+            vm1.state,
+            "Running",
+            msg="VM is not in Running state"
+        )
+        self.assertEqual(
+            vm2.state,
+            "Running",
+            msg="VM is not in Running state"
+        )
+        self.assertNotEqual(
+            vm1.hostid,
+            vm2.hostid,
+            msg="VMs meant to be concentrated are deployed on the different hosts"
+        )
 
     @classmethod
     def tearDownClass(cls):
-	try:
-	    cleanup_resources(cls.apiclient, cls.cleanup)
-	except Exception as e:
-	    raise Exception("Warning: Exception during cleanup : %s" % e)
+        try:
+            cleanup_resources(cls.apiclient, cls.cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)


Mime
View raw message