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 <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f8965b6f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f8965b6f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f8965b6f Branch: refs/heads/disk_io_throttling Commit: f8965b6f07e32275f5463d4a89a973030b51b123 Parents: 6a5c9d7 Author: Prasanna Santhanam <[email protected]> Authored: Mon Jun 17 19:44:33 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Mon Jun 17 19:44:33 2013 +0530 ---------------------------------------------------------------------- .../test_deploy_vms_with_varied_deploymentplanners.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f8965b6f/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 af83299..fc8e716 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
