mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6282-Added hyper-v hypervisor checks for automated tests
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
parent
6dd3a91864
commit
d7dea70e89
@ -23,8 +23,7 @@ from marvin.sshClient import SshClient
|
||||
from marvin.lib.utils import *
|
||||
from marvin.lib.base import *
|
||||
from marvin.lib.common import *
|
||||
from marvin.lib.utils import checkVolumeSize
|
||||
from marvin.codes import SUCCESS
|
||||
from marvin.codes import PASS
|
||||
from nose.plugins.attrib import attr
|
||||
from time import sleep
|
||||
# from ctypes.wintypes import BOOLEAN
|
||||
@ -57,7 +56,7 @@ class TestListInstances(cloudstackTestCase):
|
||||
cls.services["disk_offering"]["storagetype"] = 'shared'
|
||||
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.services["virtual_machine"]["hypervisor"] = cls.testClient.getHypervisorInfo()
|
||||
cls.services["virtual_machine"]["hypervisor"] = cls.hypervisor
|
||||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
cls.services["custom_volume"]["zoneid"] = cls.zone.id
|
||||
@ -84,7 +83,7 @@ class TestListInstances(cloudstackTestCase):
|
||||
cls.api_client,
|
||||
account=cls.account.name,
|
||||
domainid=cls.domain.id,
|
||||
max= -1,
|
||||
max=-1,
|
||||
resourcetype=i
|
||||
)
|
||||
|
||||
@ -262,7 +261,7 @@ class TestListInstances(cloudstackTestCase):
|
||||
)
|
||||
|
||||
# Deleting a single VM
|
||||
VirtualMachine.delete(vm_created, self.userapiclient, expunge=False)
|
||||
VirtualMachine.delete(vm_created, self.userapiclient, expunge=True)
|
||||
|
||||
# Listing the VM's in page 2
|
||||
list_instance_response = VirtualMachine.list(
|
||||
@ -1590,8 +1589,123 @@ class TestListInstances(cloudstackTestCase):
|
||||
)
|
||||
return
|
||||
|
||||
@attr(tags=["advanced", "basic"], required_hardware="true")
|
||||
def test_12_running_vm_change_service(self):
|
||||
"""
|
||||
@Desc: Test to verify change service for Running VM
|
||||
@Steps:
|
||||
Step1: Deploying a VM
|
||||
Step2: Listing all the existing service offerings
|
||||
Step3: If there is a matching Service Offering for change service of stopped VM
|
||||
use that service offering. If not create one service offering for change service.
|
||||
Step4: Perform change service for the Running VM
|
||||
Step5: Verifying that change service is not possible for Running VM
|
||||
"""
|
||||
# Listing all the VM's for a User
|
||||
list_vms_before = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
listall=self.services["listall"],
|
||||
)
|
||||
self.assertIsNone(
|
||||
list_vms_before,
|
||||
"Virtual Machine already exists for newly created user"
|
||||
)
|
||||
# Deploying a VM
|
||||
vm_created = VirtualMachine.create(
|
||||
self.userapiclient,
|
||||
self.services["virtual_machine"],
|
||||
accountid=self.account.name,
|
||||
domainid=self.account.domainid,
|
||||
serviceofferingid=self.service_offering.id,
|
||||
)
|
||||
self.assertIsNotNone(
|
||||
vm_created,
|
||||
"VM creation failed"
|
||||
)
|
||||
self.cleanup.append(vm_created)
|
||||
# Listing details of current Service Offering
|
||||
vm_so_list = ServiceOffering.list(
|
||||
self.userapiclient,
|
||||
id=vm_created.serviceofferingid
|
||||
)
|
||||
status = validateList(vm_so_list)
|
||||
self.assertEquals(
|
||||
PASS,
|
||||
status[0],
|
||||
"Listing of VM Service offering failed"
|
||||
)
|
||||
current_so = vm_so_list[0]
|
||||
# Listing all the VMs for a user again
|
||||
list_vms_after = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
listall=self.services["listall"],
|
||||
)
|
||||
status = validateList(list_vms_after)
|
||||
self.assertEquals(
|
||||
PASS,
|
||||
status[0],
|
||||
"VM creation failed"
|
||||
)
|
||||
# Verifying that the size of the list is 1
|
||||
self.assertEquals(
|
||||
1,
|
||||
len(list_vms_after),
|
||||
"VM list count is not matching"
|
||||
)
|
||||
# Listing all the service offerings
|
||||
service_offerings_list = ServiceOffering.list(
|
||||
self.userapiclient,
|
||||
virtualmachineid=vm_created.id
|
||||
)
|
||||
# Verifying if any Service offering available for change service of VM
|
||||
so_exists = False
|
||||
if service_offerings_list is not None:
|
||||
for i in range(0, len(service_offerings_list)):
|
||||
if ((current_so.id != service_offerings_list[i].id) and\
|
||||
(current_so.storagetype == service_offerings_list[i].storagetype)):
|
||||
so_exists = True
|
||||
new_so = service_offerings_list[i]
|
||||
break
|
||||
# If service offering does not exists, then creating one service offering for scale up
|
||||
if not so_exists:
|
||||
self.services["service_offerings"]["small"]["storagetype"] = current_so.storagetype
|
||||
new_so = ServiceOffering.create(
|
||||
self.apiClient,
|
||||
self.services["service_offerings"]["small"]
|
||||
)
|
||||
self.cleanup.append(new_so)
|
||||
# Changing service for the Running VM
|
||||
with self.assertRaises(Exception):
|
||||
vm_created.change_service_offering(
|
||||
self.userapiclient,
|
||||
new_so.id
|
||||
)
|
||||
# Listing VM details again
|
||||
list_vms_after = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
id=vm_created.id
|
||||
)
|
||||
status = validateList(list_vms_after)
|
||||
self.assertEquals(
|
||||
PASS,
|
||||
status[0],
|
||||
"Listing of VM failed"
|
||||
)
|
||||
self.assertEquals(
|
||||
1,
|
||||
len(list_vms_after),
|
||||
"VMs list is not as expected"
|
||||
)
|
||||
# Verifying that VM's service offerings is not changed
|
||||
self.assertEquals(
|
||||
current_so.id,
|
||||
list_vms_after[0].serviceofferingid,
|
||||
"VM is not containing old Service Offering"
|
||||
)
|
||||
return
|
||||
|
||||
@attr(tags=["advanced"], required_hardware="true")
|
||||
def test_12_vm_nics(self):
|
||||
def test_13_vm_nics(self):
|
||||
"""
|
||||
@Desc: Test to verify Nics for a VM
|
||||
@Steps:
|
||||
@ -1613,6 +1727,8 @@ class TestListInstances(cloudstackTestCase):
|
||||
Step15: Removing the non-default nic from VM
|
||||
Step16: Verifying that VM deployed in step1 has only 1 nic
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
list_vms_before = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
@ -1897,7 +2013,7 @@ class TestInstances(cloudstackTestCase):
|
||||
cls.services["disk_offering"]["storagetype"] = 'shared'
|
||||
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.services["virtual_machine"]["hypervisor"] = cls.testClient.getHypervisorInfo()
|
||||
cls.services["virtual_machine"]["hypervisor"] = cls.hypervisor
|
||||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
cls.services["custom_volume"]["zoneid"] = cls.zone.id
|
||||
@ -1925,7 +2041,7 @@ class TestInstances(cloudstackTestCase):
|
||||
cls.api_client,
|
||||
account=cls.account.name,
|
||||
domainid=cls.domain.id,
|
||||
max= -1,
|
||||
max=-1,
|
||||
resourcetype=i
|
||||
)
|
||||
cls._cleanup.append(cls.account)
|
||||
@ -2006,8 +2122,8 @@ class TestInstances(cloudstackTestCase):
|
||||
Step10: Detaching the ISO attached in step8
|
||||
Step11: Verifying that detached ISO details are not associated with VM
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest("VM Snapshot is not supported on KVM. Hence, skipping the test")
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
list_vms_before = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
@ -2138,8 +2254,8 @@ class TestInstances(cloudstackTestCase):
|
||||
Step12: Listing all the VM snapshots in Page 2 with page size
|
||||
Step13: Verifying that size of the list is 0
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest("VM Snapshot is not supported on KVM. Hence, skipping the test")
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
list_vms_before = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
@ -2295,8 +2411,8 @@ class TestInstances(cloudstackTestCase):
|
||||
Step10: Verifying that only 1 VM snapshot is having current flag set as true.
|
||||
Step11: Verifying that the VM Snapshot with current flag set to true is the reverted snapshot in Step 8
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest("VM Snapshot is not supported on KVM. Hence, skipping the test")
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the VM's for a User
|
||||
list_vms_before = VirtualMachine.list(
|
||||
self.userapiclient,
|
||||
@ -3635,7 +3751,7 @@ class TestInstances(cloudstackTestCase):
|
||||
)
|
||||
vm_ip1 = "10.1.1.10"
|
||||
name1 = "hostA"
|
||||
self.debug("network id:%s" %network.id)
|
||||
self.debug("network id:%s" % network.id)
|
||||
self.services["virtual_machine"]["name"] = name1
|
||||
# Deploying a VM
|
||||
vm1 = VirtualMachine.create(
|
||||
@ -3650,7 +3766,7 @@ class TestInstances(cloudstackTestCase):
|
||||
)
|
||||
self.assertIsNotNone(
|
||||
vm1,
|
||||
"VM1 creation failed with ip address %s and host name %s" %(vm_ip1,name1)
|
||||
"VM1 creation failed with ip address %s and host name %s" % (vm_ip1, name1)
|
||||
)
|
||||
# self.cleanup.append(vm_created)
|
||||
self.cleanup.append(network)
|
||||
|
||||
@ -43,7 +43,6 @@ from marvin.lib.utils import validateList, cleanup_resources
|
||||
from marvin.codes import PASS
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
|
||||
class TestIpAddresses(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
@ -75,7 +74,7 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.services["virtual_machine"][
|
||||
"hypervisor"] = cls.testClient.getHypervisorInfo()
|
||||
"hypervisor"] = cls.hypervisor
|
||||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
cls.service_offering = ServiceOffering.create(
|
||||
@ -522,6 +521,8 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step8: Verifying that the length of the IP Addresses list is 1
|
||||
Step9: Verifying the details of the Listed IP Address
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -855,6 +856,8 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step2
|
||||
Step11: Verifying that no Load Balancer Rules are listed
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -2067,6 +2070,8 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
associated in Step3
|
||||
Step12: Verifying that no Port Forwarding Rules are listed
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -3029,6 +3034,8 @@ class TestIpAddresses(cloudstackTestCase):
|
||||
Step7: Disabling the staticNat to IP Associated in Step3
|
||||
Step8: Verifying that StaticNat is disabled
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
|
||||
@ -624,7 +624,7 @@ class TestIsos(cloudstackTestCase):
|
||||
"Failed to list Zones"
|
||||
)
|
||||
if not len(zones_list) > 1:
|
||||
self.skipTest("Enough zones doesnot exists to copy iso")
|
||||
self.skipTest("Not enough zones exist to copy iso")
|
||||
else:
|
||||
# Listing all the ISO's for a User in Zone 1
|
||||
list_isos_zone1 = Iso.list(
|
||||
|
||||
@ -16,32 +16,13 @@
|
||||
# under the License.
|
||||
|
||||
# Import Local Modules
|
||||
from marvin.cloudstackTestCase import cloudstackTestCase
|
||||
from marvin.lib.utils import (cleanup_resources)
|
||||
from marvin.lib.base import (Account,
|
||||
VPC,
|
||||
Network,
|
||||
NetworkOffering,
|
||||
ServiceOffering,
|
||||
Vpn,
|
||||
Configurations,
|
||||
VpcOffering,
|
||||
PublicIPAddress,
|
||||
PrivateGateway,
|
||||
NetworkACL,
|
||||
VpnCustomerGateway,
|
||||
VirtualMachine,
|
||||
EgressFireWallRule,
|
||||
NetworkACLList,
|
||||
Zone)
|
||||
from marvin.lib.common import (get_zone,
|
||||
get_template,
|
||||
get_domain)
|
||||
from marvin.lib.utils import (validateList)
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.lib.utils import *
|
||||
from marvin.lib.base import *
|
||||
from marvin.lib.common import *
|
||||
from marvin.codes import PASS, FAIL
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
|
||||
class TestNetworks_1(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
@ -51,6 +32,7 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
cls.testClient = super(TestNetworks_1, cls).getClsTestClient()
|
||||
cls.api_client = cls.testClient.getApiClient()
|
||||
cls.test_data = cls.testClient.getParsedTestDataConfig()
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
# Get Domain, Zone, Template
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(
|
||||
@ -72,7 +54,7 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
|
||||
cls.test_data['mode'] = cls.zone.networktype
|
||||
cls.test_data["virtual_machine"][
|
||||
"hypervisor"] = cls.testClient.getHypervisorInfo()
|
||||
"hypervisor"] = cls.hypervisor
|
||||
cls.test_data["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.test_data["virtual_machine"]["template"] = cls.template.id
|
||||
cls.test_data["network_without_acl"]["zoneid"] = cls.zone.id
|
||||
@ -344,6 +326,8 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
Step8 : Deleting a single vpc and verifying that vpc does
|
||||
not exists on page 2
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# List VPC Offering
|
||||
vpc_offs_list = VpcOffering.list(self.userapiclient, isdefault="true")
|
||||
if vpc_offs_list is None:
|
||||
@ -457,6 +441,8 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
Step3 : Create VPC
|
||||
Step4 : List VPC and verify that count is increased by 1
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# List VPC Offering
|
||||
vpc_offs_list = VpcOffering.list(self.userapiclient, isdefault="true")
|
||||
if vpc_offs_list is None:
|
||||
@ -630,6 +616,8 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
Step7 : Verify vpc name matches for newly created vpc name
|
||||
and name from vpc list
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# List VPC Offering
|
||||
vpc_offs_list = VpcOffering.list(self.userapiclient,
|
||||
isdefault="true",
|
||||
@ -1153,6 +1141,8 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
Step7 : Verify network name matches for newly created network name
|
||||
and name from network list
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# List VPC Offering
|
||||
vpc_offs_list = VpcOffering.list(self.userapiclient, isdefault="true")
|
||||
if vpc_offs_list is None:
|
||||
@ -1294,6 +1284,8 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
Step5 : Update VPC name and display text
|
||||
Step6 : Verify name and display text is updated
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# List VPC Offering
|
||||
vpc_offs_list = VpcOffering.list(self.userapiclient, isdefault="true")
|
||||
if vpc_offs_list is None:
|
||||
@ -1396,6 +1388,8 @@ class TestNetworks_1(cloudstackTestCase):
|
||||
Step10 : Delete NetworkACL
|
||||
Step11 : Verify NetworkACL is deleted
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# List VPC Offering
|
||||
vpc_offs_list = VpcOffering.list(self.userapiclient,
|
||||
isdefault="true",
|
||||
@ -1594,6 +1588,7 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
cls.testClient = super(TestNetworks_2, cls).getClsTestClient()
|
||||
cls.api_client = cls.testClient.getApiClient()
|
||||
cls.test_data = cls.testClient.getParsedTestDataConfig()
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
# Get Domain, Zone, Template
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(
|
||||
@ -1689,6 +1684,8 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
Step7: Verifying the list vpc size is 1
|
||||
Step8: Verifying the details of the vpc
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -1928,6 +1925,8 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
Step7: Verifying the list Private Gateway size is 1
|
||||
Step8: Verifying the details of the Private Gateway
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Creating a vpc
|
||||
vpc_created = VPC.create(
|
||||
self.userapiclient,
|
||||
@ -2198,6 +2197,8 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
Step8: Listing the VPC by specifying VPCID
|
||||
Step9: Verfying state of vpc
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -2271,6 +2272,8 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
Step6: Verifying the list size is increased by 1
|
||||
Step7: Verifying the details of a VPN gateway
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -2388,6 +2391,8 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
Step13: Listing all the VPN Connection for a user
|
||||
Step14: Verifying that no VPN Connection are listed
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the vpc's for a user
|
||||
list_vpc_before = VPC.list(self.userapiclient)
|
||||
# Verifying No VPCs are listed
|
||||
@ -2652,6 +2657,8 @@ class TestNetworks_2(cloudstackTestCase):
|
||||
Step8: Verifying list size is increased by 1
|
||||
Step9: Listing Networkacllist by paymentgateway aclid
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all thenetwork acl list for a user
|
||||
list_networkacl = NetworkACLList.list(self.userapiclient)
|
||||
self.assertIsNotNone(
|
||||
|
||||
@ -59,7 +59,7 @@ class TestSnapshots(cloudstackTestCase):
|
||||
cls.services["disk_offering"]["storagetype"] = 'shared'
|
||||
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.services["virtual_machine"]["hypervisor"] = cls.testClient.getHypervisorInfo()
|
||||
cls.services["virtual_machine"]["hypervisor"] = cls.hypervisor
|
||||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
cls.services["custom_volume"]["zoneid"] = cls.zone.id
|
||||
@ -164,6 +164,8 @@ class TestSnapshots(cloudstackTestCase):
|
||||
Step11: Listing all the volume snapshots in page2
|
||||
Step12: Verifying that list size is 0
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the volume snapshots for a User
|
||||
list_vol_snaps_before = Snapshot.list(
|
||||
self.userapiclient,
|
||||
@ -293,6 +295,8 @@ class TestSnapshots(cloudstackTestCase):
|
||||
Step7: Verifying that list size is 1
|
||||
Step8: Verifying details of the listed volume snapshot
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the volume snapshots for a User
|
||||
list_vol_snaps_before = Snapshot.list(
|
||||
self.userapiclient,
|
||||
@ -415,8 +419,8 @@ class TestSnapshots(cloudstackTestCase):
|
||||
Step11: Listing all the volume snapshots in page2
|
||||
Step12: Verifying that list size is 0
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest("VM Snapshot is not supported on KVM. Hence, skipping the test")
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the VM snapshots for a User
|
||||
list_vm_snaps_before = VmSnapshot.list(
|
||||
self.userapiclient,
|
||||
@ -549,8 +553,8 @@ class TestSnapshots(cloudstackTestCase):
|
||||
Step7: Verifying that list size is 1
|
||||
Step8: Verifying details of the listed VM snapshot
|
||||
"""
|
||||
if self.hypervisor.lower() == 'kvm':
|
||||
raise unittest.SkipTest("VM Snapshot is not supported on KVM. Hence, skipping the test")
|
||||
if self.hypervisor.lower() in ['kvm', 'hyperv']:
|
||||
raise unittest.SkipTest("This feature is not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the VM snapshots for a User
|
||||
list_vm_snaps_before = VmSnapshot.list(
|
||||
self.userapiclient,
|
||||
|
||||
@ -17,16 +17,13 @@
|
||||
|
||||
# Import Local Modules
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackException import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.lib.utils import *
|
||||
from marvin.lib.base import *
|
||||
from marvin.lib.common import *
|
||||
from marvin.lib.utils import checkVolumeSize
|
||||
from marvin.codes import SUCCESS
|
||||
from marvin.codes import PASS
|
||||
from nose.plugins.attrib import attr
|
||||
from time import sleep
|
||||
import time
|
||||
|
||||
class TestTemplates(cloudstackTestCase):
|
||||
|
||||
@ -732,7 +729,7 @@ class TestTemplates(cloudstackTestCase):
|
||||
"Failed to list Zones"
|
||||
)
|
||||
if not len(zones_list) > 1:
|
||||
raise unittest.SkipTest("Enough zones doesnot exists to copy template")
|
||||
raise unittest.SkipTest("Not enough zones exist to copy template")
|
||||
else:
|
||||
# Listing all the Templates for a User in Zone 1
|
||||
list_templates_zone1 = Template.list(
|
||||
|
||||
@ -34,7 +34,6 @@ from marvin.lib.common import (get_domain,
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.codes import PASS
|
||||
|
||||
|
||||
class TestVolumes(cloudstackTestCase):
|
||||
|
||||
@classmethod
|
||||
@ -44,6 +43,7 @@ class TestVolumes(cloudstackTestCase):
|
||||
cls.testClient = super(TestVolumes, cls).getClsTestClient()
|
||||
cls.api_client = cls.testClient.getApiClient()
|
||||
cls.services = cls.testClient.getParsedTestDataConfig()
|
||||
cls.hypervisor = cls.testClient.getHypervisorInfo()
|
||||
# Get Domain, Zone, Template
|
||||
cls.domain = get_domain(cls.api_client)
|
||||
cls.zone = get_zone(
|
||||
@ -67,7 +67,7 @@ class TestVolumes(cloudstackTestCase):
|
||||
|
||||
cls.services['mode'] = cls.zone.networktype
|
||||
cls.services["virtual_machine"][
|
||||
"hypervisor"] = cls.testClient.getHypervisorInfo()
|
||||
"hypervisor"] = cls.hypervisor
|
||||
cls.services["virtual_machine"]["zoneid"] = cls.zone.id
|
||||
cls.services["virtual_machine"]["template"] = cls.template.id
|
||||
cls.services["custom_volume"]["zoneid"] = cls.zone.id
|
||||
@ -463,6 +463,8 @@ class TestVolumes(cloudstackTestCase):
|
||||
If not present creating it
|
||||
Step6: Resizing data volume
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing volumes for a user before creating a volume
|
||||
list_volumes_before = Volume.list(
|
||||
self.userapiclient,
|
||||
@ -582,6 +584,8 @@ class TestVolumes(cloudstackTestCase):
|
||||
Step5: Attaching and Detaching custom volume created to Virtual Machine
|
||||
Step6: Resizing custom volume
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test")
|
||||
# Listing all the disk offerings
|
||||
list_disk_offerings = DiskOffering.list(self.apiClient)
|
||||
|
||||
@ -705,6 +709,8 @@ class TestVolumes(cloudstackTestCase):
|
||||
Step4: Creating Volume from snapshot
|
||||
Step5: Creating Template from Snapshot
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test")
|
||||
list_volumes_before = Volume.list(
|
||||
self.userapiclient,
|
||||
listall=self.services["listall"])
|
||||
@ -1466,6 +1472,8 @@ class TestVolumes(cloudstackTestCase):
|
||||
Step11: Listign the snapshots from page 2 again and verifyign that
|
||||
list returns none
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test")
|
||||
list_volumes_before = Volume.list(
|
||||
self.userapiclient,
|
||||
listall=self.services["listall"])
|
||||
@ -1805,6 +1813,8 @@ class TestVolumes(cloudstackTestCase):
|
||||
Step4:Create another volume with size y
|
||||
Step5:Verify that the new volume is created with size Y but not with size X
|
||||
"""
|
||||
if self.hypervisor.lower() in ['hyperv']:
|
||||
raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test")
|
||||
disk_offering = DiskOffering.create(
|
||||
self.api_client,
|
||||
self.services["disk_offering"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user