CLOUDSTACK-8308: Updating Disable/enable host testpath as admin user should not be able to deploy vm on disabled host

Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
This closes #356
This commit is contained in:
pritisarap12 2015-06-05 11:52:34 +05:30 committed by Gaurav Aradhye
parent 93845afd53
commit 0326fb3b5c
1 changed files with 10 additions and 10 deletions

View File

@ -1371,7 +1371,6 @@ class TestDisableEnableHost(cloudstackTestCase):
cmd.resourcestate = DISABLED
cmd.allocationstate = DISABLE
self.apiclient.updateHost(cmd)
self.disabledHosts.append(hostid)
hostList = Host.list(self.apiclient, id=hostid)
@ -1406,15 +1405,16 @@ class TestDisableEnableHost(cloudstackTestCase):
"stopped",
"verify that vm should stop")
VirtualMachine.create(
self.apiclient,
self.testdata["small"],
templateid=self.template.id,
accountid=self.account.name,
domainid=self.account.domainid,
serviceofferingid=self.service_offering.id,
zoneid=self.zone.id,
hostid=hostid)
with self.assertRaises(Exception):
VirtualMachine.create(
self.apiclient,
self.testdata["small"],
templateid=self.template.id,
accountid=self.account.name,
domainid=self.account.domainid,
serviceofferingid=self.service_offering.id,
zoneid=self.zone.id,
hostid=hostid)
root_volume = list_volumes(
self.apiclient,