mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	CLOUDSTACK-8161: added skips for the tests which are not supported on LXC:
1. snapshot related 2. template create from volume. 3. VM create from ISO. 4. Data volume related operations on a non RBD storage. Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
		
							parent
							
								
									5f16bf746b
								
							
						
					
					
						commit
						3eb5c76911
					
				| @ -139,6 +139,9 @@ class TestHighAvailability(cloudstackTestCase): | |||||||
|             cls.zone.id, |             cls.zone.id, | ||||||
|             cls.services["ostype"] |             cls.services["ostype"] | ||||||
|         ) |         ) | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|         cls.services["virtual_machine"]["zoneid"] = cls.zone.id |         cls.services["virtual_machine"]["zoneid"] = cls.zone.id | ||||||
|         cls.services["virtual_machine"]["template"] = cls.template.id |         cls.services["virtual_machine"]["template"] = cls.template.id | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -102,6 +102,9 @@ class TestHostHighAvailability(cloudstackTestCase): | |||||||
|             cls.zone.id, |             cls.zone.id, | ||||||
|             cls.services["ostype"] |             cls.services["ostype"] | ||||||
|         ) |         ) | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         clusterWithSufficientHosts = None |         clusterWithSufficientHosts = None | ||||||
|  | |||||||
| @ -212,6 +212,9 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): | |||||||
|                             cls.zone.id, |                             cls.zone.id, | ||||||
|                             cls.services["ostype"] |                             cls.services["ostype"] | ||||||
|                             ) |                             ) | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|         cls.services["virtual_machine"]["zoneid"] = cls.zone.id |         cls.services["virtual_machine"]["zoneid"] = cls.zone.id | ||||||
|         cls.services["virtual_machine"]["template"] = cls.template.id |         cls.services["virtual_machine"]["template"] = cls.template.id | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -47,6 +47,9 @@ class TestSnapshotList(cloudstackTestCase): | |||||||
|         cls.testclient = super(TestSnapshotList, cls).getClsTestClient() |         cls.testclient = super(TestSnapshotList, cls).getClsTestClient() | ||||||
|         cls.apiclient = cls.testclient.getApiClient() |         cls.apiclient = cls.testclient.getApiClient() | ||||||
|         cls.testdata = cls.testClient.getParsedTestDataConfig() |         cls.testdata = cls.testClient.getParsedTestDataConfig() | ||||||
|  |         cls.hypervisor = cls.testclient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() == 'lxc': | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
|         cls.acldata = cls.testdata["acl"] |         cls.acldata = cls.testdata["acl"] | ||||||
| 
 | 
 | ||||||
|         cls.domain_1 = None |         cls.domain_1 = None | ||||||
|  | |||||||
| @ -2083,6 +2083,9 @@ class TestNetworksInAdvancedSG_VmOperations(cloudstackTestCase): | |||||||
| 
 | 
 | ||||||
|         #Create admin account |         #Create admin account | ||||||
| 
 | 
 | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|  | 
 | ||||||
