marvin: assertion check when fetching featured templates

This commit is contained in:
Prasanna Santhanam 2012-12-09 22:14:02 -08:00
parent 3ba8dc455f
commit 7d4e65740b
1 changed files with 1 additions and 0 deletions

View File

@ -126,6 +126,7 @@ def get_template(apiclient, zoneid, ostype, services=None):
list_templates = apiclient.listTemplates(cmd)
assert len(list_templates) > 0
for template in list_templates:
if template.ostypeid == ostypeid:
return template