mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch 'stop_vm' of https://github.com/nitt10prashant/cloudstack into test/pr518
This closes #518 Remark: I had to merge in the old-fashion way (not using the PR alias) due to a problem with the patch
This commit is contained in:
commit
4463881be4
@ -53,6 +53,11 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
|
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
|
||||||
|
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||||
|
cls.unsupportedStorageType = False
|
||||||
|
if cls.hypervisor.lower() == 'lxc':
|
||||||
|
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||||
|
cls.unsupportedStorageType = True
|
||||||
|
|
||||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||||
cls.skip = False
|
cls.skip = False
|
||||||
@ -148,11 +153,11 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
|
|
||||||
@attr(
|
@attr(
|
||||||
tags=[
|
tags=[
|
||||||
"advanced",
|
"advanced",
|
||||||
"eip",
|
"eip",
|
||||||
"advancedns",
|
"advancedns",
|
||||||
"basic",
|
"basic",
|
||||||
"sg"],
|
"sg"],
|
||||||
required_hardware="false")
|
required_hardware="false")
|
||||||
def test_02_deploy_vm_startvm_true(self):
|
def test_02_deploy_vm_startvm_true(self):
|
||||||
"""Test Deploy Virtual Machine with startVM=true parameter
|
"""Test Deploy Virtual Machine with startVM=true parameter
|
||||||
@ -173,7 +178,6 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
startvm=True,
|
startvm=True,
|
||||||
diskofferingid=self.disk_offering.id,
|
|
||||||
mode=self.zone.networktype
|
mode=self.zone.networktype
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -504,14 +508,15 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
|
|
||||||
@attr(
|
@attr(
|
||||||
tags=[
|
tags=[
|
||||||
"advanced",
|
"advanced",
|
||||||
"eip",
|
"eip",
|
||||||
"advancedns",
|
"advancedns",
|
||||||
"basic",
|
"basic",
|
||||||
"sg"],
|
"sg"],
|
||||||
required_hardware="false")
|
required_hardware="false")
|
||||||
def test_08_deploy_attached_volume(self):
|
def test_08_deploy_attached_volume(self):
|
||||||
"""Test Deploy Virtual Machine with startVM=false and attach volume already attached to different machine
|
"""Test Deploy Virtual Machine with startVM=false and attach volume
|
||||||
|
already attached to different machine
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Validate the following:
|
# Validate the following:
|
||||||
@ -521,6 +526,10 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
# 3. Create an instance with datadisk attached to it. Detach DATADISK
|
# 3. Create an instance with datadisk attached to it. Detach DATADISK
|
||||||
# 4. Attach the volume to first virtual machine.
|
# 4. Attach the volume to first virtual machine.
|
||||||
|
|
||||||
|
if self.unsupportedStorageType:
|
||||||
|
self.skipTest(
|
||||||
|
"unsupported storage type")
|
||||||
|
|
||||||
self.debug("Deploying instance in the account: %s" %
|
self.debug("Deploying instance in the account: %s" %
|
||||||
self.account.name)
|
self.account.name)
|
||||||
self.virtual_machine_1 = VirtualMachine.create(
|
self.virtual_machine_1 = VirtualMachine.create(
|
||||||
@ -665,7 +674,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
break
|
break
|
||||||
if i == 0:
|
if i == 0:
|
||||||
self.skipTest(
|
self.skipTest(
|
||||||
"No cluster with more than one primary storage pool to perform migrate volume test")
|
"No cluster with more than one primary storage pool to "
|
||||||
|
"perform migrate volume test")
|
||||||
|
|
||||||
hosts = Host.list(
|
hosts = Host.list(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
@ -1105,7 +1115,8 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
router.state,
|
router.state,
|
||||||
"Running",
|
"Running",
|
||||||
"Router should be in running state when instance is running in the account")
|
"Router should be in running state when "
|
||||||
|
"instance is running in the account")
|
||||||
self.debug("Destroying the running VM:%s" %
|
self.debug("Destroying the running VM:%s" %
|
||||||
self.virtual_machine_2.name)
|
self.virtual_machine_2.name)
|
||||||
self.virtual_machine_2.delete(self.apiclient, expunge=True)
|
self.virtual_machine_2.delete(self.apiclient, expunge=True)
|
||||||
@ -1288,11 +1299,11 @@ class TestDeployVMFromTemplate(cloudstackTestCase):
|
|||||||
|
|
||||||
@attr(
|
@attr(
|
||||||
tags=[
|
tags=[
|
||||||
"advanced",
|
"advanced",
|
||||||
"eip",
|
"eip",
|
||||||
"advancedns",
|
"advancedns",
|
||||||
"basic",
|
"basic",
|
||||||
"sg"],
|
"sg"],
|
||||||
required_hardware="true")
|
required_hardware="true")
|
||||||
def test_deploy_vm_password_enabled(self):
|
def test_deploy_vm_password_enabled(self):
|
||||||
"""Test Deploy Virtual Machine with startVM=false & enabledpassword in
|
"""Test Deploy Virtual Machine with startVM=false & enabledpassword in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user