Extend the hypervisor API with name-only shutdown
authorIustin Pop <iustin@google.com>
Mon, 22 Mar 2010 14:49:23 +0000 (15:49 +0100)
committerIustin Pop <iustin@google.com>
Tue, 23 Mar 2010 10:21:41 +0000 (11:21 +0100)
commitbbcf7ad022e5b0e8fd247175ef9cb98f1f6ca78f
tree9b4a0827821b6bc7a8e61aae36e40a933a30ffe1
parent4f7a6a10561a8725a250b0132c1c5a477c8df1c8
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>
lib/hypervisor/hv_base.py
lib/hypervisor/hv_chroot.py
lib/hypervisor/hv_fake.py
lib/hypervisor/hv_kvm.py
lib/hypervisor/hv_xen.py