Commit 913cc25e authored by Adeodato Simo's avatar Adeodato Simo Committed by Iustin Pop
Browse files

config.py: replace "node group" with "nodegroup"



Though code uses "nodegroup" as data member name, strings that will be
read by the user should use "node group" (with a space), since "nodegroup"
is not a word.
Signed-off-by: default avatarAdeodato Simo <dato@google.com>
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 84d7e26b
......@@ -477,13 +477,13 @@ class ConfigWriter:
for nodegroup_uuid in data.nodegroups:
nodegroup = data.nodegroups[nodegroup_uuid]
if nodegroup.uuid != nodegroup_uuid:
result.append("nodegroup '%s' (uuid: '%s') indexed by wrong uuid '%s'"
result.append("node group '%s' (uuid: '%s') indexed by wrong uuid '%s'"
% (nodegroup.name, nodegroup.uuid, nodegroup_uuid))
if utils.UUID_RE.match(nodegroup.name.lower()):
result.append("nodegroup '%s' (uuid: '%s') has uuid-like name" %
result.append("node group '%s' (uuid: '%s') has uuid-like name" %
(nodegroup.name, nodegroup.uuid))
if nodegroup.name in nodegroups_names:
result.append("duplicate nodegroup name '%s'" % nodegroup.name)
result.append("duplicate node group name '%s'" % nodegroup.name)
else:
nodegroups_names.add(nodegroup.name)
......@@ -877,7 +877,7 @@ class ConfigWriter:
"""
if target is None:
if len(self._config_data.nodegroups) != 1:
raise errors.OpPrereqError("More than one nodegroup exists. Target"
raise errors.OpPrereqError("More than one node group exists. Target"
" group must be specified explicitely.")
else:
return self._config_data.nodegroups.keys()[0]
......@@ -886,7 +886,7 @@ class ConfigWriter:
for nodegroup in self._config_data.nodegroups.values():
if nodegroup.name == target:
return nodegroup.uuid
raise errors.OpPrereqError("Nodegroup '%s' not found" % target)
raise errors.OpPrereqError("Node group '%s' not found" % target)
def _UnlockedGetNodeGroup(self, uuid):
"""Lookup a node group.
......
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