Revision 156374c7

b/lib/cmdlib/instance.py
3108 3108
    self.LogInfo("Trying to hotplug device...")
3109 3109
    result = self.rpc.call_hotplug_device(self.instance.primary_node,
3110 3110
                                          self.instance, action, dev_type,
3111
                                          device, extra, seq)
3111
                                          (device, self.instance),
3112
                                          extra, seq)
3112 3113
    if result.fail_msg:
3113 3114
      self.LogWarning("Could not hotplug device: %s" % result.fail_msg)
3114 3115
      self.LogInfo("Continuing execution..")
b/lib/rpc.py
740 740
        n.netinfo = objects.Network.ToDict(nobj)
741 741
    return n.ToDict()
742 742

  
743
  def _DeviceDict(self, device):
743
  def _DeviceDict(self, (device, instance)):
744 744
    if isinstance(device, objects.NIC):
745 745
      return self._NicDict(device)
746 746
    elif isinstance(device, objects.Disk):
747
      return _ObjectToDict(device)
747
      return self._SingleDiskDictDP((device, instance))
748 748

  
749 749
  def _InstDict(self, instance, hvp=None, bep=None, osp=None):
750 750
    """Convert the given instance to a dict.

Also available in: Unified diff