Revision 6ccce5d4 lib/objects.py
b/lib/objects.py | ||
---|---|---|
1092 | 1092 |
__slots__ = [ |
1093 | 1093 |
"name", |
1094 | 1094 |
"primary_node", |
1095 |
"secondary_nodes", |
|
1095 | 1096 |
"os", |
1096 | 1097 |
"hypervisor", |
1097 | 1098 |
"hvparams", |
... | ... | |
1107 | 1108 |
"serial_no", |
1108 | 1109 |
] + _TIMESTAMPS + _UUID |
1109 | 1110 |
|
1110 |
def _ComputeSecondaryNodes(self): |
|
1111 |
"""Compute the list of secondary nodes. |
|
1112 |
|
|
1113 |
This is a simple wrapper over _ComputeAllNodes. |
|
1114 |
|
|
1115 |
""" |
|
1116 |
all_nodes = set(self._ComputeAllNodes()) |
|
1117 |
all_nodes.discard(self.primary_node) |
|
1118 |
return tuple(all_nodes) |
|
1119 |
|
|
1120 |
secondary_nodes = property(_ComputeSecondaryNodes, None, None, |
|
1121 |
"List of names of secondary nodes") |
|
1122 |
|
|
1123 | 1111 |
def _ComputeAllNodes(self): |
1124 | 1112 |
"""Compute the list of all nodes. |
1125 | 1113 |
|
Also available in: Unified diff