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 <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-06-17 19:44:33 +05:30
parent 6a5c9d777f
commit f8965b6f07

View File

@ -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