mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Removed medium dictionary from test_data and modified the tests dependent on it
Removed duplicate test data related to vm properties.Modified tests dependent on it Removed duplicte service offerings from test data and modified tests dependent on it Bug-Id: CLOUDSTACK-8617 This closes #644
This commit is contained in:
parent
2c8d179b7a
commit
18fee95109
@ -68,7 +68,7 @@ class Test42xBugsMgmtSvr(cloudstackTestCase):
|
|||||||
# Creating Disk offering, Service Offering and Account
|
# Creating Disk offering, Service Offering and Account
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiClient,
|
cls.apiClient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.account = Account.create(
|
cls.account = Account.create(
|
||||||
cls.api_client,
|
cls.api_client,
|
||||||
|
|||||||
@ -111,7 +111,7 @@ class TestMultipleIpRanges(cloudstackTestCase):
|
|||||||
if cls.vr_state is False:
|
if cls.vr_state is False:
|
||||||
cls.vm_res = VirtualMachine.create(
|
cls.vm_res = VirtualMachine.create(
|
||||||
cls.api_client,
|
cls.api_client,
|
||||||
cls.testdata["server_without_disk"],
|
cls.testdata["small"],
|
||||||
templateid=cls.template.id,
|
templateid=cls.template.id,
|
||||||
accountid=cls.account.name,
|
accountid=cls.account.name,
|
||||||
domainid=cls.testdata["domainid"],
|
domainid=cls.testdata["domainid"],
|
||||||
@ -181,7 +181,7 @@ class TestMultipleIpRanges(cloudstackTestCase):
|
|||||||
try:
|
try:
|
||||||
self.virtual_machine = VirtualMachine.create(
|
self.virtual_machine = VirtualMachine.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.testdata["server_without_disk"],
|
self.testdata["small"],
|
||||||
templateid=self.template.id,
|
templateid=self.template.id,
|
||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.testdata["domainid"],
|
domainid=self.testdata["domainid"],
|
||||||
|
|||||||
@ -107,13 +107,13 @@ def storage_check(self, type, value):
|
|||||||
|
|
||||||
def create_system_so(self, offering_type, storage_type):
|
def create_system_so(self, offering_type, storage_type):
|
||||||
"""Create system offerings """
|
"""Create system offerings """
|
||||||
self.testdata["service_offerings"]["issystem"] = "true"
|
self.testdata["service_offerings"]["tiny"]["issystem"] = "true"
|
||||||
self.testdata["service_offerings"]["systemvmtype"] = offering_type
|
self.testdata["service_offerings"]["tiny"]["systemvmtype"] = offering_type
|
||||||
self.testdata["service_offerings"]["storagetype"] = storage_type
|
self.testdata["service_offerings"]["tiny"]["storagetype"] = storage_type
|
||||||
|
|
||||||
service_offering = ServiceOffering.create(
|
service_offering = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.testdata["service_offerings"]
|
self.testdata["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
|
|
||||||
if service_offering is None:
|
if service_offering is None:
|
||||||
@ -136,32 +136,32 @@ def create_system_so(self, offering_type, storage_type):
|
|||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].cpunumber,
|
list_service_response[0].cpunumber,
|
||||||
self.testdata["service_offerings"]["cpunumber"],
|
self.testdata["service_offerings"]["tiny"]["cpunumber"],
|
||||||
"Check server id in createServiceOffering"
|
"Check server id in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].cpuspeed,
|
list_service_response[0].cpuspeed,
|
||||||
self.testdata["service_offerings"]["cpuspeed"],
|
self.testdata["service_offerings"]["tiny"]["cpuspeed"],
|
||||||
"Check cpuspeed in createServiceOffering"
|
"Check cpuspeed in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].displaytext,
|
list_service_response[0].displaytext,
|
||||||
self.testdata["service_offerings"]["displaytext"],
|
self.testdata["service_offerings"]["tiny"]["displaytext"],
|
||||||
"Check server displaytext in createServiceOfferings"
|
"Check server displaytext in createServiceOfferings"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].memory,
|
list_service_response[0].memory,
|
||||||
self.testdata["service_offerings"]["memory"],
|
self.testdata["service_offerings"]["tiny"]["memory"],
|
||||||
"Check memory in createServiceOffering"
|
"Check memory in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].name,
|
list_service_response[0].name,
|
||||||
self.testdata["service_offerings"]["name"],
|
self.testdata["service_offerings"]["tiny"]["name"],
|
||||||
"Check name in createServiceOffering"
|
"Check name in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].storagetype,
|
list_service_response[0].storagetype,
|
||||||
self.testdata["service_offerings"]["storagetype"],
|
self.testdata["service_offerings"]["tiny"]["storagetype"],
|
||||||
"Check storagetype in createServiceOffering"
|
"Check storagetype in createServiceOffering"
|
||||||
)
|
)
|
||||||
self._cleanup.append(service_offering)
|
self._cleanup.append(service_offering)
|
||||||
|
|||||||
@ -116,9 +116,9 @@ class TestPathDisableStorage_Basic(cloudstackTestCase):
|
|||||||
|
|
||||||
# Create offerings for local storage if local storage is enabled
|
# Create offerings for local storage if local storage is enabled
|
||||||
if cls.zone.localstorageenabled:
|
if cls.zone.localstorageenabled:
|
||||||
cls.testdata["service_offerings"]["storagetype"] = 'local'
|
cls.testdata["service_offerings"]["tiny"]["storagetype"] = 'local'
|
||||||
cls.service_offering_local = ServiceOffering.create(cls.apiclient,
|
cls.service_offering_local = ServiceOffering.create(cls.apiclient,
|
||||||
cls.testdata["service_offerings"]
|
cls.testdata["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls._cleanup.append(cls.service_offering_local)
|
cls._cleanup.append(cls.service_offering_local)
|
||||||
cls.testdata["disk_offering"]["storagetype"] = 'local'
|
cls.testdata["disk_offering"]["storagetype"] = 'local'
|
||||||
@ -127,7 +127,7 @@ class TestPathDisableStorage_Basic(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls._cleanup.append(cls.disk_offering_local)
|
cls._cleanup.append(cls.disk_offering_local)
|
||||||
cls.testdata["disk_offering"]["storagetype"] = ' '
|
cls.testdata["disk_offering"]["storagetype"] = ' '
|
||||||
cls.testdata["service_offerings"]["storagetype"] = ' '
|
cls.testdata["service_offerings"]["tiny"]["storagetype"] = ' '
|
||||||
else:
|
else:
|
||||||
cls.debug("No local storage found")
|
cls.debug("No local storage found")
|
||||||
|
|
||||||
@ -730,10 +730,10 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase):
|
|||||||
|
|
||||||
# Create offerings for local storage if local storage is enabled
|
# Create offerings for local storage if local storage is enabled
|
||||||
if cls.zone.localstorageenabled:
|
if cls.zone.localstorageenabled:
|
||||||
cls.testdata["service_offerings"]["storagetype"] = 'local'
|
cls.testdata["service_offerings"]["tiny"]["storagetype"] = 'local'
|
||||||
cls.debug("Creating local storage offering")
|
cls.debug("Creating local storage offering")
|
||||||
cls.service_offering_local = ServiceOffering.create(cls.apiclient,
|
cls.service_offering_local = ServiceOffering.create(cls.apiclient,
|
||||||
cls.testdata["service_offerings"]
|
cls.testdata["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls._cleanup.append(cls.service_offering_local)
|
cls._cleanup.append(cls.service_offering_local)
|
||||||
cls.testdata["disk_offering"]["storagetype"] = 'local'
|
cls.testdata["disk_offering"]["storagetype"] = 'local'
|
||||||
@ -743,7 +743,7 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls._cleanup.append(cls.disk_offering_local)
|
cls._cleanup.append(cls.disk_offering_local)
|
||||||
cls.testdata["disk_offering"]["storagetype"] = ' '
|
cls.testdata["disk_offering"]["storagetype"] = ' '
|
||||||
cls.testdata["service_offerings"]["storagetype"] = ' '
|
cls.testdata["service_offerings"]["tiny"]["storagetype"] = ' '
|
||||||
else:
|
else:
|
||||||
cls.debug("No local storage found")
|
cls.debug("No local storage found")
|
||||||
|
|
||||||
@ -939,11 +939,11 @@ class TestPathDisableStorage_Maint_Tags(cloudstackTestCase):
|
|||||||
StoragePool.update(self.userapiclient, id=storage_id, tags='disable_prov')
|
StoragePool.update(self.userapiclient, id=storage_id, tags='disable_prov')
|
||||||
|
|
||||||
# Step 7: Add tagged service offering
|
# Step 7: Add tagged service offering
|
||||||
self.testdata['service_offerings']['tags'] = 'disable_prov'
|
self.testdata['service_offerings']['tiny']['tags'] = 'disable_prov'
|
||||||
self.testdata["service_offerings"]["storagetype"] = 'local'
|
self.testdata["service_offerings"]["tiny"]["storagetype"] = 'local'
|
||||||
self.tagged_so = ServiceOffering.create(self.userapiclient, self.testdata['service_offerings'])
|
self.tagged_so = ServiceOffering.create(self.userapiclient, self.testdata['service_offerings'])
|
||||||
self.testdata['service_offerings']['tags'] = ' '
|
self.testdata['service_offerings']['tiny']['tags'] = ' '
|
||||||
self.testdata["service_offerings"]["storagetype"] = ' '
|
self.testdata["service_offerings"]["tiny"]["storagetype"] = ' '
|
||||||
self.cleanup.append(self.tagged_so)
|
self.cleanup.append(self.tagged_so)
|
||||||
|
|
||||||
# Step 8: Enable the pool
|
# Step 8: Enable the pool
|
||||||
|
|||||||
@ -49,7 +49,8 @@ from marvin.lib.common import (get_domain,
|
|||||||
get_template,
|
get_template,
|
||||||
get_pod,
|
get_pod,
|
||||||
list_hosts,
|
list_hosts,
|
||||||
get_windows_template
|
get_windows_template,
|
||||||
|
list_virtual_machines
|
||||||
)
|
)
|
||||||
|
|
||||||
from marvin.codes import FAILED, PASS
|
from marvin.codes import FAILED, PASS
|
||||||
@ -58,6 +59,7 @@ from nose.plugins.attrib import attr
|
|||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
import unittest
|
||||||
|
|
||||||
_multiprocess_shared_ = True
|
_multiprocess_shared_ = True
|
||||||
class TestXDCCPInterop(cloudstackTestCase):
|
class TestXDCCPInterop(cloudstackTestCase):
|
||||||
@ -168,9 +170,6 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
cls.services["small"]["zoneid"] = cls.zone.id
|
cls.services["small"]["zoneid"] = cls.zone.id
|
||||||
cls.services["small"]["template"] = cls.template.id
|
cls.services["small"]["template"] = cls.template.id
|
||||||
|
|
||||||
cls.services["medium"]["zoneid"] = cls.zone.id
|
|
||||||
cls.services["medium"]["template"] = cls.template.id
|
|
||||||
|
|
||||||
user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500))
|
user_data = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(2500))
|
||||||
cls.services["virtual_machine"]["userdata"] = user_data
|
cls.services["virtual_machine"]["userdata"] = user_data
|
||||||
|
|
||||||
@ -180,7 +179,7 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
|
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["medium"],
|
cls.services["small"],
|
||||||
accountid=cls.account.name,
|
accountid=cls.account.name,
|
||||||
domainid=cls.account.domainid,
|
domainid=cls.account.domainid,
|
||||||
serviceofferingid=cls.service_offering.id,
|
serviceofferingid=cls.service_offering.id,
|
||||||
@ -727,7 +726,7 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
restorevm = VirtualMachine.create(
|
restorevm = VirtualMachine.create(
|
||||||
self.user_api_client,
|
self.user_api_client,
|
||||||
self.services["medium"],
|
self.services["small"],
|
||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
@ -862,7 +861,7 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
|
|
||||||
restorevm = VirtualMachine.create(
|
restorevm = VirtualMachine.create(
|
||||||
self.user_api_client,
|
self.user_api_client,
|
||||||
self.services["medium"],
|
self.services["small"],
|
||||||
networkids=vm1network.id,
|
networkids=vm1network.id,
|
||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
@ -974,7 +973,7 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
|
|
||||||
templatevm = VirtualMachine.create(
|
templatevm = VirtualMachine.create(
|
||||||
self.user_api_client,
|
self.user_api_client,
|
||||||
self.services["medium"],
|
self.services["small"],
|
||||||
templateid=self.template.id,
|
templateid=self.template.id,
|
||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
@ -1089,7 +1088,7 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
|
|
||||||
templatevm = VirtualMachine.create(
|
templatevm = VirtualMachine.create(
|
||||||
self.user_api_client,
|
self.user_api_client,
|
||||||
self.services["medium"],
|
self.services["small"],
|
||||||
templateid=roottemplate.id,
|
templateid=roottemplate.id,
|
||||||
networkids=vm3network.id,
|
networkids=vm3network.id,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
@ -1227,8 +1226,8 @@ class TestXDCCPInterop(cloudstackTestCase):
|
|||||||
|
|
||||||
vm_1 = VirtualMachine.create(
|
vm_1 = VirtualMachine.create(
|
||||||
self.user_api_client,
|
self.user_api_client,
|
||||||
self.services["medium"],
|
self.services["small"],
|
||||||
templateid=template.id,
|
templateid=self.template.id,
|
||||||
networkids=vm4network.id,
|
networkids=vm4network.id,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
|
|
||||||
cls.ag = AffinityGroup.create(cls.apiclient, cls.services["virtual_machine"]["affinity"],
|
cls.ag = AffinityGroup.create(cls.apiclient, cls.services["virtual_machine"]["affinity"],
|
||||||
|
|||||||
@ -125,11 +125,9 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
|
|||||||
domainid=self.domain.id
|
domainid=self.domain.id
|
||||||
)
|
)
|
||||||
|
|
||||||
self.testdata["vgpu260q"]["zoneid"] = self.zone.id
|
self.testdata["small"]["zoneid"] = self.zone.id
|
||||||
self.testdata["vgpu260q"]["template"] = self.template.id
|
self.testdata["small"]["template"] = self.template.id
|
||||||
|
|
||||||
self.testdata["vgpu140q"]["zoneid"] = self.zone.id
|
|
||||||
self.testdata["vgpu140q"]["template"] = self.template.id
|
|
||||||
self.testdata["service_offerings"]["vgpu260qwin"]["serviceofferingdetails"] = [
|
self.testdata["service_offerings"]["vgpu260qwin"]["serviceofferingdetails"] = [
|
||||||
{
|
{
|
||||||
'pciDevice': 'Group of NVIDIA Corporation GK107GL [GRID K1] GPUs'}, {
|
'pciDevice': 'Group of NVIDIA Corporation GK107GL [GRID K1] GPUs'}, {
|
||||||
@ -156,7 +154,7 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
self.virtual_machine = VirtualMachine.create(
|
self.virtual_machine = VirtualMachine.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.testdata["vgpu260q"],
|
self.testdata["small"],
|
||||||
accountid=self.account.name,
|
accountid=self.account.name,
|
||||||
domainid=self.account.domainid,
|
domainid=self.account.domainid,
|
||||||
serviceofferingid=self.service_offering.id,
|
serviceofferingid=self.service_offering.id,
|
||||||
|
|||||||
@ -39,10 +39,10 @@ class TestDeployVmWithUserData(cloudstackTestCase):
|
|||||||
cls.zone = get_zone(cls.apiClient, testClient.getZoneForTests())
|
cls.zone = get_zone(cls.apiClient, testClient.getZoneForTests())
|
||||||
if cls.zone.localstorageenabled:
|
if cls.zone.localstorageenabled:
|
||||||
#For devcloud since localstroage is enabled
|
#For devcloud since localstroage is enabled
|
||||||
cls.services["service_offerings"]["storagetype"] = "local"
|
cls.services["service_offerings"]["tiny"]["storagetype"] = "local"
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiClient,
|
cls.apiClient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.account = Account.create(cls.apiClient, services=cls.services["account"])
|
cls.account = Account.create(cls.apiClient, services=cls.services["account"])
|
||||||
cls.cleanup = [cls.account]
|
cls.cleanup = [cls.account]
|
||||||
|
|||||||
@ -67,7 +67,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
|
|||||||
#FIXME: How do we know that first fit actually happened?
|
#FIXME: How do we know that first fit actually happened?
|
||||||
self.service_offering_firstfit = ServiceOffering.create(
|
self.service_offering_firstfit = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"],
|
self.services["service_offerings"]["tiny"],
|
||||||
deploymentplanner='FirstFitPlanner'
|
deploymentplanner='FirstFitPlanner'
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
self.service_offering_userdispersing = ServiceOffering.create(
|
self.service_offering_userdispersing = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"],
|
self.services["service_offerings"]["tiny"],
|
||||||
deploymentplanner='UserDispersingPlanner'
|
deploymentplanner='UserDispersingPlanner'
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
|
|||||||
"""
|
"""
|
||||||
self.service_offering_userconcentrated = ServiceOffering.create(
|
self.service_offering_userconcentrated = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"],
|
self.services["service_offerings"]["tiny"],
|
||||||
deploymentplanner='UserConcentratedPodPlanner'
|
deploymentplanner='UserConcentratedPodPlanner'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class TestInternalLb(cloudstackTestCase):
|
|||||||
cls.domain = get_domain(cls.apiclient)
|
cls.domain = get_domain(cls.apiclient)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
||||||
cls.template = get_template(
|
cls.template = get_template(
|
||||||
|
|||||||
@ -59,7 +59,7 @@ class TestLoadBalance(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.vm_1 = VirtualMachine.create(
|
cls.vm_1 = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
|
|||||||
@ -272,7 +272,7 @@ class TestPortForwarding(cloudstackTestCase):
|
|||||||
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(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
@ -596,7 +596,7 @@ class TestRebootRouter(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
self.service_offering = ServiceOffering.create(
|
self.service_offering = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"]
|
self.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
self.vm_1 = VirtualMachine.create(
|
self.vm_1 = VirtualMachine.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
@ -765,7 +765,7 @@ class TestReleaseIP(cloudstackTestCase):
|
|||||||
|
|
||||||
self.service_offering = ServiceOffering.create(
|
self.service_offering = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"]
|
self.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
|
|
||||||
self.virtual_machine = VirtualMachine.create(
|
self.virtual_machine = VirtualMachine.create(
|
||||||
@ -905,7 +905,7 @@ class TestDeleteAccount(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
self.service_offering = ServiceOffering.create(
|
self.service_offering = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"]
|
self.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
self.vm_1 = VirtualMachine.create(
|
self.vm_1 = VirtualMachine.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
@ -1050,7 +1050,7 @@ class TestRouterRules(cloudstackTestCase):
|
|||||||
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(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class TestNetworkACL(cloudstackTestCase):
|
|||||||
cls.domain = get_domain(cls.apiclient)
|
cls.domain = get_domain(cls.apiclient)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
||||||
cls.template = get_template(
|
cls.template = get_template(
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class TestRouterServices(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.vm_1 = VirtualMachine.create(
|
cls.vm_1 = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class TestCreateServiceOffering(cloudstackTestCase):
|
|||||||
|
|
||||||
service_offering = ServiceOffering.create(
|
service_offering = ServiceOffering.create(
|
||||||
self.apiclient,
|
self.apiclient,
|
||||||
self.services["service_offerings"]
|
self.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
self.cleanup.append(service_offering)
|
self.cleanup.append(service_offering)
|
||||||
|
|
||||||
@ -101,27 +101,27 @@ class TestCreateServiceOffering(cloudstackTestCase):
|
|||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].cpunumber,
|
list_service_response[0].cpunumber,
|
||||||
self.services["service_offerings"]["cpunumber"],
|
self.services["service_offerings"]["tiny"]["cpunumber"],
|
||||||
"Check server id in createServiceOffering"
|
"Check server id in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].cpuspeed,
|
list_service_response[0].cpuspeed,
|
||||||
self.services["service_offerings"]["cpuspeed"],
|
self.services["service_offerings"]["tiny"]["cpuspeed"],
|
||||||
"Check cpuspeed in createServiceOffering"
|
"Check cpuspeed in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].displaytext,
|
list_service_response[0].displaytext,
|
||||||
self.services["service_offerings"]["displaytext"],
|
self.services["service_offerings"]["tiny"]["displaytext"],
|
||||||
"Check server displaytext in createServiceOfferings"
|
"Check server displaytext in createServiceOfferings"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].memory,
|
list_service_response[0].memory,
|
||||||
self.services["service_offerings"]["memory"],
|
self.services["service_offerings"]["tiny"]["memory"],
|
||||||
"Check memory in createServiceOffering"
|
"Check memory in createServiceOffering"
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list_service_response[0].name,
|
list_service_response[0].name,
|
||||||
self.services["service_offerings"]["name"],
|
self.services["service_offerings"]["tiny"]["name"],
|
||||||
"Check name in createServiceOffering"
|
"Check name in createServiceOffering"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
@ -157,11 +157,11 @@ class TestServiceOfferings(cloudstackTestCase):
|
|||||||
|
|
||||||
cls.service_offering_1 = ServiceOffering.create(
|
cls.service_offering_1 = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.service_offering_2 = ServiceOffering.create(
|
cls.service_offering_2 = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
template = get_template(
|
template = get_template(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
@ -176,8 +176,6 @@ class TestServiceOfferings(cloudstackTestCase):
|
|||||||
cls.services["small"]["zoneid"] = cls.zone.id
|
cls.services["small"]["zoneid"] = cls.zone.id
|
||||||
cls.services["small"]["template"] = template.id
|
cls.services["small"]["template"] = template.id
|
||||||
|
|
||||||
cls.services["medium"]["zoneid"] = cls.zone.id
|
|
||||||
cls.services["medium"]["template"] = template.id
|
|
||||||
|
|
||||||
# Create VMs, NAT Rules etc
|
# Create VMs, NAT Rules etc
|
||||||
cls.account = Account.create(
|
cls.account = Account.create(
|
||||||
@ -197,7 +195,7 @@ class TestServiceOfferings(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.medium_virtual_machine = VirtualMachine.create(
|
cls.medium_virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["medium"],
|
cls.services["small"],
|
||||||
accountid=cls.account.name,
|
accountid=cls.account.name,
|
||||||
domainid=cls.account.domainid,
|
domainid=cls.account.domainid,
|
||||||
serviceofferingid=cls.medium_offering.id,
|
serviceofferingid=cls.medium_offering.id,
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class TestSnapshotRootDisk(cloudstackTestCase):
|
|||||||
"ostype"]
|
"ostype"]
|
||||||
|
|
||||||
cls.services["domainid"] = cls.domain.id
|
cls.services["domainid"] = cls.domain.id
|
||||||
cls.services["server_without_disk"]["zoneid"] = cls.zone.id
|
cls.services["small"]["zoneid"] = cls.zone.id
|
||||||
cls.services["templates"]["ostypeid"] = template.ostypeid
|
cls.services["templates"]["ostypeid"] = template.ostypeid
|
||||||
cls.services["zoneid"] = cls.zone.id
|
cls.services["zoneid"] = cls.zone.id
|
||||||
|
|
||||||
@ -75,13 +75,13 @@ class TestSnapshotRootDisk(cloudstackTestCase):
|
|||||||
cls._cleanup.append(cls.account)
|
cls._cleanup.append(cls.account)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls._cleanup.append(cls.service_offering)
|
cls._cleanup.append(cls.service_offering)
|
||||||
cls.virtual_machine = cls.virtual_machine_with_disk = \
|
cls.virtual_machine = cls.virtual_machine_with_disk = \
|
||||||
VirtualMachine.create(
|
VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["server_without_disk"],
|
cls.services["small"],
|
||||||
templateid=template.id,
|
templateid=template.id,
|
||||||
accountid=cls.account.name,
|
accountid=cls.account.name,
|
||||||
domainid=cls.account.domainid,
|
domainid=cls.account.domainid,
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class TestCreateTemplate(cloudstackTestCase):
|
|||||||
cls._cleanup.append(cls.account)
|
cls._cleanup.append(cls.account)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls._cleanup.append(cls.service_offering)
|
cls._cleanup.append(cls.service_offering)
|
||||||
#create virtual machine
|
#create virtual machine
|
||||||
@ -268,7 +268,7 @@ class TestTemplates(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
#create virtual machine
|
#create virtual machine
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
|
|||||||
@ -72,8 +72,6 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
cls.services["small"]["zoneid"] = cls.zone.id
|
cls.services["small"]["zoneid"] = cls.zone.id
|
||||||
cls.services["small"]["template"] = template.id
|
cls.services["small"]["template"] = template.id
|
||||||
|
|
||||||
cls.services["medium"]["zoneid"] = cls.zone.id
|
|
||||||
cls.services["medium"]["template"] = template.id
|
|
||||||
cls.services["iso1"]["zoneid"] = cls.zone.id
|
cls.services["iso1"]["zoneid"] = cls.zone.id
|
||||||
|
|
||||||
cls.account = Account.create(
|
cls.account = Account.create(
|
||||||
@ -286,8 +284,6 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||||||
cls.services["small"]["zoneid"] = cls.zone.id
|
cls.services["small"]["zoneid"] = cls.zone.id
|
||||||
cls.services["small"]["template"] = template.id
|
cls.services["small"]["template"] = template.id
|
||||||
|
|
||||||
cls.services["medium"]["zoneid"] = cls.zone.id
|
|
||||||
cls.services["medium"]["template"] = template.id
|
|
||||||
cls.services["iso1"]["zoneid"] = cls.zone.id
|
cls.services["iso1"]["zoneid"] = cls.zone.id
|
||||||
|
|
||||||
# Create VMs, NAT Rules etc
|
# Create VMs, NAT Rules etc
|
||||||
@ -317,7 +313,7 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.medium_virtual_machine = VirtualMachine.create(
|
cls.medium_virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["medium"],
|
cls.services["small"],
|
||||||
accountid=cls.account.name,
|
accountid=cls.account.name,
|
||||||
domainid=cls.account.domainid,
|
domainid=cls.account.domainid,
|
||||||
serviceofferingid=cls.medium_offering.id,
|
serviceofferingid=cls.medium_offering.id,
|
||||||
|
|||||||
@ -60,7 +60,7 @@ class TestVmSnapshot(cloudstackTestCase):
|
|||||||
with description %s" % cls.services["ostype"]
|
with description %s" % cls.services["ostype"]
|
||||||
|
|
||||||
cls.services["domainid"] = cls.domain.id
|
cls.services["domainid"] = cls.domain.id
|
||||||
cls.services["server"]["zoneid"] = cls.zone.id
|
cls.services["small"]["zoneid"] = cls.zone.id
|
||||||
cls.services["templates"]["ostypeid"] = template.ostypeid
|
cls.services["templates"]["ostypeid"] = template.ostypeid
|
||||||
cls.services["zoneid"] = cls.zone.id
|
cls.services["zoneid"] = cls.zone.id
|
||||||
|
|
||||||
@ -74,12 +74,12 @@ class TestVmSnapshot(cloudstackTestCase):
|
|||||||
|
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls._cleanup.append(cls.service_offering)
|
cls._cleanup.append(cls.service_offering)
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["server"],
|
cls.services["small"],
|
||||||
templateid=template.id,
|
templateid=template.id,
|
||||||
accountid=cls.account.name,
|
accountid=cls.account.name,
|
||||||
domainid=cls.account.domainid,
|
domainid=cls.account.domainid,
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class TestCreateVolume(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
@ -322,7 +322,7 @@ class TestVolumes(cloudstackTestCase):
|
|||||||
)
|
)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.virtual_machine = VirtualMachine.create(
|
cls.virtual_machine = VirtualMachine.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class TestVpcRemoteAccessVpn(cloudstackTestCase):
|
|||||||
cls.domain = get_domain(cls.apiclient)
|
cls.domain = get_domain(cls.apiclient)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
||||||
cls.template = get_template(
|
cls.template = get_template(
|
||||||
@ -147,7 +147,7 @@ class TestVpcSite2SiteVpn(cloudstackTestCase):
|
|||||||
cls.domain = get_domain(cls.apiclient)
|
cls.domain = get_domain(cls.apiclient)
|
||||||
cls.service_offering = ServiceOffering.create(
|
cls.service_offering = ServiceOffering.create(
|
||||||
cls.apiclient,
|
cls.apiclient,
|
||||||
cls.services["service_offerings"]
|
cls.services["service_offerings"]["tiny"]
|
||||||
)
|
)
|
||||||
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
cls.account = Account.create(cls.apiclient, services=cls.services["account"])
|
||||||
cls.template = get_template(
|
cls.template = get_template(
|
||||||
|
|||||||
@ -81,16 +81,6 @@ test_data = {
|
|||||||
"publicport": 22,
|
"publicport": 22,
|
||||||
"protocol": 'TCP',
|
"protocol": 'TCP',
|
||||||
},
|
},
|
||||||
"medium": {
|
|
||||||
"displayname": "testserver",
|
|
||||||
"username": "root",
|
|
||||||
"password": "password",
|
|
||||||
"ssh_port": 22,
|
|
||||||
"hypervisor": 'XenServer',
|
|
||||||
"privateport": 22,
|
|
||||||
"publicport": 22,
|
|
||||||
"protocol": 'TCP',
|
|
||||||
},
|
|
||||||
"service_offering": {
|
"service_offering": {
|
||||||
"name": "Tiny Instance",
|
"name": "Tiny Instance",
|
||||||
"displaytext": "Tiny Instance",
|
"displaytext": "Tiny Instance",
|
||||||
@ -99,12 +89,6 @@ test_data = {
|
|||||||
"memory": 256, # In MBs
|
"memory": 256, # In MBs
|
||||||
},
|
},
|
||||||
"service_offerings": {
|
"service_offerings": {
|
||||||
"name": "Tiny Instance",
|
|
||||||
"displaytext": "Tiny Instance",
|
|
||||||
"cpunumber": 1,
|
|
||||||
"cpuspeed": 100,
|
|
||||||
"memory": 128,
|
|
||||||
|
|
||||||
"tiny": {
|
"tiny": {
|
||||||
"name": "Tiny Instance",
|
"name": "Tiny Instance",
|
||||||
"displaytext": "Tiny Instance",
|
"displaytext": "Tiny Instance",
|
||||||
@ -380,16 +364,6 @@ test_data = {
|
|||||||
"name": "testvm3",
|
"name": "testvm3",
|
||||||
"displayname": "Test VM3",
|
"displayname": "Test VM3",
|
||||||
},
|
},
|
||||||
"server_without_disk": {
|
|
||||||
"displayname": "Test VM-No Disk",
|
|
||||||
"username": "root",
|
|
||||||
"password": "password",
|
|
||||||
"ssh_port": 22,
|
|
||||||
"hypervisor": 'XenServer',
|
|
||||||
"privateport": 22,
|
|
||||||
"publicport": 22,
|
|
||||||
"protocol": 'TCP',
|
|
||||||
},
|
|
||||||
"shared_network": {
|
"shared_network": {
|
||||||
"name": "MySharedNetwork - Test",
|
"name": "MySharedNetwork - Test",
|
||||||
"displaytext": "MySharedNetwork",
|
"displaytext": "MySharedNetwork",
|
||||||
@ -994,16 +968,6 @@ test_data = {
|
|||||||
"gateway": "10.2.1.1",
|
"gateway": "10.2.1.1",
|
||||||
"netmask": "255.255.255.192"
|
"netmask": "255.255.255.192"
|
||||||
},
|
},
|
||||||
"server": {
|
|
||||||
"displayname": "TestVM",
|
|
||||||
"username": "root",
|
|
||||||
"password": "password",
|
|
||||||
"ssh_port": 22,
|
|
||||||
"hypervisor": 'XenServer',
|
|
||||||
"privateport": 22,
|
|
||||||
"publicport": 22,
|
|
||||||
"protocol": 'TCP'
|
|
||||||
},
|
|
||||||
"privateport": 22,
|
"privateport": 22,
|
||||||
"publicport": 22,
|
"publicport": 22,
|
||||||
"protocol": 'TCP',
|
"protocol": 'TCP',
|
||||||
@ -1114,28 +1078,6 @@ test_data = {
|
|||||||
# ensure unique username generated each time
|
# ensure unique username generated each time
|
||||||
"password": "password",
|
"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":
|
"service_offerings":
|
||||||
{
|
{
|
||||||
"GRID K260Q":
|
"GRID K260Q":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user