cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject git commit: updated refs/heads/master to 899ad17
Date Mon, 10 Feb 2014 07:09:11 GMT
Updated Branches:
  refs/heads/master d44c85044 -> 899ad1739


CLOUDSTACK-5978: Changes in get_template function to make it
 independent of ostype passed through test case


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/899ad173
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/899ad173
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/899ad173

Branch: refs/heads/master
Commit: 899ad1739359a4d851a033aa5743745199133494
Parents: d44c850
Author: Ashutosh K <ashutosh@clogeny.com>
Authored: Mon Feb 10 12:38:09 2014 +0530
Committer: Girish Shilamkar <girish@clogeny.com>
Committed: Mon Feb 10 12:38:09 2014 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/integration/lib/common.py | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/899ad173/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 f23b332..e202391 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -215,17 +215,7 @@ def get_pod(apiclient, zoneid, services=None):
 def get_template(apiclient, zoneid, ostype, services=None,
                  templatefilter='featured',
                  templatetype='BUILTIN'):
-    "Returns a template"
-
-    cmd = listOsTypes.listOsTypesCmd()
-    cmd.description = ostype
-    ostypes = apiclient.listOsTypes(cmd)
-
-    if isinstance(ostypes, list):
-        ostypeid = ostypes[0].id
-    else:
-        raise Exception(
-            "Failed to find OS type with description: %s" % ostype)
+    "Returns a featured built in template in given zone"
 
     cmd = listTemplates.listTemplatesCmd()
     cmd.templatefilter = templatefilter
@@ -238,13 +228,13 @@ def get_template(apiclient, zoneid, ostype, services=None,
     list_templates = apiclient.listTemplates(cmd)
 
     if isinstance(list_templates, list):
-        assert len(list_templates) > 0, "received empty response on template of type %s"%ostype
+        assert len(list_templates) > 0, "received empty response on featured templates"
         for template in list_templates:
-            if template.ostypeid == ostypeid and template.isready and template.templatetype
== templatetype:
+            if template.isready and template.templatetype == templatetype:
                 return template
 
-    raise Exception("Exception: Failed to find template of type %s with OSTypeID and which
is in "
-                                "ready state: %s" %(templatetype, ostypeid))
+    raise Exception("Exception: Failed to find built in template which is in "
+                                "ready state: %s" % templatetype)
     return
 
 


Mime
View raw message