Revision b262a5c6 lib/server/noded.py

b/lib/server/noded.py
617 617
    return backend.StartInstance(instance, startup_paused, trail)
618 618

  
619 619
  @staticmethod
620
  def perspective_hotplug_device(params):
621
    """Hotplugs device to a running instance.
622

  
623
    """
624
    (idict, action, dev_type, ddict, extra, seq) = params
625
    instance = objects.Instance.FromDict(idict)
626
    if dev_type == constants.HOTPLUG_DISK:
627
      device = objects.Disk.FromDict(ddict)
628
    elif dev_type == constants.HOTPLUG_NIC:
629
      device = objects.NIC.FromDict(ddict)
630
    return backend.HotplugDevice(instance, action, dev_type, device, extra, seq)
631

  
632
  @staticmethod
620 633
  def perspective_migration_info(params):
621 634
    """Gather information about an instance to be migrated.
622 635

  

Also available in: Unified diff