Revision b8291e00 lib/rpc.py
b/lib/rpc.py | ||
---|---|---|
662 | 662 |
# Encoders requiring configuration object |
663 | 663 |
rpc_defs.ED_INST_DICT: self._InstDict, |
664 | 664 |
rpc_defs.ED_INST_DICT_HVP_BEP: self._InstDictHvpBep, |
665 |
rpc_defs.ED_INST_DICT_OSP: self._InstDictOsp,
|
|
665 |
rpc_defs.ED_INST_DICT_OSP_DP: self._InstDictOspDp,
|
|
666 | 666 |
|
667 | 667 |
# Encoders annotating disk parameters |
668 | 668 |
rpc_defs.ED_DISKS_DICT_DP: self._DisksDictDP, |
... | ... | |
730 | 730 |
""" |
731 | 731 |
return self._InstDict(instance, hvp=hvp, bep=bep) |
732 | 732 |
|
733 |
def _InstDictOsp(self, (instance, osparams)): |
|
733 |
def _InstDictOspDp(self, (instance, osparams)):
|
|
734 | 734 |
"""Wrapper for L{_InstDict}. |
735 | 735 |
|
736 | 736 |
""" |
737 |
return self._InstDict(instance, osp=osparams) |
|
737 |
updated_inst = self._InstDict(instance, osp=osparams) |
|
738 |
updated_inst["disks"] = self._DisksDictDP((instance.disks, instance)) |
|
739 |
return updated_inst |
|
738 | 740 |
|
739 | 741 |
def _DisksDictDP(self, (disks, instance)): |
740 | 742 |
"""Wrapper for L{AnnotateDiskParams}. |
Also available in: Unified diff