Revision c5708931 lib/rpc.py

b/lib/rpc.py
790 790
      rpc_defs.ED_INST_DICT_HVP_BEP_DP: self._InstDictHvpBepDp,
791 791
      rpc_defs.ED_INST_DICT_OSP_DP: self._InstDictOspDp,
792 792
      rpc_defs.ED_NIC_DICT: self._NicDict,
793
      rpc_defs.ED_DEVICE_DICT: self._DeviceDict,
793 794

  
794 795
      # Encoders annotating disk parameters
795 796
      rpc_defs.ED_DISKS_DICT_DP: self._DisksDictDP,
......
831 832
        n.netinfo = objects.Network.ToDict(nobj)
832 833
    return n.ToDict()
833 834

  
835
  def _DeviceDict(self, _, device):
836
    if isinstance(device, objects.NIC):
837
      return self._NicDict(None, device)
838
    elif isinstance(device, objects.Disk):
839
      return _ObjectToDict(None, device)
840

  
834 841
  def _InstDict(self, node, instance, hvp=None, bep=None, osp=None):
835 842
    """Convert the given instance to a dict.
836 843

  

Also available in: Unified diff