mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
marvin: storagetype reference only when attr present
reference the storagetype only when present. storagetype is reqd only for devcloud style tests
This commit is contained in:
parent
7d4e65740b
commit
e49b3b27de
@ -218,7 +218,7 @@ class TestISO(cloudstackTestCase):
|
||||
cls.services["account"] = cls.account.account.name
|
||||
# Finding the OsTypeId from Ostype
|
||||
ostypes = list_os_types(
|
||||
cls.apiclient,
|
||||
cls.api_client,
|
||||
description=self.services["ostype"]
|
||||
)
|
||||
if not isinstance(ostypes, list):
|
||||
|
||||
@ -1039,7 +1039,8 @@ class ServiceOffering:
|
||||
cmd.displaytext = services["displaytext"]
|
||||
cmd.memory = services["memory"]
|
||||
cmd.name = services["name"]
|
||||
cmd.storagetype = services["storagetype"]
|
||||
if hasattr(cmd, "storagetype"):
|
||||
cmd.storagetype = services["storagetype"]
|
||||
|
||||
# Service Offering private to that domain
|
||||
if domainid:
|
||||
|
||||
@ -64,6 +64,7 @@ def get_domain(apiclient, services=None):
|
||||
domains = apiclient.listDomains(cmd)
|
||||
|
||||
if isinstance(domains, list):
|
||||
assert len(domains) > 0
|
||||
return domains[0]
|
||||
else:
|
||||
raise Exception("Failed to find specified domain.")
|
||||
@ -80,6 +81,7 @@ def get_zone(apiclient, services=None):
|
||||
zones = apiclient.listZones(cmd)
|
||||
|
||||
if isinstance(zones, list):
|
||||
assert len(zones) > 0
|
||||
return zones[0]
|
||||
else:
|
||||
raise Exception("Failed to find specified zone.")
|
||||
@ -98,6 +100,7 @@ def get_pod(apiclient, zoneid, services=None):
|
||||
pods = apiclient.listPods(cmd)
|
||||
|
||||
if isinstance(pods, list):
|
||||
assert len(pods) > 0
|
||||
return pods[0]
|
||||
else:
|
||||
raise Exception("Exception: Failed to find specified pod.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user