Hotplug: rpc support
authorDimitris Aragiorgis <dimara@grnet.gr>
Wed, 9 Oct 2013 14:45:33 +0000 (17:45 +0300)
committerThomas Thrainer <thomasth@google.com>
Thu, 24 Oct 2013 09:27:30 +0000 (11:27 +0200)
commitc570893184d4569d4e589b6ffddf6f8e80dbf1fb
treeee923ce8de3ce6a8c31989bdb2a12cc0e98e916d
parent4b82125bb094192aa1c06c292c7cf2e0a516d9fb
Hotplug: rpc support

Introduce new RPC that eventually invoke hypervisor specific
hotplug functions. In order to be generic it has the following
arguments: device type, action, device, extra info, seq.
Device type can be NIC or DISK, action can be ADD, REMOVE,
device is the NIC or Disk object, extra info is used by Disk
hotplug to point the device path and seq is the device index
(from the master perspective)

Add HotplugSupported() in all Hypervisors

Only KVM hypervisor supports this method. The other hypervisors
raise HypervisorError.

Before trying hotplug in backend layer invoke hyper.HotplugSupported
and abort RPC in case it is not implemented or for some other reason
not supported (disk+chroot, nic without fdsend, etc).

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
lib/backend.py
lib/hypervisor/hv_base.py
lib/hypervisor/hv_chroot.py
lib/hypervisor/hv_fake.py
lib/hypervisor/hv_lxc.py
lib/hypervisor/hv_xen.py
lib/rpc.py
lib/rpc_defs.py
lib/server/noded.py