|         hosts = Host.list(self.api_client, zoneid=self.zone.id) |         hosts = Host.list(self.api_client, zoneid=self.zone.id) | ||||||
|         self.assertEqual(validateList(hosts)[0], PASS, "hosts list validation failed, list is %s" % hosts) |         self.assertEqual(validateList(hosts)[0], PASS, "hosts list validation failed, list is %s" % hosts) | ||||||
|         if len(hosts) < 2: |         if len(hosts) < 2: | ||||||
| @ -2159,7 +2162,7 @@ class TestNetworksInAdvancedSG_VmOperations(cloudstackTestCase): | |||||||
|             name=self.services["test_34_DeployVM_in_SecondSGNetwork"]["zone"] |             name=self.services["test_34_DeployVM_in_SecondSGNetwork"]["zone"] | ||||||
|         ) |         ) | ||||||
|         status = validateList(zone_list) |         status = validateList(zone_list) | ||||||
|         self.assertEquals(status[0],PASS,"Failed to list the zones") |         self.assertEquals(status[0], PASS, "Failed to list the zones") | ||||||
|         count = 0 |         count = 0 | ||||||
|         """ |         """ | ||||||
|         In simulator environment default guest os template should be in ready state immediately after the ssvm is up. |         In simulator environment default guest os template should be in ready state immediately after the ssvm is up. | ||||||
|  | |||||||
| @ -528,6 +528,9 @@ class TestBaseImageUpdate(cloudstackTestCase): | |||||||
|         1) New root disk should be formed |         1) New root disk should be formed | ||||||
|         2) The recurring snapshot rule should be deleted |         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") | ||||||
|         vms = VirtualMachine.list( |         vms = VirtualMachine.list( | ||||||
|                                   self.apiclient, |                                   self.apiclient, | ||||||
|                                   id=self.vm_with_reset.id, |                                   id=self.vm_with_reset.id, | ||||||
|  | |||||||
| @ -742,6 +742,8 @@ class TestTemplates(cloudstackTestCase): | |||||||
|                             cls.zone.id, |                             cls.zone.id, | ||||||
|                             cls.services["ostype"] |                             cls.services["ostype"] | ||||||
|                             ) |                             ) | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|         cls.services["virtual_machine"]["zoneid"] = cls.zone.id |         cls.services["virtual_machine"]["zoneid"] = cls.zone.id | ||||||
|         cls._cleanup = [] |         cls._cleanup = [] | ||||||
|         try: |         try: | ||||||
| @ -1022,6 +1024,9 @@ class TestDataPersistency(cloudstackTestCase): | |||||||
|                             cls.zone.id, |                             cls.zone.id, | ||||||
|                             cls.services["ostype"] |                             cls.services["ostype"] | ||||||
|                             ) |                             ) | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|         cls.services["virtual_machine"]["zoneid"] = cls.zone.id |         cls.services["virtual_machine"]["zoneid"] = cls.zone.id | ||||||
| 
 | 
 | ||||||
