Total Complexity | 1 |
Total Lines | 11 |
Duplicated Lines | 0 % |
1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
20 | class VMDestroy(BaseAction): |
||
21 | |||
22 | def run(self, vm_id): |
||
23 | # convert ids to stubs |
||
24 | vm = inventory.get_virtualmachine(self.si_content, moid=vm_id) |
||
25 | |||
26 | task = vm.Destroy_Task() |
||
27 | success = self._wait_for_task(task) |
||
28 | |||
29 | # verify status is running. |
||
30 | return {"status": success} |
||
31 |