You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2014/01/07 13:11:58 UTC
git commit: updated refs/heads/master to 249993b
Updated Branches:
refs/heads/master 85df58d10 -> 249993b2f
CLOUDSTACK-5113: Fix get_template method to return 'BUILTIN' template
by default
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/249993b2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/249993b2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/249993b2
Branch: refs/heads/master
Commit: 249993b2f1a982ccf49aa3a375f4b917973e8d89
Parents: 85df58d
Author: SrikanteswaraRao Talluri <ta...@apache.org>
Authored: Tue Jan 7 17:39:19 2014 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Tue Jan 7 17:41:36 2014 +0530
----------------------------------------------------------------------
tools/marvin/marvin/integration/lib/common.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/249993b2/tools/marvin/marvin/integration/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py
index c524675..504cd4c 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -209,7 +209,9 @@ def get_pod(apiclient, zoneid, services=None):
raise Exception("Exception: Failed to find specified pod.")
-def get_template(apiclient, zoneid, ostype, services=None):
+def get_template(apiclient, zoneid, ostype, services=None,
+ templatefilter='featured',
+ templatetype='BUILTIN'):
"Returns a template"
cmd = listOsTypes.listOsTypesCmd()
@@ -223,7 +225,7 @@ def get_template(apiclient, zoneid, ostype, services=None):
"Failed to find OS type with description: %s" % ostype)
cmd = listTemplates.listTemplatesCmd()
- cmd.templatefilter = 'featured'
+ cmd.templatefilter = templatefilter
cmd.zoneid = zoneid
if services:
@@ -237,7 +239,7 @@ def get_template(apiclient, zoneid, ostype, services=None):
for template in list_templates:
if template.ostypeid == ostypeid:
return template
- elif template.isready:
+ elif template.isready and template.templatetype == templatetype:
return template
raise Exception("Exception: Failed to find template with OSTypeID: %s" %