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
|
||||
cls.domain = get_domain(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(
|
||||
cls.api_client,
|
||||
cls.zone.id,
|
||||
|
||||
@ -134,6 +134,8 @@ def get_template(apiclient, zoneid, ostype, services=None):
|
||||
for template in list_templates:
|
||||
if template.ostypeid == ostypeid:
|
||||
return template
|
||||
elif template.isready:
|
||||
return template
|
||||
|
||||
raise Exception("Exception: Failed to find template with OSTypeID: %s" %
|
||||
ostypeid)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user