| Conditions | 2 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | import eventlet |
||
| 11 | def run(self, vm_id): |
||
| 12 | # convert ids to stubs |
||
| 13 | vm = inventory.get_virtualmachine(self.si_content, moid=vm_id) |
||
| 14 | task = vm.PowerOffVM_Task() |
||
| 15 | while task.info.state == vim.TaskInfo.State.running: |
||
| 16 | eventlet.sleep(1) |
||
| 17 | return task.info.state == vim.TaskInfo.State.success |
||
| 18 |