Commit e0f9ed64 authored by Adeodato Simo's avatar Adeodato Simo Committed by Iustin Pop
Browse files add error code to OpPrereqError

This adds a errors.ECODE_NOENT for OpPrereqError in LookupNodeGroup.
Signed-off-by: default avatarAdeodato Simo <>
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarIustin Pop <>
parent 913cc25e
...@@ -886,7 +886,8 @@ class ConfigWriter: ...@@ -886,7 +886,8 @@ class ConfigWriter:
for nodegroup in self._config_data.nodegroups.values(): for nodegroup in self._config_data.nodegroups.values():
if == target: if == target:
return nodegroup.uuid return nodegroup.uuid
raise errors.OpPrereqError("Node group '%s' not found" % target) raise errors.OpPrereqError("Node group '%s' not found" % target,
def _UnlockedGetNodeGroup(self, uuid): def _UnlockedGetNodeGroup(self, uuid):
"""Lookup a node group. """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