Updated Branches:
  refs/heads/master 7d4e65740 -> e49b3b27d

marvin: storagetype reference only when attr present

reference the storagetype only when present. storagetype is reqd only for
devcloud style tests


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

Branch: refs/heads/master
Commit: e49b3b27dee9e108d45bb54affdffd2939680104
Parents: 7d4e657
Author: Prasanna Santhanam <[email protected]>
Authored: Sun Dec 9 23:13:24 2012 -0800
Committer: Prasanna Santhanam <[email protected]>
Committed: Sun Dec 9 23:13:24 2012 -0800

----------------------------------------------------------------------
 test/integration/smoke/test_iso.py            |    2 +-
 tools/marvin/marvin/integration/lib/base.py   |    3 ++-
 tools/marvin/marvin/integration/lib/common.py |    3 +++
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e49b3b27/test/integration/smoke/test_iso.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_iso.py 
b/test/integration/smoke/test_iso.py
index 23c5786..22d424f 100644
--- a/test/integration/smoke/test_iso.py
+++ b/test/integration/smoke/test_iso.py
@@ -218,7 +218,7 @@ class TestISO(cloudstackTestCase):
         cls.services["account"] = cls.account.account.name
         # Finding the OsTypeId from Ostype
         ostypes = list_os_types(
-                    cls.apiclient,
+                    cls.api_client,
                     description=self.services["ostype"]
                     )
         if not isinstance(ostypes, list):

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e49b3b27/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py 
b/tools/marvin/marvin/integration/lib/base.py
index 044c910..149a47c 100644
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -1039,7 +1039,8 @@ class ServiceOffering:
         cmd.displaytext = services["displaytext"]
         cmd.memory = services["memory"]
         cmd.name = services["name"]
-        cmd.storagetype = services["storagetype"]
+        if hasattr(cmd, "storagetype"):
+            cmd.storagetype = services["storagetype"]
 
         # Service Offering private to that domain
         if domainid:

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e49b3b27/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 05c6a1a..cc9e6cb 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -64,6 +64,7 @@ def get_domain(apiclient, services=None):
     domains = apiclient.listDomains(cmd)
 
     if isinstance(domains, list):
+        assert len(domains) > 0
         return domains[0]
     else:
         raise Exception("Failed to find specified domain.")
@@ -80,6 +81,7 @@ def get_zone(apiclient, services=None):
     zones = apiclient.listZones(cmd)
 
     if isinstance(zones, list):
+        assert len(zones) > 0
         return zones[0]
     else:
         raise Exception("Failed to find specified zone.")
@@ -98,6 +100,7 @@ def get_pod(apiclient, zoneid, services=None):
     pods = apiclient.listPods(cmd)
 
     if isinstance(pods, list):
+        assert len(pods) > 0
         return pods[0]
     else:
         raise Exception("Exception: Failed to find specified pod.")

Reply via email to