mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
return a ready template even if ostype doesn't match
This commit is contained in:
parent
4a0b05a0b2
commit
5a0f4b6330
@ -80,7 +80,7 @@ class TestRouterServices(cloudstackTestCase):
|
|||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.domain = get_domain(cls.api_client, cls.services)
|
cls.domain = get_domain(cls.api_client, cls.services)
|
||||||
cls.zone = get_zone(cls.api_client, cls.services)
|
cls.zone = get_zone(cls.api_client, cls.services)
|
||||||
self.services['mode'] = cls.zone.networktype
|
cls.services['mode'] = cls.zone.networktype
|
||||||
template = get_template(
|
template = get_template(
|
||||||
cls.api_client,
|
cls.api_client,
|
||||||
cls.zone.id,
|
cls.zone.id,
|
||||||
|
|||||||
@ -134,6 +134,8 @@ def get_template(apiclient, zoneid, ostype, services=None):
|
|||||||
for template in list_templates:
|
for template in list_templates:
|
||||||
if template.ostypeid == ostypeid:
|
if template.ostypeid == ostypeid:
|
||||||
return template
|
return template
|
||||||
|
elif template.isready:
|
||||||
|
return template
|
||||||
|
|
||||||
raise Exception("Exception: Failed to find template with OSTypeID: %s" %
|
raise Exception("Exception: Failed to find template with OSTypeID: %s" %
|
||||||
ostypeid)
|
ostypeid)
|
||||||
@ -566,4 +568,4 @@ def list_vpc_offerings(apiclient, **kwargs):
|
|||||||
|
|
||||||
cmd = listVPCOfferings.listVPCOfferingsCmd()
|
cmd = listVPCOfferings.listVPCOfferingsCmd()
|
||||||
[setattr(cmd, k, v) for k, v in kwargs.items()]
|
[setattr(cmd, k, v) for k, v in kwargs.items()]
|
||||||
return(apiclient.listVPCOfferings(cmd))
|
return(apiclient.listVPCOfferings(cmd))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user