Commit 648e4196 authored by Guido Trotter's avatar Guido Trotter
Browse files

Add ConfigWriter.GetNodeGroup


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 412b3531
......@@ -876,6 +876,21 @@ class ConfigWriter:
return nodegroup.uuid
raise errors.OpPrereqError("Nodegroup '%s' not found", target)
@locking.ssynchronized(_config_lock, shared=1)
def GetNodeGroup(self, uuid):
"""Lookup a node group.
@type uuid: string
@param uuid: group UUID
@rtype: L{objects.NodeGroup} or None
@return: nodegroup object, or None if not found
"""
if uuid not in self._config_data.nodegroups:
return None
return self._config_data.nodegroups[uuid]
@locking.ssynchronized(_config_lock, shared=1)
def GetAllNodeGroupsInfo(self):
"""Get the configuration of all node groups.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment