@@ -84,7 +84,8 @@ def deploy(self, args):
84
84
# Once user input has been read, find the VM
85
85
try :
86
86
cloud = self ._context .getCloudService ()
87
- vm = cloud .findVirtualMachine (VirtualMachinePredicates .internalName (name ))
87
+ vm = cloud .findVirtualMachine (
88
+ VirtualMachinePredicates .internalName (name ))
88
89
if vm :
89
90
vm = helper .deploy_vm (self ._context , vm )
90
91
pprint_vms ([vm ])
@@ -108,7 +109,8 @@ def undeploy(self, args):
108
109
# Once user input has been read, find the virtual machine
109
110
try :
110
111
cloud = self ._context .getCloudService ()
111
- vm = cloud .findVirtualMachine (VirtualMachinePredicates .internalName (name ))
112
+ vm = cloud .findVirtualMachine (
113
+ VirtualMachinePredicates .internalName (name ))
112
114
if vm :
113
115
vm = helper .undeploy_vm (self ._context , vm )
114
116
pprint_vms ([vm ])
@@ -195,7 +197,8 @@ def delete(self, args):
195
197
196
198
try :
197
199
cloud = self ._context .getCloudService ()
198
- vm = cloud .findVirtualMachine (VirtualMachinePredicates .internalName (name ))
200
+ vm = cloud .findVirtualMachine (
201
+ VirtualMachinePredicates .internalName (name ))
199
202
if vm :
200
203
state = vm .getState ()
201
204
if not options .undeploy and state .existsInHypervisor ():
@@ -236,7 +239,8 @@ def __change_state(self, state_name, new_state, args):
236
239
237
240
try :
238
241
cloud = self ._context .getCloudService ()
239
- vm = cloud .findVirtualMachine (VirtualMachinePredicates .internalName (name ))
242
+ vm = cloud .findVirtualMachine (
243
+ VirtualMachinePredicates .internalName (name ))
240
244
if vm :
241
245
helper .change_state_vm (self ._context , vm , new_state )
242
246
pprint_vms ([vm ])
0 commit comments