mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
deployment planners plan per clusters not hosts
Concentration or Dispersion granularity is at the Cluster level and not at the host level. So correcting the test to ensure a. concentrated planner puts the VMs in same cluster b. dispersed planner puts the Vms in diff't clusters Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
5b48ec24d8
commit
ef0e0f36b2
@ -99,6 +99,24 @@
|
|||||||
"name": "PS1"
|
"name": "PS1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"clustername": "C1",
|
||||||
|
"hypervisor": "simulator",
|
||||||
|
"hosts": [
|
||||||
|
{
|
||||||
|
"username": "root",
|
||||||
|
"url": "http://sim/c1/h0",
|
||||||
|
"password": "password"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"clustertype": "CloudManaged",
|
||||||
|
"primaryStorages": [
|
||||||
|
{
|
||||||
|
"url": "nfs://10.147.28.6:/export/home/sandbox/primary2",
|
||||||
|
"name": "PS2"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"gateway": "172.16.15.1"
|
"gateway": "172.16.15.1"
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from marvin.cloudstackTestCase import cloudstackTestCase
|
from marvin.cloudstackTestCase import cloudstackTestCase
|
||||||
from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering
|
from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering, Host
|
||||||
from marvin.integration.lib.common import get_zone, get_domain, get_template, cleanup_resources
|
from marvin.integration.lib.common import get_zone, get_domain, get_template, cleanup_resources
|
||||||
|
|
||||||
from nose.plugins.attrib import attr
|
from nose.plugins.attrib import attr
|
||||||
@ -76,6 +76,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
|
|||||||
domainid=cls.domain.id
|
domainid=cls.domain.id
|
||||||
)
|
)
|
||||||
cls.services["account"] = cls.account.name
|
cls.services["account"] = cls.account.name
|
||||||
|
cls.hosts = Host.list(cls.apiclient, hypervisortype='Simulator')
|
||||||
cls.cleanup = [
|
cls.cleanup = [
|
||||||
cls.account
|
cls.account
|
||||||
]
|
]
|
||||||
@ -177,10 +178,12 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
|
|||||||
"Running",
|
"Running",
|
||||||
msg="VM is not in Running state"
|
msg="VM is not in Running state"
|
||||||
)
|
)
|
||||||
|
vm1clusterid = filter(lambda c: c.id == vm1.hostid, self.hosts)[0].clusterid
|
||||||
|
vm2clusterid = filter(lambda c: c.id == vm2.hostid, self.hosts)[0].clusterid
|
||||||
self.assertNotEqual(
|
self.assertNotEqual(
|
||||||
vm1.hostid,
|
vm1clusterid,
|
||||||
vm2.hostid,
|
vm2clusterid,
|
||||||
msg="VMs meant to be dispersed are deployed on the same host"
|
msg="VMs (%s, %s) meant to be dispersed are deployed in the same cluster %s" % (vm1.id, vm2.id, vm1clusterid)
|
||||||
)
|
)
|
||||||
|
|
||||||
@attr(tags=["simulator", "advanced", "basic", "sg"])
|
@attr(tags=["simulator", "advanced", "basic", "sg"])
|
||||||
@ -236,10 +239,12 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
|
|||||||
"Running",
|
"Running",
|
||||||
msg="VM is not in Running state"
|
msg="VM is not in Running state"
|
||||||
)
|
)
|
||||||
self.assertNotEqual(
|
vm1clusterid = filter(lambda c: c.id == vm1.hostid, self.hosts)[0].clusterid
|
||||||
vm1.hostid,
|
vm2clusterid = filter(lambda c: c.id == vm2.hostid, self.hosts)[0].clusterid
|
||||||
vm2.hostid,
|
self.assertEqual(
|
||||||
msg="VMs meant to be concentrated are deployed on the different hosts"
|
vm1clusterid,
|
||||||
|
vm2clusterid,
|
||||||
|
msg="VMs (%s, %s) meant to be concentrated are deployed on different clusters (%s, %s)" % (vm1.id, vm2.id, vm1clusterid, vm2clusterid)
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user