mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-8161: fixed few more wrong references
in the tests
This commit is contained in:
parent
a8f9233377
commit
6e3009a299
@ -28,7 +28,7 @@
|
||||
from marvin.codes import (PASS,
|
||||
RECURRING)
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
|
||||
|
||||
from marvin.lib.base import (ServiceOffering,
|
||||
Account,
|
||||
@ -529,8 +529,8 @@ class TestBaseImageUpdate(cloudstackTestCase):
|
||||
2) The recurring snapshot rule should be deleted
|
||||
"""
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if self.hypervisor.lower() in ['lxc']:
|
||||
raise self.SkipTest("Template creation from root volume is not supported in LXC")
|
||||
if cls.hypervisor.lower() in ['lxc']:
|
||||
raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
|
||||
vms = VirtualMachine.list(
|
||||
self.apiclient,
|
||||
id=self.vm_with_reset.id,
|
||||
|
||||
@ -62,9 +62,9 @@ class TestDynamicServiceOffering(cloudstackTestCase):
|
||||
cls.domain = get_domain(cls.apiclient)
|
||||
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if self.hypervisor.lower() in ['lxc']:
|
||||
self.skipTest("dynamic scaling feature is not supported on %s" % self.hypervisor.lower())
|
||||
cls.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() in ['lxc']:
|
||||
raise unittest.SkipTest("dynamic scaling feature is not supported on %s" % cls.hypervisor.lower())
|
||||
|
||||
cls.template = get_template(
|
||||
cls.apiclient,
|
||||
@ -484,7 +484,7 @@ class TestScaleVmDynamicServiceOffering(cloudstackTestCase):
|
||||
TestScaleVmDynamicServiceOffering,
|
||||
cls).getClsTestClient()
|
||||
cls.api_client = cloudstackTestClient.getApiClient()
|
||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
# Fill services from the external config file
|
||||
cls.services = cloudstackTestClient.getParsedTestDataConfig()
|
||||
|
||||
@ -1162,7 +1162,7 @@ class TestScaleVmDynamicServiceOffering(cloudstackTestCase):
|
||||
# 3. Scale operation in step 6 should fail
|
||||
|
||||
hypervisor = get_hypervisor_type(self.apiclient)
|
||||
if hypervisor.lower() in ["kvm", "hyperv"]:
|
||||
if hypervisor.lower() in ["kvm", "hyperv", "lxc"]:
|
||||
self.skipTest(
|
||||
"Scaling VM in running state is not supported on %s" % hypervisor)
|
||||
|
||||
@ -1262,9 +1262,9 @@ class TestAccountLimits(cloudstackTestCase):
|
||||
|
||||
# Fill services from the external config file
|
||||
cls.services = cloudstackTestClient.getParsedTestDataConfig()
|
||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if self.hypervisor.lower() in ['lxc']:
|
||||
self.skipTest("dynamic scaling feature is not supported on %s" % self.hypervisor.lower())
|
||||
cls.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() in ['lxc']:
|
||||
raise unittest.SkipTest("dynamic scaling feature is not supported on %s" % cls.hypervisor.lower())
|
||||
|
||||
# Get Zone, Domain and templates
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
@ -1602,9 +1602,9 @@ class TestAffinityGroup(cloudstackTestCase):
|
||||
|
||||
# Fill services from the external config file
|
||||
cls.services = cloudstackTestClient.getParsedTestDataConfig()
|
||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if self.hypervisor.lower() in ['lxc']:
|
||||
self.skipTest("migrate VM feature is not supported on %s" % self.hypervisor.lower())
|
||||
cls.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() in ['lxc']:
|
||||
raise unittest.SkipTest("dynamic scaling feature is not supported on %s" % cls.hypervisor.lower())
|
||||
|
||||
# Get Zone, Domain and templates
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
|
||||
@ -34,7 +34,8 @@ from marvin.lib.base import (Account,
|
||||
Zone)
|
||||
from marvin.lib.common import (get_zone,
|
||||
get_template,
|
||||
get_domain)
|
||||
get_domain,
|
||||
find_storage_pool_type)
|
||||
from marvin.codes import PASS
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
@ -1777,7 +1778,7 @@ class TestListInstances(cloudstackTestCase):
|
||||
Step16: Verifying that VM deployed in step1 has only 1 nic
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest(
|
||||
self.skipTest(
|
||||
"This feature is not supported on existing hypervisor.\
|
||||
Hence, skipping the test")
|
||||
|
||||
@ -2208,8 +2209,8 @@ class TestInstances(cloudstackTestCase):
|
||||
Step10: Detaching the ISO attached in step8
|
||||
Step11: Verifying that detached ISO details are not associated with VM
|
||||
"""
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest(
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv', 'lxc']:
|
||||
self.skipTest(
|
||||
"This feature is not supported on existing hypervisor. Hence,\
|
||||
skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
@ -2352,8 +2353,8 @@ class TestInstances(cloudstackTestCase):
|
||||
Step12: Listing all the VM snapshots in Page 2 with page size
|
||||
Step13: Verifying that size of the list is 0
|
||||
"""
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest(
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv', 'lxc']:
|
||||
self.skipTest(
|
||||
"This feature is not supported on existing hypervisor. Hence,\
|
||||
skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
@ -2514,8 +2515,8 @@ class TestInstances(cloudstackTestCase):
|
||||
Step11: Verifying that the VM Snapshot with current flag set to true
|
||||
is the reverted snapshot in Step 8
|
||||
"""
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest(
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv', 'lxc']:
|
||||
self.skipTest(
|
||||
"This feature is not supported on existing hypervisor.\
|
||||
Hence, skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
@ -2684,6 +2685,10 @@ class TestInstances(cloudstackTestCase):
|
||||
Step13: Listing all the Volumes in Page 2
|
||||
Step14: Verifying that list size is 0
|
||||
"""
|
||||
self.hypervisor = self.testClient.getHypervisorInfo()
|
||||
if self.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
self.skipTest("RBD storage type is required for data volumes for LXC")
|
||||
# Listing all the VM's for a User
|
||||
list_vms_before = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
@ -2904,7 +2909,7 @@ class TestInstances(cloudstackTestCase):
|
||||
Step6: Verifying that VM's service offerings is changed
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest(
|
||||
self.skipTest(
|
||||
"ScaleVM is not supported on KVM. Hence, skipping the test")
|
||||
# Checking if Dynamic scaling of VM is supported or not
|
||||
list_config = Configurations.list(
|
||||
|
||||
@ -522,7 +522,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step9: Verifying the details of the Listed IP Address
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
self.skipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -857,7 +857,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step11: Verifying that no Load Balancer Rules are listed
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
self.skipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -3035,7 +3035,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step8: Verifying that StaticNat is disabled
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
self.skipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -3454,7 +3454,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step18: Verifying Autoscale policy is updated with condition2
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest(
|
||||
self.skipTest(
|
||||
"ScaleVM is not supported on KVM. Hence, skipping the test")
|
||||
|
||||
list_physical_networks = PhysicalNetwork.list(
|
||||
@ -3733,7 +3733,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step16: Verifying that Autoscale VM is updated
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest(
|
||||
self.skipTest(
|
||||
"ScaleVM is not supported on KVM. Hence, skipping the test")
|
||||
|
||||
list_physical_networks = PhysicalNetwork.list(
|
||||
@ -4060,7 +4060,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step14: Enabling Autoscale VM group and verifying it was enabled
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest(
|
||||
self.skipTest(
|
||||
"ScaleVM is not supported on KVM. Hence, skipping the test")
|
||||
|
||||
list_physical_networks = PhysicalNetwork.list(
|
||||
|
||||
@ -30,7 +30,8 @@ from marvin.lib.base import (Account,
|
||||
SnapshotPolicy)
|
||||
from marvin.lib.common import (get_domain,
|
||||
get_zone,
|
||||
get_template)
|
||||
get_template,
|
||||
find_storage_pool_type)
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.codes import PASS
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
"""
|
||||
#Import Local Modules
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase,unittest
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
|
||||
#from marvin.cloudstackAPI import *
|
||||
from marvin.lib.utils import (cleanup_resources,
|
||||
validateList)
|
||||
@ -837,7 +837,7 @@ class TestResourceLimitsProject(cloudstackTestCase):
|
||||
|
||||
if self.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(self.apiclient, storagetype='rbd'):
|
||||
self.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
self.skipTest("RBD storage type is required for data volumes for LXC")
|
||||
self.project_1 = Project.create(
|
||||
self.api_client,
|
||||
self.services["project"],
|
||||
|
||||
@ -40,7 +40,8 @@ from marvin.lib.common import (get_domain,
|
||||
get_zone,
|
||||
get_template,
|
||||
list_volumes,
|
||||
get_builtin_template_info)
|
||||
get_builtin_template_info,
|
||||
find_storage_pool_type)
|
||||
import time
|
||||
|
||||
class Services:
|
||||
|
||||
@ -450,7 +450,7 @@ class TestMultipleChildDomain(cloudstackTestCase):
|
||||
|
||||
if self.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(self.apiclient, storagetype='rbd'):
|
||||
self.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
self.skipTest("RBD storage type is required for data volumes for LXC")
|
||||
result = self.setupAccounts()
|
||||
if result[0] == FAIL:
|
||||
self.fail(
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
"""
|
||||
# Import Local Modules
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
|
||||
|
||||
from marvin.lib.base import (Snapshot,
|
||||
Template,
|
||||
|
||||
@ -1157,7 +1157,7 @@ class TestResourceTags(cloudstackTestCase):
|
||||
|
||||
if self.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(self.apiclient, storagetype='rbd'):
|
||||
self.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
self.skipTest("RBD storage type is required for data volumes for LXC")
|
||||
|
||||
self.debug("Creating volume for account: %s " %
|
||||
self.account.name)
|
||||
|
||||
@ -37,7 +37,8 @@ from marvin.lib.base import (Account,
|
||||
Volume)
|
||||
from marvin.lib.common import (get_zone,
|
||||
get_domain,
|
||||
get_template)
|
||||
get_template,
|
||||
find_storage_pool_type)
|
||||
|
||||
|
||||
class Services:
|
||||
@ -682,6 +683,7 @@ class TestTemplateUsage(cloudstackTestCase):
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
cls.services["server"]["zoneid"] = cls.zone.id
|
||||
template = get_template(
|
||||
cls.api_client,
|
||||
@ -779,6 +781,9 @@ class TestTemplateUsage(cloudstackTestCase):
|
||||
# 4. Destroy the account
|
||||
|
||||
# Create template from Virtual machine and Volume ID
|
||||
if self.hypervisor.lower() == 'lxc':
|
||||
self.skipTest(
|
||||
"template create from volume is not supported on %s . Hence, skipping the test" % self.hypervisor)
|
||||
self.template = Template.create(
|
||||
self.userapiclient,
|
||||
self.services["templates"],
|
||||
|
||||
@ -116,7 +116,7 @@ class TestAttachVolume(cloudstackTestCase):
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
cls.disk_offering = DiskOffering.create(
|
||||
cls.api_client,
|
||||
@ -381,7 +381,7 @@ class TestAttachDetachVolume(cloudstackTestCase):
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
cls.disk_offering = DiskOffering.create(
|
||||
cls.api_client,
|
||||
@ -614,7 +614,7 @@ class TestAttachVolumeISO(cloudstackTestCase):
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
cls.disk_offering = DiskOffering.create(
|
||||
cls.api_client,
|
||||
@ -832,7 +832,7 @@ class TestVolumes(cloudstackTestCase):
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
cls.disk_offering = DiskOffering.create(
|
||||
cls.api_client,
|
||||
@ -1149,7 +1149,7 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase):
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
cls.disk_offering = DiskOffering.create(
|
||||
cls.api_client,
|
||||
@ -1287,7 +1287,7 @@ class TestMigrateVolume(cloudstackTestCase):
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
if cls.hypervisor.lower() == 'lxc':
|
||||
if not find_storage_pool_type(cls.apiclient, storagetype='rbd'):
|
||||
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
|
||||
raise unittest.SkipTest("RBD storage type is required for data volumes for LXC")
|
||||
cls.disk_offering = DiskOffering.create(
|
||||
cls.api_client,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user