Revision dac81741 lib/config.py
b/lib/config.py | ||
---|---|---|
1071 | 1071 |
""" |
1072 | 1072 |
return self._config_data.nodegroups.keys() |
1073 | 1073 |
|
1074 |
@locking.ssynchronized(_config_lock, shared=1) |
|
1075 |
def GetNodeGroupMembersByNodes(self, nodes): |
|
1076 |
"""Get nodes which are member in the same nodegroups as the given nodes. |
|
1077 |
|
|
1078 |
""" |
|
1079 |
ngfn = lambda node_name: self._UnlockedGetNodeInfo(node_name).group |
|
1080 |
return frozenset(member_name |
|
1081 |
for node_name in nodes |
|
1082 |
for member_name in |
|
1083 |
self._UnlockedGetNodeGroup(ngfn(node_name)).members) |
|
1084 |
|
|
1074 | 1085 |
@locking.ssynchronized(_config_lock) |
1075 | 1086 |
def AddInstance(self, instance, ec_id): |
1076 | 1087 |
"""Add an instance to the config. |
Also available in: Unified diff