@@ -90,7 +90,7 @@ def __init__(self):
9090 "displaytext" : "Small Instance" ,
9191 "cpunumber" : 1 ,
9292 "cpuspeed" : 100 ,
93- "memory" : 256
93+ "memory" : 256 ,
9494 },
9595 "medium" :
9696 {
@@ -100,7 +100,7 @@ def __init__(self):
100100 "displaytext" : "Medium Instance" ,
101101 "cpunumber" : 1 ,
102102 "cpuspeed" : 100 ,
103- "memory" : 256
103+ "memory" : 256 ,
104104 }
105105 },
106106 "iso" : # ISO settings for Attach/Detach ISO tests
@@ -125,7 +125,6 @@ def __init__(self):
125125 #Migrate VM to hostid
126126 "ostype" : 'CentOS 5.3 (64-bit)' ,
127127 # CentOS 5.3 (64-bit)
128- "mode" :'advanced' ,
129128 }
130129
131130
@@ -139,6 +138,14 @@ def setUp(self):
139138 # Get Zone, Domain and templates
140139 domain = get_domain (self .apiclient , self .services )
141140 zone = get_zone (self .apiclient , self .services )
141+ self .services ['mode' ] = zone .networktype
142+
143+ #if local storage is enabled, alter the offerings to use localstorage
144+ #this step is needed for devcloud
145+ if zone .localstorageenabled == True :
146+ self .services ["service_offerings" ]["tiny" ]["storagetype" ] = 'local'
147+ self .services ["service_offerings" ]["small" ]["storagetype" ] = 'local'
148+ self .services ["service_offerings" ]["medium" ]["storagetype" ] = 'local'
142149
143150 template = get_template (
144151 self .apiclient ,
@@ -170,7 +177,7 @@ def setUp(self):
170177 self .account
171178 ]
172179
173- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
180+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
174181 def test_deploy_vm (self ):
175182 """Test Deploy Virtual Machine
176183 """
@@ -185,7 +192,8 @@ def test_deploy_vm(self):
185192 self .services ["small" ],
186193 accountid = self .account .account .name ,
187194 domainid = self .account .account .domainid ,
188- serviceofferingid = self .service_offering .id
195+ serviceofferingid = self .service_offering .id ,
196+ mode = self .services ['mode' ]
189197 )
190198
191199 list_vm_response = list_virtual_machines (
@@ -242,6 +250,15 @@ def setUpClass(cls):
242250 # Get Zone, Domain and templates
243251 domain = get_domain (cls .api_client , cls .services )
244252 zone = get_zone (cls .api_client , cls .services )
253+ cls .services ['mode' ] = zone .networktype
254+
255+ #if local storage is enabled, alter the offerings to use localstorage
256+ #this step is needed for devcloud
257+ if zone .localstorageenabled == True :
258+ cls .services ["service_offerings" ]["tiny" ]["storagetype" ] = 'local'
259+ cls .services ["service_offerings" ]["small" ]["storagetype" ] = 'local'
260+ cls .services ["service_offerings" ]["medium" ]["storagetype" ] = 'local'
261+
245262 template = get_template (
246263 cls .api_client ,
247264 zone .id ,
@@ -319,7 +336,7 @@ def tearDown(self):
319336 return
320337
321338
322- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
339+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
323340 def test_01_stop_vm (self ):
324341 """Test Stop Virtual Machine
325342 """
@@ -355,7 +372,7 @@ def test_01_stop_vm(self):
355372 )
356373 return
357374
358- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
375+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
359376 def test_02_start_vm (self ):
360377 """Test Start Virtual Machine
361378 """
@@ -393,7 +410,7 @@ def test_02_start_vm(self):
393410 )
394411 return
395412
396- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
413+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
397414 def test_03_reboot_vm (self ):
398415 """Test Reboot Virtual Machine
399416 """
@@ -669,7 +686,7 @@ def test_05_change_offering_medium(self):
669686 )
670687 return
671688
672- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
689+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
673690 def test_06_destroy_vm (self ):
674691 """Test destroy Virtual Machine
675692 """
@@ -705,7 +722,7 @@ def test_06_destroy_vm(self):
705722 )
706723 return
707724
708- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
725+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
709726 def test_07_restore_vm (self ):
710727 """Test recover Virtual Machine
711728 """
@@ -818,7 +835,7 @@ def test_08_migrate_vm(self):
818835
819836 @attr (configuration = "expunge.interval" )
820837 @attr (configuration = "expunge.delay" )
821- @attr (tags = ["advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
838+ @attr (tags = ["devcloud" , " advanced" , "advancedns" , "smoke" , "basic" , "sg" ])
822839 def test_09_expunge_vm (self ):
823840 """Test destroy(expunge) Virtual Machine
824841 """
0 commit comments