|         #Create an account, network, VM and IP addresses |         #Create an account, network, VM and IP addresses | ||||||
|  | |||||||
| @ -281,6 +281,9 @@ class TestProjectsCPULimits(cloudstackTestCase): | |||||||
|         # 2. Deploy VM with the accounts added to the project |         # 2. Deploy VM with the accounts added to the project | ||||||
|         # 3. Migrate VM of an accounts added to the project to a new host |         # 3. Migrate VM of an accounts added to the project to a new host | ||||||
|         # 4. Resource count should list properly. |         # 4. Resource count should list properly. | ||||||
|  |         self.hypervisor = self.testClient.getHypervisorInfo() | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("vm migrate feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         project_list = Project.list(self.apiclient, id=self.project.id, listall=True) |         project_list = Project.list(self.apiclient, id=self.project.id, listall=True) | ||||||
|         self.assertIsInstance(project_list, |         self.assertIsInstance(project_list, | ||||||
|  | |||||||
| @ -41,6 +41,8 @@ class TestSnapshots(cloudstackTestCase): | |||||||
|             cls.api_client = cls.testClient.getApiClient() |             cls.api_client = cls.testClient.getApiClient() | ||||||
|             cls.services = cls.testClient.getParsedTestDataConfig() |             cls.services = cls.testClient.getParsedTestDataConfig() | ||||||
|             cls.hypervisor = cls.testClient.getHypervisorInfo() |             cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |             if cls.hypervisor.lower() == 'lxc': | ||||||
|  |                 raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
|             # Get Domain, Zone, Template |             # Get Domain, Zone, Template | ||||||
|             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()) | ||||||
|  | |||||||
| @ -45,6 +45,9 @@ class TestVolumes(cloudstackTestCase): | |||||||
|             cls.api_client = cls.testClient.getApiClient() |             cls.api_client = cls.testClient.getApiClient() | ||||||
|             cls.services = cls.testClient.getParsedTestDataConfig() |             cls.services = cls.testClient.getParsedTestDataConfig() | ||||||
|             cls.hypervisor = cls.testClient.getHypervisorInfo() |             cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |             if cls.hypervisor.lower() == 'lxc': | ||||||
|  |                 if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): | ||||||
|  |                     raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|             # Get Domain, Zone, Template |             # Get Domain, Zone, Template | ||||||
|             cls.domain = get_domain(cls.api_client) |             cls.domain = get_domain(cls.api_client) | ||||||
|             cls.zone = get_zone( |             cls.zone = get_zone( | ||||||
|  | |||||||
| @ -237,6 +237,9 @@ class TestMemoryLimits(cloudstackTestCase): | |||||||
|         # 1. Create compute offering with specified RAM & Deploy VM as root admin |         # 1. Create compute offering with specified RAM & Deploy VM as root admin | ||||||
|         # 2. List Resource count for the root admin Memory usage |         # 2. List Resource count for the root admin Memory usage | ||||||
|         # 3. Migrate vm, resource count should list properly. |         # 3. Migrate vm, resource count should list properly. | ||||||
|  |         self.hypervisor = self.testClient.getHypervisorInfo() | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("vm migrate feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         account_list = Account.list(self.apiclient, id=self.account.id) |         account_list = Account.list(self.apiclient, id=self.account.id) | ||||||
|         self.assertIsInstance(account_list, |         self.assertIsInstance(account_list, | ||||||
| @ -562,6 +565,9 @@ class TestDomainMemoryLimitsConfiguration(cloudstackTestCase): | |||||||
|         # 2. List Resource count |         # 2. List Resource count | ||||||
|         # 3. Migrate instance to another host |         # 3. Migrate instance to another host | ||||||
|         # 4. Resource count should list properly. |         # 4. Resource count should list properly. | ||||||
|  |         self.hypervisor = self.testClient.getHypervisorInfo() | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("vm migrate feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         self.debug("Setting up account and domain hierarchy") |         self.debug("Setting up account and domain hierarchy") | ||||||
|         self.setupAccounts() |         self.setupAccounts() | ||||||
|  | |||||||
| @ -98,6 +98,7 @@ class TestProjectsMemoryLimits(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.services["mode"] = cls.zone.networktype |         cls.services["mode"] = cls.zone.networktype | ||||||
| 
 | 
 | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
| @ -283,6 +284,10 @@ class TestProjectsMemoryLimits(cloudstackTestCase): | |||||||
|         # 3. Migrate VM of an accounts added to the project to a new host |         # 3. Migrate VM of an accounts added to the project to a new host | ||||||
|         # 4. Resource count should list properly. |         # 4. Resource count should list properly. | ||||||
| 
 | 
 | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("vm migrate feature is not supported on %s" % self.hypervisor.lower()) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|         self.debug("Checking memory resource count for project: %s" % self.project.name) |         self.debug("Checking memory resource count for project: %s" % self.project.name) | ||||||
|         project_list = Project.list(self.apiclient, id=self.project.id, listall=True) |         project_list = Project.list(self.apiclient, id=self.project.id, listall=True) | ||||||
|         self.debug(project_list) |         self.debug(project_list) | ||||||
|  | |||||||
| @ -43,8 +43,8 @@ from marvin.lib.common import (get_domain, | |||||||
|                                list_configurations, |                                list_configurations, | ||||||
|                                list_resource_limits, |                                list_resource_limits, | ||||||
|                                update_resource_limit, |                                update_resource_limit, | ||||||
|                                get_builtin_template_info |                                get_builtin_template_info, | ||||||
|                                ) |                                find_storage_pool_type) | ||||||
| from marvin.codes import PASS | from marvin.codes import PASS | ||||||
| import time | import time | ||||||
| 
 | 
 | ||||||
| @ -758,8 +758,8 @@ class TestResourceLimitsProject(cloudstackTestCase): | |||||||
|         # 5. Try to create another snapshot in this project. It should give |         # 5. Try to create another snapshot in this project. It should give | ||||||
|         #    user an appropriate error and an alert should be generated. |         #    user an appropriate error and an alert should be generated. | ||||||
| 
 | 
 | ||||||
|         if self.hypervisor.lower() in ['hyperv']: |         if self.hypervisor.lower() in ['hyperv', 'lxc']: | ||||||
|             raise self.skipTest("Snapshots feature is not supported on Hyper-V") |             raise self.skipTest("Snapshots feature is not supported on %s" % self.hypervisor.lower()) | ||||||
|         self.debug( |         self.debug( | ||||||
|             "Updating snapshot resource limits for project: %s" % |             "Updating snapshot resource limits for project: %s" % | ||||||
|                                         self.project.id) |                                         self.project.id) | ||||||
| @ -835,6 +835,9 @@ class TestResourceLimitsProject(cloudstackTestCase): | |||||||
|         #    an appropriate error that Volume limit is exhausted and an alert |         #    an appropriate error that Volume limit is exhausted and an alert | ||||||
|         #    should be generated. |         #    should be generated. | ||||||
| 
 | 
 | ||||||
|  |         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.project_1 = Project.create( |         self.project_1 = Project.create( | ||||||
|                          self.api_client, |                          self.api_client, | ||||||
|                          self.services["project"], |                          self.services["project"], | ||||||
|  | |||||||
| @ -548,6 +548,9 @@ class TestTemplates(cloudstackTestCase): | |||||||
|         cls.services = Services().services |         cls.services = Services().services | ||||||
|         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) |         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) | ||||||
|         cls.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("create template from volume is not supported on %s" % cls.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
|                             cls.api_client, |                             cls.api_client, | ||||||
| @ -783,6 +786,9 @@ class TestSnapshots(cloudstackTestCase): | |||||||
|         cls.services = Services().services |         cls.services = Services().services | ||||||
|         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) |         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) | ||||||
|         cls.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
|                             cls.api_client, |                             cls.api_client, | ||||||
|  | |||||||
| @ -509,6 +509,10 @@ class TestVolumeUsage(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|                                     cls.api_client, |                                     cls.api_client, | ||||||
|                                     cls.services["disk_offering"] |                                     cls.services["disk_offering"] | ||||||
| @ -1259,6 +1263,9 @@ class TestSnapshotUsage(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         template = get_template( |         template = get_template( | ||||||
|                             cls.api_client, |                             cls.api_client, | ||||||
|  | |||||||
| @ -447,6 +447,10 @@ class TestMultipleChildDomain(cloudstackTestCase): | |||||||
| 
 | 
 | ||||||
|         """ |         """ | ||||||
|         # Setting up account and domain hierarchy |         # Setting up account and domain hierarchy | ||||||
|  | 
 | ||||||
|  |         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") | ||||||
|         result = self.setupAccounts() |         result = self.setupAccounts() | ||||||
|         if result[0] == FAIL: |         if result[0] == FAIL: | ||||||
|             self.fail( |             self.fail( | ||||||
| @ -563,8 +567,8 @@ class TestMultipleChildDomain(cloudstackTestCase): | |||||||
|         # 5. Delete volume which was created from snapshot and verify primary storage |         # 5. Delete volume which was created from snapshot and verify primary storage | ||||||
|              resource count""" |              resource count""" | ||||||
| 
 | 
 | ||||||
|         if self.hypervisor.lower() in ['hyperv']: |         if self.hypervisor.lower() in ['hyperv', 'lxc']: | ||||||
|             self.skipTest("Snapshots feature is not supported on Hyper-V") |             self.skipTest("Snapshots feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         result = self.setupAccounts() |         result = self.setupAccounts() | ||||||
|         if result[0] == FAIL: |         if result[0] == FAIL: | ||||||
|  | |||||||
| @ -182,7 +182,9 @@ class TestProjectsVolumeLimits(cloudstackTestCase): | |||||||
|         #    initial primary storage count |         #    initial primary storage count | ||||||
|         # 2. List the hosts suitable for migrating the VM |         # 2. List the hosts suitable for migrating the VM | ||||||
|         # 3. Migrate the VM and verify that primary storage count of project remains same""" |         # 3. Migrate the VM and verify that primary storage count of project remains same""" | ||||||
| 
 |         self.hypervisor = self.testClient.getHypervisorInfo() | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("vm migrate feature is not supported on %s" % self.hypervisor.lower()) | ||||||
|         try: |         try: | ||||||
|             hosts = Host.list(self.apiclient,virtualmachineid=self.vm.id, |             hosts = Host.list(self.apiclient,virtualmachineid=self.vm.id, | ||||||
|                               listall=True) |                               listall=True) | ||||||
|  | |||||||
| @ -64,6 +64,8 @@ class TestResizeVolume(cloudstackTestCase): | |||||||
|         cls.resourcetypemapping = {RESOURCE_PRIMARY_STORAGE: 10, |         cls.resourcetypemapping = {RESOURCE_PRIMARY_STORAGE: 10, | ||||||
|                                    RESOURCE_SECONDARY_STORAGE: 11} |                                    RESOURCE_SECONDARY_STORAGE: 11} | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
|                             cls.api_client, |                             cls.api_client, | ||||||
|                             cls.zone.id, |                             cls.zone.id, | ||||||
|  | |||||||
| @ -139,6 +139,9 @@ class TestAccountSnapshotClean(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         template = get_template( |         template = get_template( | ||||||
|                             cls.api_client, |                             cls.api_client, | ||||||
|  | |||||||
| @ -139,6 +139,9 @@ class TestSnapshotLimit(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
|         cls._cleanup = [] |         cls._cleanup = [] | ||||||
| 
 | 
 | ||||||
|         try: |         try: | ||||||
|  | |||||||
| @ -167,6 +167,9 @@ class TestSnapshots(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
| @ -969,6 +972,9 @@ class TestCreateVMSnapshotTemplate(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
| @ -1183,6 +1189,9 @@ class TestSnapshotEvents(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         template = get_template( |         template = get_template( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|  | |||||||
| @ -133,6 +133,9 @@ class TestSnapshotOnRootVolume(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() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on %s" % cls.hypervisor.lower()) | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
|                                     cls.api_client, |                                     cls.api_client, | ||||||
|                                     cls.zone.id, |                                     cls.zone.id, | ||||||
| @ -304,8 +307,8 @@ class TestCreateSnapshot(cloudstackTestCase): | |||||||
|         cls.testClient = super(TestCreateSnapshot, cls).getClsTestClient() |         cls.testClient = super(TestCreateSnapshot, cls).getClsTestClient() | ||||||
|         cls.api_client = cls.testClient.getApiClient() |         cls.api_client = cls.testClient.getApiClient() | ||||||
|         cls.hypervisor = cls.testClient.getHypervisorInfo() |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|         if cls.hypervisor.lower() in ['hyperv']: |         if cls.hypervisor.lower() in ['hyperv', 'lxc']: | ||||||
|             raise unittest.SkipTest("Snapshots feature is not supported on Hyper-V") |             raise unittest.SkipTest("Snapshots feature is not supported on %s" % cls.hypervisor.lower()) | ||||||
|         cls.services = Services().services |         cls.services = Services().services | ||||||
|         # Get Zone, Domain and templates |         # Get Zone, Domain and templates | ||||||
|         cls.domain = get_domain(cls.api_client) |         cls.domain = get_domain(cls.api_client) | ||||||
|  | |||||||
| @ -206,8 +206,8 @@ class TestSecondaryStorageLimits(cloudstackTestCase): | |||||||
|         5. Verify that the secondary storage count of the account equals |         5. Verify that the secondary storage count of the account equals | ||||||
|            the size of the template""" |            the size of the template""" | ||||||
| 
 | 
 | ||||||
|         if self.hypervisor.lower() in ['hyperv']: |         if self.hypervisor.lower() in ['hyperv', 'lxc']: | ||||||
|             self.skipTest("Snapshots feature is not supported on Hyper-V") |             self.skipTest("Snapshots feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         response = self.setupAccount(value) |         response = self.setupAccount(value) | ||||||
|         self.assertEqual(response[0], PASS, response[1]) |         self.assertEqual(response[0], PASS, response[1]) | ||||||
|  | |||||||
| @ -242,7 +242,7 @@ class TestStorageMotion(cloudstackTestCase): | |||||||
|         # 3. Migrate volume of the vm to another pool. |         # 3. Migrate volume of the vm to another pool. | ||||||
|         # 4. Check volume is present in the new pool and is in Ready state. |         # 4. Check volume is present in the new pool and is in Ready state. | ||||||
| 
 | 
 | ||||||
|         # TODO: add test case for data volume migrate |         # TODO: add test case for data volume migrate and handle it for LXC | ||||||
| 
 | 
 | ||||||
|         list_volumes_response = list_volumes( |         list_volumes_response = list_volumes( | ||||||
|                                     self.apiclient, |                                     self.apiclient, | ||||||
|  | |||||||
| @ -39,7 +39,8 @@ from marvin.lib.base import (Tag, | |||||||
|                              Project) |                              Project) | ||||||
| from marvin.lib.common import (get_zone, | from marvin.lib.common import (get_zone, | ||||||
|                                get_domain, |                                get_domain, | ||||||
|                                get_template) |                                get_template, | ||||||
|  |                                find_storage_pool_type) | ||||||
| from marvin.codes import FAILED | from marvin.codes import FAILED | ||||||
| import time | import time | ||||||
| 
 | 
 | ||||||
| @ -949,6 +950,9 @@ class TestResourceTags(cloudstackTestCase): | |||||||
|         # 1. Create a tag on template/ISO using createTags API |         # 1. Create a tag on template/ISO using createTags API | ||||||
|         # 2. Delete above created tag using deleteTags API |         # 2. Delete above created tag using deleteTags API | ||||||
| 
 | 
 | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("template creation from volume feature is not supported on %s" % self.hypervisor.lower()) | ||||||
|  | 
 | ||||||
|         try: |         try: | ||||||
|             self.debug("Stopping the virtual machine: %s" % self.vm_1.name) |             self.debug("Stopping the virtual machine: %s" % self.vm_1.name) | ||||||
|             # Stop virtual machine |             # Stop virtual machine | ||||||
| @ -1151,6 +1155,10 @@ class TestResourceTags(cloudstackTestCase): | |||||||
|         # 1. Create a tag on volume using createTags API |         # 1. Create a tag on volume using createTags API | ||||||
|         # 2. Delete above created tag using deleteTags API |         # 2. Delete above created tag using deleteTags API | ||||||
| 
 | 
 | ||||||
|  |         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.debug("Creating volume for account: %s " % |         self.debug("Creating volume for account: %s " % | ||||||
|                    self.account.name) |                    self.account.name) | ||||||
|         volume = Volume.create( |         volume = Volume.create( | ||||||
| @ -1240,8 +1248,8 @@ class TestResourceTags(cloudstackTestCase): | |||||||
|         # 1. Create a tag on snapshot using createTags API |         # 1. Create a tag on snapshot using createTags API | ||||||
|         # 2. Delete above created tag using deleteTags API |         # 2. Delete above created tag using deleteTags API | ||||||
| 
 | 
 | ||||||
|         if self.hypervisor.lower() in ['hyperv']: |         if self.hypervisor.lower() in ['hyperv', 'lxc']: | ||||||
|             self.skipTest("Snapshots feature is not supported on Hyper-V") |             self.skipTest("Snapshots feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         self.debug("Creating snapshot on ROOT volume for VM: %s " % |         self.debug("Creating snapshot on ROOT volume for VM: %s " % | ||||||
|                    self.vm_1.name) |                    self.vm_1.name) | ||||||
| @ -1441,6 +1449,9 @@ class TestResourceTags(cloudstackTestCase): | |||||||
|         # 1. Create a tag on VM using createTags API |         # 1. Create a tag on VM using createTags API | ||||||
|         # 2. Delete above created tag using deleteTags API |         # 2. Delete above created tag using deleteTags API | ||||||
| 
 | 
 | ||||||
|  |         if self.hypervisor.lower() in ['lxc']: | ||||||
|  |             self.skipTest("vm migrate feature is not supported on %s" % self.hypervisor.lower()) | ||||||
|  | 
 | ||||||
|         vms = VirtualMachine.list( |         vms = VirtualMachine.list( | ||||||
|             self.apiclient, |             self.apiclient, | ||||||
|             id=self.vm_1.id, |             id=self.vm_1.id, | ||||||
|  | |||||||
| @ -109,7 +109,6 @@ class TestCreateTemplate(cloudstackTestCase): | |||||||
| 
 | 
 | ||||||
|     def setUp(self): |     def setUp(self): | ||||||
|         self.apiclient = self.testClient.getApiClient() |         self.apiclient = self.testClient.getApiClient() | ||||||
|         self.hypervisor = self.testClient.getHypervisorInfo()  |  | ||||||
|         self.dbclient = self.testClient.getDbConnection() |         self.dbclient = self.testClient.getDbConnection() | ||||||
|         self.cleanup = [] |         self.cleanup = [] | ||||||
|         return |         return | ||||||
| @ -133,6 +132,9 @@ class TestCreateTemplate(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|         cls.services["virtual_machine"]["zoneid"] = cls.zone.id |         cls.services["virtual_machine"]["zoneid"] = cls.zone.id | ||||||
| 
 | 
 | ||||||
|         cls.service_offering = ServiceOffering.create( |         cls.service_offering = ServiceOffering.create( | ||||||
| @ -290,6 +292,9 @@ class TestTemplates(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = cls.testClient.getHypervisorInfo() | ||||||
|  |         if cls.hypervisor.lower() in ['lxc']: | ||||||
|  |             raise unittest.SkipTest("Template creation from root volume is not supported in LXC") | ||||||
|         #populate second zone id for iso copy |         #populate second zone id for iso copy | ||||||
|         cmd = listZones.listZonesCmd() |         cmd = listZones.listZonesCmd() | ||||||
|         zones = cls.api_client.listZones(cmd) |         zones = cls.api_client.listZones(cmd) | ||||||
| @ -495,8 +500,8 @@ class TestTemplates(cloudstackTestCase): | |||||||
|         # 4. Deploy Virtual machine using this template |         # 4. Deploy Virtual machine using this template | ||||||
|         # 5. VM should be in running state |         # 5. VM should be in running state | ||||||
| 
 | 
 | ||||||
|         if self.hypervisor.lower() in ['hyperv']: |         if self.hypervisor.lower() in ['hyperv', 'lxc']: | ||||||
|             self.skipTest("Snapshots feature is not supported on Hyper-V") |             self.skipTest("Snapshots feature is not supported on %s" % self.hypervisor.lower()) | ||||||
| 
 | 
 | ||||||
|         userapiclient = self.testClient.getUserApiClient( |         userapiclient = self.testClient.getUserApiClient( | ||||||
|                                     UserName=self.account.name, |                                     UserName=self.account.name, | ||||||
|  | |||||||
| @ -492,6 +492,10 @@ class TestVolumeUsage(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
| @ -1174,6 +1178,8 @@ class TestSnapshotUsage(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         cls.services['mode'] = cls.zone.networktype | ||||||
|  |         if cls.hypervisor.lower() == 'lxc': | ||||||
|  |             raise unittest.SkipTest("snapshots are not supported on LXC") | ||||||
| 
 | 
 | ||||||
|         template = get_template( |         template = get_template( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|  | |||||||
| @ -36,7 +36,8 @@ from marvin.lib.base import (Account, | |||||||
| from marvin.lib.common import (get_domain, | from marvin.lib.common import (get_domain, | ||||||
|                                get_zone, |                                get_zone, | ||||||
|                                get_template, |                                get_template, | ||||||
|                                get_pod) |                                get_pod, | ||||||
|  |                                find_storage_pool_type) | ||||||
| from marvin.codes import PASS | from marvin.codes import PASS | ||||||
| # Import System modules | # Import System modules | ||||||
| import time | import time | ||||||
| @ -113,6 +114,10 @@ class TestAttachVolume(cloudstackTestCase): | |||||||
|         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) |         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) | ||||||
|         cls.pod = get_pod(cls.api_client, cls.zone.id) |         cls.pod = get_pod(cls.api_client, cls.zone.id) | ||||||
|         cls.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
| @ -374,6 +379,10 @@ class TestAttachDetachVolume(cloudstackTestCase): | |||||||
|         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) |         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) | ||||||
|         cls.pod = get_pod(cls.api_client, cls.zone.id) |         cls.pod = get_pod(cls.api_client, cls.zone.id) | ||||||
|         cls.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
| @ -603,6 +612,10 @@ class TestAttachVolumeISO(cloudstackTestCase): | |||||||
|         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) |         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) | ||||||
|         cls.pod = get_pod(cls.api_client, cls.zone.id) |         cls.pod = get_pod(cls.api_client, cls.zone.id) | ||||||
|         cls.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
| @ -691,6 +704,8 @@ class TestAttachVolumeISO(cloudstackTestCase): | |||||||
|         # 3. Verify that attach ISO is successful |         # 3. Verify that attach ISO is successful | ||||||
| 
 | 
 | ||||||
|         # Create 5 volumes and attach to VM |         # Create 5 volumes and attach to VM | ||||||
|  |         if self.hypervisor.lower() in ["lxc"]: | ||||||
|  |             self.skipTest("attach ISO is not supported on LXC") | ||||||
|         for i in range(self.max_data_volumes): |         for i in range(self.max_data_volumes): | ||||||
|             volume = Volume.create( |             volume = Volume.create( | ||||||
|                 self.apiclient, |                 self.apiclient, | ||||||
| @ -815,6 +830,10 @@ class TestVolumes(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
| @ -1128,6 +1147,10 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"], |             cls.services["disk_offering"], | ||||||
| @ -1262,6 +1285,10 @@ class TestMigrateVolume(cloudstackTestCase): | |||||||
|         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.services['mode'] = cls.zone.networktype |         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'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for LXC") | ||||||
|         cls.disk_offering = DiskOffering.create( |         cls.disk_offering = DiskOffering.create( | ||||||
|             cls.api_client, |             cls.api_client, | ||||||
|             cls.services["disk_offering"] |             cls.services["disk_offering"] | ||||||
|  | |||||||
| @ -126,6 +126,12 @@ class TestPathVolume(cloudstackTestCase): | |||||||
|         cls.domain = get_domain(cls.apiclient) |         cls.domain = get_domain(cls.apiclient) | ||||||
|         cls.zone = get_zone(cls.apiclient) |         cls.zone = get_zone(cls.apiclient) | ||||||
|         cls.testdata["mode"] = cls.zone.networktype |         cls.testdata["mode"] = cls.zone.networktype | ||||||
|  |         cls.hypervisor = testClient.getHypervisorInfo() | ||||||
|  |         #for LXC if the storage pool of type 'rbd' ex: ceph is not available, skip the test | ||||||
|  |         if cls.hypervisor.lower() == 'lxc': | ||||||
|  |             if not find_storage_pool_type(cls.apiclient, storagetype='rbd'): | ||||||
|  |                 raise unittest.SkipTest("RBD storage type is required for data volumes for %s" % cls.hypervisor.lower()) | ||||||
|  | 
 | ||||||
|         cls.template = get_template( |         cls.template = get_template( | ||||||
|             cls.apiclient, |             cls.apiclient, | ||||||
|             cls.zone.id, |             cls.zone.id, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user