cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject git commit: updated refs/heads/4.2-forward to 503fe75
Date Mon, 30 Sep 2013 09:49:31 GMT
Updated Branches:
  refs/heads/4.2-forward 07a6daf6c -> 503fe75dc


CLOUDSTACK: 4706 - Adding missing method get_region in common.py

Signed-off-by: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>


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

Branch: refs/heads/4.2-forward
Commit: 503fe75dc93be209f0382ddf9c0b548009342565
Parents: 07a6daf
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Wed Sep 18 20:50:37 2013 -0400
Committer: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>
Committed: Mon Sep 30 15:18:30 2013 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/integration/lib/common.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/503fe75d/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 e895885..164ef20 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -94,6 +94,22 @@ def add_netscaler(apiclient, zoneid, NSservice):
 
     return netscaler
 
+def get_region(apiclient, services=None):
+    "Returns a default region"
+
+    cmd = listRegions.listRegionsCmd()
+    if services:
+        if "regionid" in services:
+            cmd.id = services["regionid"]
+
+    regions = apiclient.listRegions(cmd)
+
+    if isinstance(regions, list):
+        assert len(regions) > 0
+        return regions[0]
+    else:
+        raise Exception("Failed to find specified region.")
+
 def get_domain(apiclient, services=None):
     "Returns a default domain"
 


Mime
View raw message