From f8965b6f07e32275f5463d4a89a973030b51b123 Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Mon, 17 Jun 2013 19:44:33 +0530 Subject: [PATCH] Concentrated planner granularity is at pod level user.concentrated pod planner will try and put the VMs in the same pod. Correcting the assertion to verify same pod and not same cluster. Test may have passed earlier because of presence of single pod in the deployment. Signed-off-by: Prasanna Santhanam --- ...test_deploy_vms_with_varied_deploymentplanners.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 af832995245..fc8e71648af 100644 --- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py +++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py @@ -16,7 +16,7 @@ # under the License. from marvin.cloudstackTestCase import cloudstackTestCase -from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering, Host +from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering, Host, Cluster from marvin.integration.lib.common import get_zone, get_domain, get_template, cleanup_resources from nose.plugins.attrib import attr @@ -77,6 +77,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): ) cls.services["account"] = cls.account.name cls.hosts = Host.list(cls.apiclient, type='Routing') + cls.clusters = Cluster.list(cls.apiclient) cls.cleanup = [ cls.account ] @@ -241,10 +242,13 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): ) vm1clusterid = filter(lambda c: c.id == vm1.hostid, self.hosts)[0].clusterid vm2clusterid = filter(lambda c: c.id == vm2.hostid, self.hosts)[0].clusterid + + vm1podid = filter(lambda p: p.id == vm1clusterid, self.clusters)[0].podid + vm2podid = filter(lambda p: p.id == vm2clusterid, self.clusters)[0].podid self.assertEqual( - vm1clusterid, - vm2clusterid, - msg="VMs (%s, %s) meant to be concentrated are deployed on different clusters (%s, %s)" % (vm1.id, vm2.id, vm1clusterid, vm2clusterid) + vm1podid, + vm2podid, + msg="VMs (%s, %s) meant to be pod concentrated are deployed on different pods (%s, %s)" % (vm1.id, vm2.id, vm1clusterid, vm2clusterid) ) @classmethod