Skip to content
  • Dimitris Aragiorgis's avatar
    Introduce --hotplug-if-possible option · 96ed3a3e
    Dimitris Aragiorgis authored
    
    
    This will be useful for an external entity using RAPI that
    wants to modify devices of instances.
    
    The common use case for that is:
    "I want to add a NIC/disk to an instance. If it is running
    then try to hotplug the device. If not, then just add it to config."
    
    Another use case is that if we are unaware of the instance's
    hypervisor: "I want do add a NIC/disk to an instance and if
    its hypervisor is KVM try to hotplug it."
    
    For all those cases just print a warning in CheckPrereq() and
    disable any further hotplug related actions (and let
    modifications take place after reboot).
    
    Add NoHoplugSupport and HotplugIfPossible unittests an modify
    existing by explicitly creating successful RPC results for
    call_hotplug_supported.
    
    Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
    Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
    Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
    96ed3a3e