| Conditions | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
| 22 | def run(self, vm, kill=False): |
||
| 23 | # convert ids to stubs |
||
| 24 | vm_obj = inventory.get_virtualmachine(self.si_content, moid=vm) |
||
| 25 | if kill: |
||
| 26 | vm_obj.TerminateVM() |
||
| 27 | success = True |
||
| 28 | else: |
||
| 29 | task = vm_obj.PowerOffVM_Task() |
||
| 30 | success = self._wait_for_task(task) |
||
| 31 | return {'success': success} |
||
| 32 |