From 7c15f148daf9ebb28a8945296db6a967fcfb19f7 Mon Sep 17 00:00:00 2001 From: Santhosh Edukulla Date: Mon, 16 Jun 2014 17:59:52 +0530 Subject: [PATCH] CLOUDSTACK-6914: Fixed the mentioned issue Signed-off-by: Abhinandan Prateek --- .../integration/smoke/test_affinity_groups.py | 2 +- .../smoke/test_deploy_vgpu_enabled_vm.py | 129 +++++------------- test/integration/smoke/test_deploy_vm.py | 8 +- .../smoke/test_deploy_vm_root_resize.py | 6 +- .../smoke/test_deploy_vm_with_userdata.py | 4 +- ...ploy_vms_with_varied_deploymentplanners.py | 6 +- test/integration/smoke/test_disk_offerings.py | 6 +- .../integration/smoke/test_global_settings.py | 2 +- .../smoke/test_guest_vlan_range.py | 2 +- test/integration/smoke/test_internal_lb.py | 2 +- test/integration/smoke/test_iso.py | 10 +- test/integration/smoke/test_loadbalance.py | 6 +- .../smoke/test_multipleips_per_nic.py | 2 +- test/integration/smoke/test_network.py | 15 +- test/integration/smoke/test_network_acl.py | 2 +- test/integration/smoke/test_nic.py | 2 +- .../smoke/test_non_contigiousvlan.py | 4 +- .../smoke/test_over_provisioning.py | 2 +- .../smoke/test_portable_publicip.py | 4 +- .../integration/smoke/test_primary_storage.py | 4 +- test/integration/smoke/test_privategw_acl.py | 2 +- .../integration/smoke/test_public_ip_range.py | 2 +- test/integration/smoke/test_pvlan.py | 2 +- test/integration/smoke/test_regions.py | 2 +- .../smoke/test_reset_vm_on_reboot.py | 2 +- .../integration/smoke/test_resource_detail.py | 2 +- test/integration/smoke/test_routers.py | 21 ++- test/integration/smoke/test_scale_vm.py | 3 +- .../smoke/test_secondary_storage.py | 4 +- .../smoke/test_service_offerings.py | 8 +- test/integration/smoke/test_snapshots.py | 3 +- test/integration/smoke/test_ssvm.py | 20 +-- test/integration/smoke/test_templates.py | 16 +-- test/integration/smoke/test_vm_ha.py | 2 +- test/integration/smoke/test_vm_life_cycle.py | 24 ++-- test/integration/smoke/test_vm_snapshots.py | 6 +- test/integration/smoke/test_volumes.py | 18 +-- test/integration/smoke/test_vpc_vpn.py | 5 +- tools/marvin/marvin/config/test_data.py | 68 +++++++++ 39 files changed, 214 insertions(+), 214 deletions(-) diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py index bb0a524591d..c1c5d5b8e38 100644 --- a/test/integration/smoke/test_affinity_groups.py +++ b/test/integration/smoke/test_affinity_groups.py @@ -75,7 +75,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase): ] return - @attr(tags=["simulator", "basic", "advanced", "multihost", "selfservice"]) + @attr(tags=["basic", "advanced", "multihost"], required_hardware="false") def test_DeployVmAntiAffinityGroup(self): """ test DeployVM in anti-affinity groups diff --git a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py index 13fad61d856..13c1e5e11fe 100644 --- a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py +++ b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py @@ -18,7 +18,7 @@ #Test from the Marvin - Testing in Python wiki #All tests inherit from cloudstackTestCase -from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackTestCase import cloudstackTestCase, unittest #Import Integration Libraries @@ -29,121 +29,56 @@ from marvin.lib.base import Account, VirtualMachine, ServiceOffering from marvin.lib.utils import cleanup_resources #common - commonly used methods for all tests are listed here -from marvin.lib.common import get_zone, get_domain, get_template +from marvin.lib.common import get_zone, get_domain, get_template, list_hosts -from marvin.codes import FAILED +from marvin.sshClient import SshClient + +from marvin.codes import FAILED, XEN_SERVER from nose.plugins.attrib import attr - -class Services: - """Test VM Life Cycle Services - """ - - def __init__(self): - self.services = { - "disk_offering":{ - "displaytext": "Small", - "name": "Small", - "disksize": 1 - }, - "account": { - "email": "test@test.com", - "firstname": "Test", - "lastname": "User", - "username": "test", - # Random characters are appended in create account to - # ensure unique username generated each time - "password": "password", - }, - "vgpu260q": # Create a virtual machine instance with vgpu type as 260q - { - "displayname": "testserver", - "username": "root", # VM creds for SSH - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP', - }, - "vgpu140q": # Create a virtual machine instance with vgpu type as 140q - { - "displayname": "testserver", - "username": "root", - "password": "password", - "ssh_port": 22, - "hypervisor": 'XenServer', - "privateport": 22, - "publicport": 22, - "protocol": 'TCP', - }, - "service_offerings": - { - "vgpu260qwin": - { - "name": "Windows Instance with vGPU260Q", - "displaytext": "Windows Instance with vGPU260Q", - "cpunumber": 2, - "cpuspeed": 1600, # in MHz - "memory": 3072, # In MBs - }, - "vgpu140qwin": - { - # Small service offering ID to for change VM - # service offering from medium to small - "name": "Windows Instance with vGPU140Q", - "displaytext": "Windows Instance with vGPU140Q", - "cpunumber": 2, - "cpuspeed": 1600, - "memory": 3072, - } - }, - "diskdevice": ['/dev/vdc', '/dev/vdb', '/dev/hdb', '/dev/hdc', '/dev/xvdd', '/dev/cdrom', '/dev/sr0', '/dev/cdrom1' ], - # Disk device where ISO is attached to instance - "mount_dir": "/mnt/tmp", - "sleep": 60, - "timeout": 10, - #Migrate VM to hostid - "ostype": 'Windows 7 (32-bit)', - # CentOS 5.3 (64-bit) - } - - class TestDeployvGPUenabledVM(cloudstackTestCase): - """Test deploy a vGPU enabled VM into a user account """ + Test deploy a vGPU enabled VM into a user account + """ + @classmethod + def setUpClass(cls): + testClient = super(TestDeployvGPUenabledVM, cls).getClsTestClient() + #Need to add check whether zone containing the xen hypervisor or not as well + hypervisor = testClient.getHypervisorInfo() + if hypervisor.lower() != XEN_SERVER.lower(): + raise unittest.skipTest("GPU feature is supported only on XenServer") + def setUp(self): - self.services = Services().services + self.testdata = self.testClient.getParsedTestDataConfig()["vgpu"] self.apiclient = self.testClient.getApiClient() # Get Zone, Domain and Default Built-in template self.domain = get_domain(self.apiclient) self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests()) - self.services["mode"] = self.zone.networktype + self.testdata["mode"] = self.zone.networktype # Before running this test, register a windows template with ostype as 'Windows 7 (32-bit)' - self.services["ostype"] = 'Windows 7 (32-bit)' - self.template = get_template(self.apiclient, self.zone.id, self.services["ostype"]) + self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"]) if self.template == FAILED: - assert False, "get_template() failed to return template with description %s" % self.services["ostype"] + assert False, "get_template() failed to return template with description %s" % self.testdata["ostype"] #create a user account self.account = Account.create( self.apiclient, - self.services["account"], + self.testdata["account"], domainid=self.domain.id ) - self.services["vgpu260q"]["zoneid"] = self.zone.id - self.services["vgpu260q"]["template"] = self.template.id + self.testdata["vgpu260q"]["zoneid"] = self.zone.id + self.testdata["vgpu260q"]["template"] = self.template.id - self.services["vgpu140q"]["zoneid"] = self.zone.id - self.services["vgpu140q"]["template"] = self.template.id + self.testdata["vgpu140q"]["zoneid"] = self.zone.id + self.testdata["vgpu140q"]["template"] = self.template.id #create a service offering self.service_offering = ServiceOffering.create( self.apiclient, - self.services["service_offerings"]["vgpu260qwin"], + self.testdata["service_offerings"]["vgpu260qwin"], serviceofferingdetails={'pciDevice': 'VGPU'} ) #build cleanup list @@ -152,7 +87,7 @@ class TestDeployvGPUenabledVM(cloudstackTestCase): self.account ] - @attr(tags = ['advanced', 'simulator', 'basic', 'vgpu', 'provisioning']) + @attr(tags = ['advanced', 'basic', 'vgpu'], required_hardware="true", BugId="CLOUDSTACK-6876") def test_deploy_vgpu_enabled_vm(self): """Test Deploy Virtual Machine @@ -163,11 +98,11 @@ class TestDeployvGPUenabledVM(cloudstackTestCase): """ self.virtual_machine = VirtualMachine.create( self.apiclient, - self.services["vgpu260q"], + self.testdata["vgpu260q"], accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, - mode=self.services['mode'] + mode=self.testdata['mode'] ) list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id) @@ -204,13 +139,13 @@ class TestDeployvGPUenabledVM(cloudstackTestCase): "Running", msg="VM is not in Running state" ) - list_hosts = list_hosts( + hosts = list_hosts( self.apiclient, id=vm.hostid ) - hostip = list_hosts[0].ipaddress + hostip = hosts[0].ipaddress try: - sshClient = SshClient(host=hostip, port=22, user='root',passwd=self.services["host_password"]) + sshClient = SshClient(host=hostip, port=22, user='root',passwd=self.testdata["host_password"]) res = sshClient.execute("xe vgpu-list vm-name-label=%s params=type-uuid %s" % ( vm.instancename )) @@ -230,4 +165,4 @@ class TestDeployvGPUenabledVM(cloudstackTestCase): try: cleanup_resources(self.apiclient, self.cleanup) except Exception as e: - self.debug("Warning! Exception in tearDown: %s" % e) \ No newline at end of file + self.debug("Warning! Exception in tearDown: %s" % e) diff --git a/test/integration/smoke/test_deploy_vm.py b/test/integration/smoke/test_deploy_vm.py index 87e00115769..0750287c6b7 100644 --- a/test/integration/smoke/test_deploy_vm.py +++ b/test/integration/smoke/test_deploy_vm.py @@ -69,7 +69,7 @@ class TestDeployVM(cloudstackTestCase): self.account ] - @attr(tags = ['advanced', 'simulator', 'basic', 'sg', 'selfservice']) + @attr(tags = ['advanced'], BugId="CLOUDSTACK-6873", required_hardware="false") def test_deploy_vm(self): """Test Deploy Virtual Machine @@ -112,7 +112,7 @@ class TestDeployVM(cloudstackTestCase): msg="VM is not in Running state" ) - @attr(tags = ['advanced', 'simulator', 'basic', 'sg', 'selfservice']) + @attr(tags = ['advanced','basic','sg'], BugId="CLOUDSTACK-6873", required_hardware="false") def test_deploy_vm_multiple(self): """Test Multiple Deploy Virtual Machine @@ -207,7 +207,7 @@ class TestDeployVMVolumeCreationFailure(cloudstackTestCase): self.mock_volume_failure ] - @attr(tags = ['selfservice']) + @attr(tags = ['advanced'], BugId="CLOUDSTACK-6873", required_hardware="false") def test_deploy_vm_volume_creation_failure(self): """Test Deploy Virtual Machine - volume creation failure and retry @@ -318,7 +318,7 @@ class TestDeployVMStartFailure(cloudstackTestCase): self.mock_start_failure ] - @attr(tags = ['selfservice']) + @attr(tags = ['advanced'], BugId="CLOUDSTACK-6873", required_hardware="false") def test_deploy_vm_start_failure(self): """Test Deploy Virtual Machine - start operation failure and retry diff --git a/test/integration/smoke/test_deploy_vm_root_resize.py b/test/integration/smoke/test_deploy_vm_root_resize.py index 8097d087b7a..051265fc8e3 100644 --- a/test/integration/smoke/test_deploy_vm_root_resize.py +++ b/test/integration/smoke/test_deploy_vm_root_resize.py @@ -103,7 +103,7 @@ class TestDeployVM(cloudstackTestCase): self.account ] - @attr(tags = ['advanced', 'simulator', 'basic', 'sg', 'provisioning']) + @attr(tags = ['advanced', 'basic', 'sg'], required_hardware="true") def test_00_deploy_vm_root_resize(self): """Test deploy virtual machine with root resize @@ -202,7 +202,7 @@ class TestDeployVM(cloudstackTestCase): self.assertEqual(success, True, "Check if unsupported hypervisor %s fails appropriately" % self.hypervisor) - @attr(tags = ['advanced', 'simulator', 'basic', 'sg', 'provisioning']) + @attr(tags = ['advanced', 'basic', 'sg'], required_hardware="true") def test_01_deploy_vm_root_resize(self): """Test proper failure to deploy virtual machine with rootdisksize of 0 """ @@ -230,7 +230,7 @@ class TestDeployVM(cloudstackTestCase): else: self.debug("test 01 does not support hypervisor type " + self.hypervisor); - @attr(tags = ['advanced', 'simulator', 'basic', 'sg', 'provisioning']) + @attr(tags = ['advanced', 'basic', 'sg'], required_hardware="true") def test_02_deploy_vm_root_resize(self): """Test proper failure to deploy virtual machine with rootdisksize less than template size """ diff --git a/test/integration/smoke/test_deploy_vm_with_userdata.py b/test/integration/smoke/test_deploy_vm_with_userdata.py index 7616b82d4be..c98b38aac0b 100644 --- a/test/integration/smoke/test_deploy_vm_with_userdata.py +++ b/test/integration/smoke/test_deploy_vm_with_userdata.py @@ -70,7 +70,7 @@ class TestDeployVmWithUserData(cloudstackTestCase): def setup(self): self.hypervisor = self.testClient.getHypervisorInfo() - @attr(tags=["simulator", "devcloud", "basic", "advanced", "post", "provisioning"]) + @attr(tags=["devcloud", "basic", "advanced", "post"], required_hardware="true") def test_deployvm_userdata_post(self): """Test userdata as POST, size > 2k """ @@ -95,7 +95,7 @@ class TestDeployVmWithUserData(cloudstackTestCase): self.assert_(vm.id == str(deployVmResponse.id), "Vm deployed is different from the test") self.assert_(vm.state == "Running", "VM is not in Running state") - @attr(tags=["simulator", "devcloud", "basic", "advanced", "provisioning"]) + @attr(tags=["devcloud", "basic", "advanced"], required_hardware="true") def test_deployvm_userdata(self): """Test userdata as GET, size > 2k """ diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py index 420925e3781..9fcb6431c1d 100644 --- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py +++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py @@ -60,7 +60,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): cls.account ] - @attr(tags=["simulator", "advanced", "basic", "sg", "selfservice"]) + @attr(tags=["advanced", "basic", "sg"], required_hardware="false") def test_deployvm_firstfit(self): """Test to deploy vm with a first fit offering """ @@ -104,7 +104,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): msg="VM is not in Running state" ) - @attr(tags=["simulator", "advanced", "basic", "sg", "selfservice"]) + @attr(tags=["advanced", "basic", "sg"], required_hardware="false") def test_deployvm_userdispersing(self): """Test deploy VMs using user dispersion planner """ @@ -163,7 +163,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase): self.debug("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", "selfservice"]) + @attr(tags=["advanced", "basic", "sg"], required_hardware="false") def test_deployvm_userconcentrated(self): """Test deploy VMs using user concentrated planner """ diff --git a/test/integration/smoke/test_disk_offerings.py b/test/integration/smoke/test_disk_offerings.py index 780c1542703..bf89ee3ef29 100644 --- a/test/integration/smoke/test_disk_offerings.py +++ b/test/integration/smoke/test_disk_offerings.py @@ -45,7 +45,7 @@ class TestCreateDiskOffering(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "simulator", "smoke", "selfservice"]) + @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke"], required_hardware="false") def test_01_create_disk_offering(self): """Test to create disk offering @@ -213,7 +213,7 @@ class TestDiskOfferings(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "simulator", "smoke", "selfservice"]) + @attr(tags=["advanced", "basic", "eip", "sg", "advancedns", "smoke"], required_hardware="false") def test_02_edit_disk_offering(self): """Test to update existing disk offering @@ -265,7 +265,7 @@ class TestDiskOfferings(cloudstackTestCase): ) return - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "simulator", "smoke", "selfservice"]) + @attr(tags=["advanced", "basic", "eip", "sg", "advancedns", "smoke"], required_hardware="false") def test_03_delete_disk_offering(self): """Test to delete disk offering diff --git a/test/integration/smoke/test_global_settings.py b/test/integration/smoke/test_global_settings.py index ace2db31917..4920421adf7 100644 --- a/test/integration/smoke/test_global_settings.py +++ b/test/integration/smoke/test_global_settings.py @@ -32,7 +32,7 @@ class TestUpdateConfigWithScope(cloudstackTestCase): def setUp(self): self.apiClient = self.testClient.getApiClient() - @attr(tags=["simulator", "devcloud", "basic", "advanced", "selfservice"]) + @attr(tags=["devcloud", "basic", "advanced"], required_hardware="false") def test_UpdateConfigParamWithScope(self): """ test update configuration setting at zone level scope diff --git a/test/integration/smoke/test_guest_vlan_range.py b/test/integration/smoke/test_guest_vlan_range.py index f5bcdf4c6ef..000d71ef01f 100644 --- a/test/integration/smoke/test_guest_vlan_range.py +++ b/test/integration/smoke/test_guest_vlan_range.py @@ -78,7 +78,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags=["simulator", "advanced", "guestvlanrange", "dedicate", "release", "selfservice"],BugId="CLOUDSTACK-6738") + @attr(tags=["advanced", "guestvlanrange", "dedicate", "release"], BugId="CLOUDSTACK-6738", required_hardware="false") def test_dedicateGuestVlanRange(self): """Test guest vlan range dedication """ diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py index d6f34775956..d2e6364ad2f 100644 --- a/test/integration/smoke/test_internal_lb.py +++ b/test/integration/smoke/test_internal_lb.py @@ -56,7 +56,7 @@ class TestInternalLb(cloudstackTestCase): cls.account.id)) cls.cleanup = [cls.account] - @attr(tags=["smoke", "advanced", "provisioning"]) + @attr(tags=["smoke", "advanced"], required_hardware="true") def test_internallb(self): """Test create, delete, assign, remove of internal loadbalancer """ diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index 6741633c0ec..3498ad737ec 100644 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -75,7 +75,7 @@ class TestCreateIso(cloudstackTestCase): return - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns"], required_hardware="false") def test_01_create_iso(self): """Test create public & private ISO """ @@ -229,7 +229,7 @@ class TestISO(cloudstackTestCase): return - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke"], required_hardware="false") def test_02_edit_iso(self): """Test Edit ISO """ @@ -294,7 +294,7 @@ class TestISO(cloudstackTestCase): ) return - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns"], required_hardware="false") def test_03_delete_iso(self): """Test delete ISO """ @@ -321,8 +321,8 @@ class TestISO(cloudstackTestCase): "Check if ISO exists in ListIsos" ) return - - @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke", "provisioning"]) + + @attr(tags = ["advanced", "basic", "eip", "sg", "advancedns"], required_hardware="true") def test_04_extract_Iso(self): "Test for extract ISO" diff --git a/test/integration/smoke/test_loadbalance.py b/test/integration/smoke/test_loadbalance.py index daa5fee3d25..f6629743630 100644 --- a/test/integration/smoke/test_loadbalance.py +++ b/test/integration/smoke/test_loadbalance.py @@ -143,7 +143,7 @@ class TestLoadBalance(cloudstackTestCase): time.sleep(10) return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_01_create_lb_rule_src_nat(self): """Test to create Load balancing rule with source NAT""" @@ -303,7 +303,7 @@ class TestLoadBalance(cloudstackTestCase): self.try_ssh(src_nat_ip_addr.ipaddress, hostnames) return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_02_create_lb_rule_non_nat(self): """Test to create Load balancing rule with non source NAT""" @@ -421,7 +421,7 @@ class TestLoadBalance(cloudstackTestCase): self.try_ssh(self.non_src_nat_ip.ipaddress.ipaddress, hostnames) return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_assign_and_removal_lb(self): """Test for assign & removing load balancing rule""" diff --git a/test/integration/smoke/test_multipleips_per_nic.py b/test/integration/smoke/test_multipleips_per_nic.py index ad3a3cf2e0e..40933564174 100644 --- a/test/integration/smoke/test_multipleips_per_nic.py +++ b/test/integration/smoke/test_multipleips_per_nic.py @@ -122,7 +122,7 @@ class TestDeployVM(cloudstackTestCase): msg="VM is not in Running state" ) - @attr(tags = ['advanced', 'simulator', 'basic', "provisioning"]) + @attr(tags = ['advanced', 'basic'], required_hardware="false") def test_nic_secondaryip_add_remove(self): #TODO: SIMENH: add verification list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id) diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 52efc32e0f2..ea1677bcc8f 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -115,7 +115,8 @@ class TestPublicIP(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_public_ip_admin_account(self): """Test for Associate/Disassociate public IP address for admin account""" @@ -171,7 +172,7 @@ class TestPublicIP(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_public_ip_user_account(self): """Test for Associate/Disassociate public IP address for user account""" @@ -284,7 +285,7 @@ class TestPortForwarding(cloudstackTestCase): cleanup_resources(self.apiclient, self.cleanup) return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_01_port_fwd_on_src_nat(self): """Test for port forwarding on source NAT""" @@ -411,7 +412,7 @@ class TestPortForwarding(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_02_port_fwd_on_non_src_nat(self): """Test for port forwarding on non source NAT""" @@ -623,7 +624,7 @@ class TestRebootRouter(cloudstackTestCase): ] return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_reboot_router(self): """Test for reboot router""" @@ -778,7 +779,7 @@ class TestReleaseIP(cloudstackTestCase): def tearDown(self): cleanup_resources(self.apiclient, self.cleanup) - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_releaseIP(self): """Test for release public IP address""" @@ -903,7 +904,7 @@ class TestDeleteAccount(cloudstackTestCase): self.cleanup = [] return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_delete_account(self): """Test for delete account""" diff --git a/test/integration/smoke/test_network_acl.py b/test/integration/smoke/test_network_acl.py index 68e5067da8f..015ebabba95 100644 --- a/test/integration/smoke/test_network_acl.py +++ b/test/integration/smoke/test_network_acl.py @@ -54,7 +54,7 @@ class TestNetworkACL(cloudstackTestCase): cls.account.id)) cls.cleanup = [cls.account] - @attr(tags=["advanced", "provisioning"]) + @attr(tags=["advanced"], required_hardware="true") def test_network_acl(self): #TODO: SIMENH: add actual verification Logic for rules. """Test network ACL lists and items in VPC""" diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py index 592a8391a01..dd6de96233f 100644 --- a/test/integration/smoke/test_nic.py +++ b/test/integration/smoke/test_nic.py @@ -119,7 +119,7 @@ class TestNic(cloudstackTestCase): except Exception as ex: self.debug("Exception during NIC test SETUP!: " + str(ex)) - @attr(tags = ["devcloud", "smoke", "advanced", "advancedns", "provisioning"]) + @attr(tags = ["devcloud", "smoke", "advanced", "advancedns"], required_hardware="true") def test_01_nic(self): #TODO: SIMENH: add validation """Test to add and update added nic to a virtual machine""" diff --git a/test/integration/smoke/test_non_contigiousvlan.py b/test/integration/smoke/test_non_contigiousvlan.py index 50b48d092cd..7469829d23f 100644 --- a/test/integration/smoke/test_non_contigiousvlan.py +++ b/test/integration/smoke/test_non_contigiousvlan.py @@ -21,7 +21,7 @@ from marvin.lib.base import PhysicalNetwork from marvin.lib.common import setNonContiguousVlanIds, get_zone from nose.plugins.attrib import attr -@attr(tags = ["simulator", "advanced", "selfservice"], BugId="CLOUDSTACK-6776") + class TestUpdatePhysicalNetwork(cloudstackTestCase): """ Test to extend physical network vlan range @@ -38,7 +38,7 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase): raise Exception("Failed to set non contiguous vlan ids to test. Free some ids from \ from existing physical networks at ends") - + @attr(tags = ["advanced"], BugId="CLOUDSTACK-6776", required_hardware="false") def test_extendPhysicalNetworkVlan(self): """ Test to update a physical network and extend its vlan diff --git a/test/integration/smoke/test_over_provisioning.py b/test/integration/smoke/test_over_provisioning.py index 1c5d8a520f6..43d558e6715 100644 --- a/test/integration/smoke/test_over_provisioning.py +++ b/test/integration/smoke/test_over_provisioning.py @@ -32,7 +32,7 @@ class TestUpdateOverProvision(cloudstackTestCase): def setUp(self): self.apiClient = self.testClient.getApiClient() - @attr(tags=["simulator", "devcloud", "basic", "advanced", "selfservice"]) + @attr(tags=["devcloud", "basic", "advanced"], required_hardware="false") def test_UpdateStorageOverProvisioningFactor(self): """ test update configuration setting at storage scope diff --git a/test/integration/smoke/test_portable_publicip.py b/test/integration/smoke/test_portable_publicip.py index 2d02a7114e5..be37773484f 100644 --- a/test/integration/smoke/test_portable_publicip.py +++ b/test/integration/smoke/test_portable_publicip.py @@ -75,7 +75,7 @@ class TestPortablePublicIPRange(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["simulator", "basic", "advanced", "portablepublicip", "selfservice"]) + @attr(tags = ["basic", "advanced", "portablepublicip"], required_hardware="false") def test_createPortablePublicIPRange(self): """ Test to create a portable public ip range """ @@ -161,7 +161,7 @@ class TestPortablePublicIPAcquire(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["simulator", "advanced", "portablepublicip", "selfservice"]) + @attr(tags = ["advanced", "portablepublicip"], required_hardware="false") def test_createPortablePublicIPAcquire(self): """ Test to acquire a provisioned public ip range """ diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py index 3147d86645f..2904d02fdf9 100644 --- a/test/integration/smoke/test_primary_storage.py +++ b/test/integration/smoke/test_primary_storage.py @@ -51,7 +51,7 @@ class TestPrimaryStorageServices(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_01_primary_storage_nfs(self): """Test primary storage pools - XEN, KVM, VMWare """ @@ -144,7 +144,7 @@ class TestPrimaryStorageServices(cloudstackTestCase): return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_01_primary_storage_iscsi(self): """Test primary storage pools - XEN, KVM, VMWare """ diff --git a/test/integration/smoke/test_privategw_acl.py b/test/integration/smoke/test_privategw_acl.py index c86beb1ecf1..cf0f8e338cf 100644 --- a/test/integration/smoke/test_privategw_acl.py +++ b/test/integration/smoke/test_privategw_acl.py @@ -39,7 +39,7 @@ class TestPrivateGwACL(cloudstackTestCase): self.privateGwId = None - @attr(tags=["advanced", "selfservice"]) + @attr(tags=["advanced"], required_hardware="false") def test_privategw_acl(self): #TODO: SIMENH: add a new test to verification of ACL rules diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py index b961dc34773..e09f7b43b5d 100644 --- a/test/integration/smoke/test_public_ip_range.py +++ b/test/integration/smoke/test_public_ip_range.py @@ -72,7 +72,7 @@ class TestDedicatePublicIPRange(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["simulator", "advanced", "publiciprange", "dedicate", "release", "selfservice"]) + @attr(tags = ["advanced", "publiciprange", "dedicate", "release"], required_hardware="false") def test_dedicatePublicIpRange(self): """Test public IP range dedication """ diff --git a/test/integration/smoke/test_pvlan.py b/test/integration/smoke/test_pvlan.py index 7d1aa5d10ae..149a310c097 100644 --- a/test/integration/smoke/test_pvlan.py +++ b/test/integration/smoke/test_pvlan.py @@ -41,7 +41,7 @@ class TestPVLAN(cloudstackTestCase): def setUp(self): self.apiClient = self.testClient.getApiClient() - @attr(tags = ["advanced", "selfservice"]) + @attr(tags = ["advanced"], required_hardware="false") def test_create_pvlan_network(self): self.debug("Test create pvlan network") createNetworkCmd = createNetwork.createNetworkCmd() diff --git a/test/integration/smoke/test_regions.py b/test/integration/smoke/test_regions.py index 389f8787563..7b0dec3c6ee 100644 --- a/test/integration/smoke/test_regions.py +++ b/test/integration/smoke/test_regions.py @@ -35,7 +35,7 @@ class TestRegions(cloudstackTestCase): cls.domain = get_domain(cls.apiclient) cls.cleanup = [] - @attr(tags=["simulator", "basic", "advanced", "selfservice"]) + @attr(tags=["basic", "advanced"], required_hardware="false") def test_createRegion(self): """ Test for create region """ diff --git a/test/integration/smoke/test_reset_vm_on_reboot.py b/test/integration/smoke/test_reset_vm_on_reboot.py index 4709df4d093..668c77fa7df 100644 --- a/test/integration/smoke/test_reset_vm_on_reboot.py +++ b/test/integration/smoke/test_reset_vm_on_reboot.py @@ -96,7 +96,7 @@ class TestResetVmOnReboot(cloudstackTestCase): return @attr(hypervisor="xenserver") - @attr(tags=["advanced", "basic", "selfservice"]) + @attr(tags=["advanced", "basic"], required_hardware="false") def test_01_reset_vm_on_reboot(self): #TODO: SIMENH: add new test to check volume contents """Test reset virtual machine on reboot diff --git a/test/integration/smoke/test_resource_detail.py b/test/integration/smoke/test_resource_detail.py index 7f4a6e76869..7103c652613 100644 --- a/test/integration/smoke/test_resource_detail.py +++ b/test/integration/smoke/test_resource_detail.py @@ -89,7 +89,7 @@ class TestResourceDetail(cloudstackTestCase): cleanup_resources(self.apiclient, self.cleanup) return - @attr(tags = ["advanced", "xenserver", "selfservice"]) + @attr(tags = ["advanced", "xenserver"], required_hardware="false") def test_01_updatevolumedetail(self): """Test volume detail """ diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index 2aa83c32c6a..f5cc9a5394a 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -98,7 +98,7 @@ class TestRouterServices(cloudstackTestCase): self.hypervisor = self.testClient.getHypervisorInfo() return - @attr(tags = ["advanced", "basic", "sg", "smoke", "provisioning"]) + @attr(tags = ["advanced", "basic", "sg", "smoke"], required_hardware="true") def test_01_router_internal_basic(self): """Test router internal basic zone """ @@ -183,10 +183,7 @@ class TestRouterServices(cloudstackTestCase): return - - - - @attr(tags = ["advanced", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns"], required_hardware="false") def test_02_router_internal_adv(self): """Test router internal advanced zone """ @@ -294,7 +291,7 @@ class TestRouterServices(cloudstackTestCase): self.debug("Haproxy process status: %s" % res) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_03_restart_network_cleanup(self): """Test restart network """ @@ -372,7 +369,7 @@ class TestRouterServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_04_restart_network_wo_cleanup(self): """Test restart network without cleanup """ @@ -488,7 +485,7 @@ class TestRouterServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_05_router_basic(self): """Test router basic setup """ @@ -554,7 +551,7 @@ class TestRouterServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_06_router_advanced(self): """Test router advanced setup """ @@ -637,7 +634,7 @@ class TestRouterServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_07_stop_router(self): """Test stop router """ @@ -681,7 +678,7 @@ class TestRouterServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_08_start_router(self): """Test start router """ @@ -726,7 +723,7 @@ class TestRouterServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_09_reboot_router(self): """Test reboot router """ diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py index f0ec5346612..cf5f6e5be56 100644 --- a/test/integration/smoke/test_scale_vm.py +++ b/test/integration/smoke/test_scale_vm.py @@ -102,8 +102,7 @@ class TestScaleVm(cloudstackTestCase): cleanup_resources(self.apiclient, self.cleanup) return - @attr(hypervisor="xenserver") - @attr(tags=["advanced", "basic", "provisioning"]) + @attr(tags=["advanced", "basic"], required_hardware="true") def test_01_scale_vm(self): """Test scale virtual machine """ diff --git a/test/integration/smoke/test_secondary_storage.py b/test/integration/smoke/test_secondary_storage.py index 90304b357cb..1a24239951b 100644 --- a/test/integration/smoke/test_secondary_storage.py +++ b/test/integration/smoke/test_secondary_storage.py @@ -81,7 +81,7 @@ class TestSecStorageServices(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "eip", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "eip", "sg"], required_hardware="false") def test_01_sys_vm_start(self): """Test system VM start """ @@ -160,7 +160,7 @@ class TestSecStorageServices(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "eip", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "eip", "sg"], required_hardware="false") def test_02_sys_template_ready(self): """Test system templates are ready """ diff --git a/test/integration/smoke/test_service_offerings.py b/test/integration/smoke/test_service_offerings.py index 980e11017b1..e390f75572e 100644 --- a/test/integration/smoke/test_service_offerings.py +++ b/test/integration/smoke/test_service_offerings.py @@ -54,7 +54,7 @@ class TestCreateServiceOffering(cloudstackTestCase): return - @attr(tags=["advanced", "advancedns", "smoke", "basic", "eip", "sg", "selfservice"]) + @attr(tags=["advanced", "advancedns", "smoke", "basic", "eip", "sg"], required_hardware="false") def test_01_create_service_offering(self): """Test to create service offering""" @@ -205,7 +205,7 @@ class TestServiceOfferings(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags=["advanced", "advancedns", "smoke", "basic", "eip", "sg", "selfservice"]) + @attr(tags=["advanced", "advancedns", "smoke", "basic", "eip", "sg"], required_hardware="false") def test_02_edit_service_offering(self): """Test to update existing service offering""" @@ -256,7 +256,7 @@ class TestServiceOfferings(cloudstackTestCase): return - @attr(tags=["advanced", "advancedns", "smoke", "basic", "eip", "sg", "selfservice"]) + @attr(tags=["advanced", "advancedns", "smoke", "basic", "eip", "sg"], required_hardware="false") def test_03_delete_service_offering(self): """Test to delete service offering""" @@ -282,7 +282,7 @@ class TestServiceOfferings(cloudstackTestCase): return - @attr(tags=["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true") def test_04_change_offering_small(self): """Test to change service to a small capacity """ diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py index a960e7095b6..8b6fdd1a0f0 100644 --- a/test/integration/smoke/test_snapshots.py +++ b/test/integration/smoke/test_snapshots.py @@ -98,8 +98,7 @@ class TestSnapshotRootDisk(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(speed = "slow") - @attr(tags = ["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="true") def test_01_snapshot_root_disk(self): """Test Snapshot Root Disk """ diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py index ffa620b2db0..9b8d19d0249 100644 --- a/test/integration/smoke/test_ssvm.py +++ b/test/integration/smoke/test_ssvm.py @@ -50,7 +50,7 @@ class TestSSVMs(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_01_list_sec_storage_vm(self): """Test List secondary storage VMs """ @@ -168,7 +168,7 @@ class TestSSVMs(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_02_list_cpvm_vm(self): """Test List console proxy VMs """ @@ -280,7 +280,7 @@ class TestSSVMs(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_03_ssvm_internals(self): """Test SSVM Internals""" @@ -393,7 +393,7 @@ class TestSSVMs(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_04_cpvm_internals(self): """Test CPVM Internals""" @@ -476,7 +476,7 @@ class TestSSVMs(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_05_stop_ssvm(self): """Test stop SSVM """ @@ -552,7 +552,7 @@ class TestSSVMs(cloudstackTestCase): self.test_03_ssvm_internals() return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_06_stop_cpvm(self): """Test stop CPVM """ @@ -625,7 +625,7 @@ class TestSSVMs(cloudstackTestCase): self.test_04_cpvm_internals() return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_07_reboot_ssvm(self): """Test reboot SSVM """ @@ -711,7 +711,7 @@ class TestSSVMs(cloudstackTestCase): self.test_03_ssvm_internals() return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_08_reboot_cpvm(self): """Test reboot CPVM """ @@ -798,7 +798,7 @@ class TestSSVMs(cloudstackTestCase): self.test_04_cpvm_internals() return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_09_destroy_ssvm(self): """Test destroy SSVM """ @@ -880,7 +880,7 @@ class TestSSVMs(cloudstackTestCase): self.test_03_ssvm_internals() return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_10_destroy_cpvm(self): """Test destroy CPVM """ diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index c7594bb85df..a757c2ad1a3 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -144,7 +144,7 @@ class TestCreateTemplate(cloudstackTestCase): return - @attr(tags = ["advanced", "advancedns", "smoke", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false") def test_01_create_template(self): """Test create public & private template """ @@ -340,7 +340,7 @@ class TestTemplates(cloudstackTestCase): return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice", "test"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_02_edit_template(self): """Test Edit template """ @@ -423,7 +423,7 @@ class TestTemplates(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_03_delete_template(self): """Test delete template """ @@ -452,7 +452,7 @@ class TestTemplates(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_04_extract_template(self): "Test for extract template" @@ -503,7 +503,7 @@ class TestTemplates(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_05_template_permissions(self): """Update & Test for template permissions""" @@ -556,7 +556,7 @@ class TestTemplates(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "multizone", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "multizone"], required_hardware="true") def test_06_copy_template(self): """Test for copy template from one zone to another""" @@ -647,7 +647,7 @@ class TestTemplates(cloudstackTestCase): self.apiclient.deleteTemplate(cmd) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_07_list_public_templates(self): """Test only public templates are visible to normal user""" @@ -679,7 +679,7 @@ class TestTemplates(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_08_list_system_templates(self): """Test System templates are not visible to normal user""" diff --git a/test/integration/smoke/test_vm_ha.py b/test/integration/smoke/test_vm_ha.py index 406394635c5..279c6e36a83 100644 --- a/test/integration/smoke/test_vm_ha.py +++ b/test/integration/smoke/test_vm_ha.py @@ -145,7 +145,7 @@ class TestDeployVMHA(cloudstackTestCase): ] self.cleanup = self.cleanup + self.mock_checkonhost_list - @attr(tags = ['selfservice']) + @attr(tags = ['advanced'], required_hardware="false") def test_vm_ha(self): """Test VM HA diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py index 104b86cd6aa..82534c56b2d 100644 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -115,7 +115,7 @@ class TestDeployVM(cloudstackTestCase): self.dbclient = self.testClient.getDbConnection() - @attr(tags = ["simulator", "devcloud", "advanced", "advancedns", "smoke", "basic", "sg"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_deploy_vm(self): """Test Deploy Virtual Machine """ @@ -161,7 +161,7 @@ class TestDeployVM(cloudstackTestCase): return - @attr(tags = ["simulator", "advanced"]) + @attr(tags = ["advanced"], required_hardware="false") def test_advZoneVirtualRouter(self): #TODO: SIMENH: duplicate test, remove it """ @@ -183,8 +183,8 @@ class TestDeployVM(cloudstackTestCase): self.assertIsNotNone(router.publicip, msg="Router has no public ip") self.assertIsNotNone(router.guestipaddress, msg="Router has no guest ip") - @attr(hypervisor = ["simulator"]) - @attr(mode = ["basic"]) + + @attr(mode = ["basic"], required_hardware="false") def test_basicZoneVirtualRouter(self): #TODO: SIMENH: duplicate test, remove it """ @@ -304,7 +304,7 @@ class TestVMLifeCycle(cloudstackTestCase): return - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_01_stop_vm(self): """Test Stop Virtual Machine """ @@ -319,7 +319,7 @@ class TestVMLifeCycle(cloudstackTestCase): self.fail("Failed to stop VM: %s" % e) return - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_02_start_vm(self): """Test Start Virtual Machine """ @@ -357,7 +357,7 @@ class TestVMLifeCycle(cloudstackTestCase): ) return - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_03_reboot_vm(self): """Test Reboot Virtual Machine """ @@ -394,7 +394,7 @@ class TestVMLifeCycle(cloudstackTestCase): return - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_06_destroy_vm(self): """Test destroy Virtual Machine """ @@ -430,7 +430,7 @@ class TestVMLifeCycle(cloudstackTestCase): ) return - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_07_restore_vm(self): #TODO: SIMENH: add another test the data on the restored VM. """Test recover Virtual Machine @@ -471,7 +471,7 @@ class TestVMLifeCycle(cloudstackTestCase): return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "multihost", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "multihost"], required_hardware="false") def test_08_migrate_vm(self): """Test migrate VM """ @@ -548,7 +548,7 @@ class TestVMLifeCycle(cloudstackTestCase): @attr(configuration = "expunge.interval") @attr(configuration = "expunge.delay") - @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg", "selfservice"]) + @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false") def test_09_expunge_vm(self): """Test destroy(expunge) Virtual Machine """ @@ -593,7 +593,7 @@ class TestVMLifeCycle(cloudstackTestCase): self.assertEqual(list_vm_response,None,"Check Expunged virtual machine is in listVirtualMachines response") return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="true") def test_10_attachAndDetach_iso(self): """Test for attach and detach ISO to virtual machine""" diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py index e884d42dcfd..7b238dcb46d 100644 --- a/test/integration/smoke/test_vm_snapshots.py +++ b/test/integration/smoke/test_vm_snapshots.py @@ -100,7 +100,7 @@ class TestVmSnapshot(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags=["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true") def test_01_create_vm_snapshots(self): """Test to create VM snapshots """ @@ -144,7 +144,7 @@ class TestVmSnapshot(cloudstackTestCase): ) return - @attr(tags=["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true") def test_02_revert_vm_snapshots(self): """Test to revert VM snapshots """ @@ -231,7 +231,7 @@ class TestVmSnapshot(cloudstackTestCase): "Check the random data is equal with the ramdom file!" ) - @attr(tags=["advanced", "advancedns", "smoke", "provisioning"]) + @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true") def test_03_delete_vm_snapshots(self): """Test to delete vm snapshots """ diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index c6ea09d557e..c2f89ba6f5e 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -113,7 +113,7 @@ class TestCreateVolume(cloudstackTestCase): self.dbclient = self.testClient.getDbConnection() self.cleanup = [] - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true") def test_01_create_volume(self): """Test Volume creation for all Disk Offerings (incl. custom) """ @@ -343,7 +343,7 @@ class TestVolumes(cloudstackTestCase): cleanup_resources(self.apiClient, self.cleanup) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true") def test_02_attach_volume(self): """Attach a created Volume to a Running VM """ @@ -389,7 +389,7 @@ class TestVolumes(cloudstackTestCase): (self.virtual_machine.ipaddress, e)) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="false") def test_03_download_attached_volume(self): """Download a Volume attached to a VM """ @@ -411,7 +411,7 @@ class TestVolumes(cloudstackTestCase): with self.assertRaises(Exception): self.apiClient.extractVolume(cmd) - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="false") def test_04_delete_attached_volume(self): """Delete a Volume attached to a VM """ @@ -432,7 +432,7 @@ class TestVolumes(cloudstackTestCase): with self.assertRaises(Exception): self.apiClient.deleteVolume(cmd) - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="false") def test_05_detach_volume(self): """Detach a Volume attached to a VM """ @@ -474,7 +474,7 @@ class TestVolumes(cloudstackTestCase): ) return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true") def test_06_download_detached_volume(self): """Download a Volume unattached to an VM """ @@ -511,7 +511,7 @@ class TestVolumes(cloudstackTestCase): % (extract_vol.url, self.volume.id) ) - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true") def test_07_resize_fail(self): """Test resize (negative) non-existent volume""" # Verify the size is the new size is what we wanted it to be. @@ -625,7 +625,7 @@ class TestVolumes(cloudstackTestCase): return - @attr(tags = ["advanced", "advancedns", "smoke", "basic", "provisioning"]) + @attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true") def test_08_resize_volume(self): """Test resize a volume""" # Verify the size is the new size is what we wanted it to be. @@ -728,7 +728,7 @@ class TestVolumes(cloudstackTestCase): time.sleep(30) return - @attr(tags = ["advanced", "advancedns", "smoke","basic", "selfservice"]) + @attr(tags = ["advanced", "advancedns", "smoke","basic"], required_hardware="false") def test_09_delete_detached_volume(self): """Delete a Volume unattached to an VM """ diff --git a/test/integration/smoke/test_vpc_vpn.py b/test/integration/smoke/test_vpc_vpn.py index 03826e95def..9e8f97f61a6 100644 --- a/test/integration/smoke/test_vpc_vpn.py +++ b/test/integration/smoke/test_vpc_vpn.py @@ -52,7 +52,8 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase): cls.cleanup = [cls.account] - @attr(tags=["advanced", "selfservice"]) + + @attr(tags=["advanced"], required_hardware="false") def test_vpc_remote_access_vpn(self): """Test VPN in VPC""" @@ -159,7 +160,7 @@ class TestVpcSite2SiteVpn(cloudstackTestCase): cls.cleanup = [cls.account] - @attr(tags=["advanced", "selfservice"]) + @attr(tags=["advanced"], required_hardware="false") def test_vpc_site2site_vpn(self): """Test VPN in VPC""" diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index cfc45568b89..5607217126f 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -889,4 +889,72 @@ test_data = { "name": "hostantiaffinity", "type": "host anti-affinity", }, + "vgpu":{ + "disk_offering":{ + "displaytext": "Small", + "name": "Small", + "disksize": 1 + }, + "account": { + "email": "test@test.com", + "firstname": "Test", + "lastname": "User", + "username": "test", + # Random characters are appended in create account to + # ensure unique username generated each time + "password": "password", + }, + "vgpu260q": # Create a virtual machine instance with vgpu type as 260q + { + "displayname": "testserver", + "username": "root", # VM creds for SSH + "password": "password", + "ssh_port": 22, + "hypervisor": 'XenServer', + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', + }, + "vgpu140q": # Create a virtual machine instance with vgpu type as 140q + { + "displayname": "testserver", + "username": "root", + "password": "password", + "ssh_port": 22, + "hypervisor": 'XenServer', + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', + }, + "service_offerings": + { + "vgpu260qwin": + { + "name": "Windows Instance with vGPU260Q", + "displaytext": "Windows Instance with vGPU260Q", + "cpunumber": 2, + "cpuspeed": 1600, # in MHz + "memory": 3072, # In MBs + }, + "vgpu140qwin": + { + # Small service offering ID to for change VM + # service offering from medium to small + "name": "Windows Instance with vGPU140Q", + "displaytext": "Windows Instance with vGPU140Q", + "cpunumber": 2, + "cpuspeed": 1600, + "memory": 3072, + } + }, + "diskdevice": ['/dev/vdc', '/dev/vdb', '/dev/hdb', '/dev/hdc', '/dev/xvdd', '/dev/cdrom', '/dev/sr0', '/dev/cdrom1' ], + # Disk device where ISO is attached to instance + "mount_dir": "/mnt/tmp", + "sleep": 60, + "timeout": 10, + #Migrate VM to hostid + "ostype": 'Windows 7 (32-bit)', + # CentOS 5.3 (64-bit) + } + }