@@ -154,26 +154,26 @@ def createInstance(self, service_off, networks=None, api_client=None):
154154 if api_client is None :
155155 api_client = self .apiclient
156156
157- self .debug ("Deploying an instance in account: %s" %
157+ self .debug ("Deploying an instance in account: %s" %
158158 self .account .name )
159- try :
160- vm = VirtualMachine .create (
159+ try :
160+ vm = VirtualMachine .create (
161161 api_client ,
162162 self .services ["virtual_machine" ],
163163 templateid = self .template .id ,
164164 accountid = self .account .name ,
165165 domainid = self .account .domainid ,
166166 networkids = networks ,
167167 serviceofferingid = service_off .id )
168- vms = VirtualMachine .list (api_client , id = vm .id , listall = True )
169- self .assertIsInstance (vms ,
168+ vms = VirtualMachine .list (api_client , id = vm .id , listall = True )
169+ self .assertIsInstance (vms ,
170170 list ,
171171 "List VMs should return a valid response" )
172- self .assertEqual (vms [0 ].state , "Running" ,
172+ self .assertEqual (vms [0 ].state , "Running" ,
173173 "Vm state should be running after deployment" )
174- return vm
175- except Exception as e :
176- self .fail ("Failed to deploy an instance: %s" % e )
174+ return vm
175+ except Exception as e :
176+ self .fail ("Failed to deploy an instance: %s" % e )
177177
178178 @attr (tags = ["advanced" , "advancedns" ,"simulator" ])
179179 def test_01_multiplecore_start_stop_instance (self ):
@@ -401,26 +401,26 @@ def createInstance(self, service_off, networks=None, api_client=None):
401401 if api_client is None :
402402 api_client = self .apiclient
403403
404- self .debug ("Deploying an instance in account: %s" %
404+ self .debug ("Deploying an instance in account: %s" %
405405 self .account .name )
406- try :
407- vm = VirtualMachine .create (
406+ try :
407+ vm = VirtualMachine .create (
408408 api_client ,
409409 self .services ["virtual_machine" ],
410410 templateid = self .template .id ,
411411 accountid = self .account .name ,
412412 domainid = self .account .domainid ,
413413 networkids = networks ,
414414 serviceofferingid = service_off .id )
415- vms = VirtualMachine .list (api_client , id = vm .id , listall = True )
416- self .assertIsInstance (vms ,
415+ vms = VirtualMachine .list (api_client , id = vm .id , listall = True )
416+ self .assertIsInstance (vms ,
417417 list ,
418418 "List VMs should return a valid response" )
419- self .assertEqual (vms [0 ].state , "Running" ,
419+ self .assertEqual (vms [0 ].state , "Running" ,
420420 "Vm state should be running after deployment" )
421- return vm
422- except Exception as e :
423- self .fail ("Failed to deploy an instance: %s" % e )
421+ return vm
422+ except Exception as e :
423+ self .fail ("Failed to deploy an instance: %s" % e )
424424
425425 def setupAccounts (self ):
426426
0 commit comments