Skip to content

Commit f1f5f2e

Browse files
Gaurav Aradhyesailajam
authored andcommitted
CLOUDSTACK: 4640 - Fixed indentation issues in function createInstance
1 parent a709f34 commit f1f5f2e

2 files changed

Lines changed: 32 additions & 32 deletions

File tree

‎test/integration/component/cpu_limits/test_cpu_limits.py‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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

‎test/integration/component/cpu_limits/test_project_limits.py‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,23 @@ def createInstance(self, project, service_off, networks=None, api_client=None):
162162
if api_client is None:
163163
api_client = self.api_client
164164

165-
try:
166-
self.vm = VirtualMachine.create(
167-
api_client,
168-
self.services["virtual_machine"],
169-
templateid=self.template.id,
170-
projectid=project.id,
171-
networkids=networks,
172-
serviceofferingid=service_off.id)
173-
vms = VirtualMachine.list(api_client, id=self.vm.id, listall=True)
174-
self.assertIsInstance(vms,
165+
try:
166+
self.vm = VirtualMachine.create(
167+
api_client,
168+
self.services["virtual_machine"],
169+
templateid=self.template.id,
170+
projectid=project.id,
171+
networkids=networks,
172+
serviceofferingid=service_off.id)
173+
vms = VirtualMachine.list(api_client, id=self.vm.id, listall=True)
174+
self.assertIsInstance(vms,
175175
list,
176176
"List VMs should return a valid response")
177-
self.assertEqual(vms[0].state, "Running",
177+
self.assertEqual(vms[0].state, "Running",
178178
"Vm state should be running after deployment")
179-
return self.vm
180-
except Exception as e:
181-
self.fail("Failed to deploy an instance: %s" % e)
179+
return self.vm
180+
except Exception as e:
181+
self.fail("Failed to deploy an instance: %s" % e)
182182

183183
def setupProjectAccounts(self):
184184

0 commit comments

Comments
 (0)