Revision a0d2a91e
b/lib/objects.py | ||
---|---|---|
743 | 743 |
|
744 | 744 |
self.dynamic_params = dyn_disk_params |
745 | 745 |
|
746 |
def ToDict(self): |
|
746 |
# pylint: disable=W0221 |
|
747 |
def ToDict(self, include_dynamic_params=False): |
|
747 | 748 |
"""Disk-specific conversion to standard python types. |
748 | 749 |
|
749 | 750 |
This replaces the children lists of objects with lists of |
... | ... | |
751 | 752 |
|
752 | 753 |
""" |
753 | 754 |
bo = super(Disk, self).ToDict() |
755 |
if not include_dynamic_params and "dynamic_params" in bo: |
|
756 |
del bo["dynamic_params"] |
|
754 | 757 |
|
755 | 758 |
for attr in ("children",): |
756 | 759 |
alist = bo.get(attr, None) |
b/lib/rpc.py | ||
---|---|---|
903 | 903 |
|
904 | 904 |
disk.UpdateDynamicDiskParams(node, node_ips) |
905 | 905 |
|
906 |
ret.append(disk.ToDict()) |
|
906 |
ret.append(disk.ToDict(include_dynamic_params=True))
|
|
907 | 907 |
|
908 | 908 |
return ret |
909 | 909 |
|
Also available in: Unified diff