mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8236: Automation for storage migration test path
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
parent
54d44eb844
commit
891b597606
File diff suppressed because it is too large
Load Diff
|
|
@ -110,3 +110,10 @@ CHILD_DOMAIN_ADMIN="child domain admin"
|
|||
Network states
|
||||
'''
|
||||
ALLOCATED = "Allocated"
|
||||
'''
|
||||
Storage Tags
|
||||
'''
|
||||
ZONETAG1 = "zwps1"
|
||||
ZONETAG2 = "zwps2"
|
||||
CLUSTERTAG1 = "cwps1"
|
||||
CLUSTERTAG2 = "cwps2"
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue