Extend the hypervisor API with name-only shutdown
Currently the ShutdownInstance method of the hypervisors takes a full instance object. However, when doing instance shutdowns from the node only, we don't have a full object, just the name. To handle this use case, we add a new ‘name’ argument to the method, which makes the shutdown not use/rely on the ‘instance’ argument. The KVM and fake hypervisors need a little bit of work, otherwise the change is straightforward. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
Showing
- lib/hypervisor/hv_base.py 5 additions, 1 deletionlib/hypervisor/hv_base.py
- lib/hypervisor/hv_chroot.py 5 additions, 2 deletionslib/hypervisor/hv_chroot.py
- lib/hypervisor/hv_fake.py 10 additions, 8 deletionslib/hypervisor/hv_fake.py
- lib/hypervisor/hv_kvm.py 13 additions, 6 deletionslib/hypervisor/hv_kvm.py
- lib/hypervisor/hv_xen.py 7 additions, 6 deletionslib/hypervisor/hv_xen.py
Loading
Please register or sign in to comment