cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 891b597
Date Thu, 12 Mar 2015 05:26:13 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 54d44eb84 -> 891b59760


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/891b5976/tools/marvin/marvin/codes.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py
index a7e8ec8..31ff537 100644
--- a/tools/marvin/marvin/codes.py
+++ b/tools/marvin/marvin/codes.py
@@ -110,3 +110,10 @@ CHILD_DOMAIN_ADMIN="child domain admin"
 Network states
 '''
 ALLOCATED = "Allocated"
+'''
+Storage Tags
+'''
+ZONETAG1 = "zwps1"
+ZONETAG2 = "zwps2"
+CLUSTERTAG1 = "cwps1"
+CLUSTERTAG2 = "cwps2"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/891b5976/tools/marvin/marvin/config/test_data.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py
index 34ccec2..47eb453 100644
--- a/tools/marvin/marvin/config/test_data.py
+++ b/tools/marvin/marvin/config/test_data.py
@@ -872,7 +872,32 @@ test_data = {
         "iscsi://192.168.100.21/iqn.2012-01.localdomain.clo-cstack-cos6:iser/1",
         "name": "Primary iSCSI"
     },
-    "volume": {"diskname": "Test Volume"},
+    "volume": {"diskname": "Test Volume",
+               "size": 1
+    },
+    "volume_write_path": {
+        "diskname": "APP Data Volume",
+        "size": 1,   # in GBs
+        "xenserver": {"rootdiskdevice":"/dev/xvda",
+                     "datadiskdevice_1": '/dev/xvdb',
+                    "datadiskdevice_2": '/dev/xvdc',   # Data Disk
+                    },
+        "KVM":       {"rootdiskdevice": "/dev/vda",
+                    "datadiskdevice_1": "/dev/vdb",
+                    "datadiskdevice_2": "/dev/vdc"
+                    },
+        "vmware":    {"rootdiskdevice": "/dev/hda",
+                    "datadiskdevice_1": "/dev/hdb",
+                    "datadiskdevice_2": "/dev/hdc"
+                    }
+    },
+    "data_write_paths": {
+                "mount_dir": "/mnt/tmp",
+                "sub_dir": "test",
+                "sub_lvl_dir1": "test1",
+                "sub_lvl_dir2": "test2",
+                "random_data": "random.data",
+    },
     "custom_volume": {
         "customdisksize": 1,
         "diskname": "Custom disk",

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/891b5976/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index 7443373..db2f3a8 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -1881,7 +1881,7 @@ class ServiceOffering:
         self.__dict__.update(items)
 
     @classmethod
-    def create(cls, apiclient, services, domainid=None, **kwargs):
+    def create(cls, apiclient, services, tags=None, domainid=None, **kwargs):
         """Create Service offering"""
         cmd = createServiceOffering.createServiceOfferingCmd()
         cmd.cpunumber = services["cpunumber"]
@@ -1898,9 +1898,6 @@ class ServiceOffering:
         if "issystem" in services:
             cmd.issystem = services['issystem']
 
-        if "tags" in services:
-            cmd.tags = services["tags"]
-
         if "hosttags" in services:
             cmd.hosttags = services["hosttags"]
 
@@ -1934,6 +1931,11 @@ class ServiceOffering:
         if domainid:
             cmd.domainid = domainid
 
+	if tags:
+	    cmd.tags = tags
+	elif "tags" in services:
+	    cmd.tags = services["tags"]
+
         [setattr(cmd, k, v) for k, v in kwargs.items()]
         return ServiceOffering(apiclient.createServiceOffering(cmd).__dict__)
 
@@ -1962,7 +1964,7 @@ class DiskOffering:
         self.__dict__.update(items)
 
     @classmethod
-    def create(cls, apiclient, services, custom=False, domainid=None):
+    def create(cls, apiclient, services, tags=None, custom=False, domainid=None):
         """Create Disk offering"""
         cmd = createDiskOffering.createDiskOfferingCmd()
         cmd.displaytext = services["displaytext"]
@@ -1975,6 +1977,11 @@ class DiskOffering:
         if domainid:
             cmd.domainid = domainid
 
+	if tags:
+	    cmd.tags = tags
+	elif "tags" in services:
+	    cmd.tags = services["tags"]
+
         if "storagetype" in services:
             cmd.storagetype = services["storagetype"]
 
@@ -1987,9 +1994,6 @@ class DiskOffering:
         if "miniops" in services:
             cmd.miniops = services["miniops"]
 
-        if "tags" in services:
-            cmd.tags = services["tags"]
-
         if "provisioningtype" in services:
             cmd.provisioningtype = services["provisioningtype"]
 


Mime
View raw message