Commit f7686867 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Change OpClusterVerifyConfig's result, verify results

This patch removes the list of node groups (not used anymore since
commit fcad7225

) from OpClusterVerifyConfig's result and adds result
verification to all OpClusterVerify* opcodes.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent e5d1d1b5
......@@ -1635,7 +1635,7 @@ class LUClusterVerifyConfig(NoHooksLU, _VerifyErrors):
"the following instances have a non-existing primary-node:"
" %s", utils.CommaJoin(no_node_instances))
return (not self.bad, [g.name for g in self.all_group_info.values()])
return not self.bad
class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
......
......@@ -431,6 +431,11 @@ TNoRelativeJobDependencies = _BuildJobDepCheck(False)
#: List of submission status and job ID as returned by C{SubmitManyJobs}
TJobIdList = ht.TListOf(ht.TItems([ht.TBool, ht.TOr(ht.TString, ht.TJobId)]))
#: Result containing only list of submitted jobs
TJobIdListOnly = ht.TStrictDict(True, True, {
constants.JOB_IDS_KEY: TJobIdList,
})
class OpCode(BaseOpCode):
"""Abstract OpCode.
......@@ -584,6 +589,7 @@ class OpClusterVerify(OpCode):
_PVerbose,
("group_name", None, ht.TMaybeString, "Group to verify")
]
OP_RESULT = TJobIdListOnly
class OpClusterVerifyConfig(OpCode):
......@@ -595,6 +601,7 @@ class OpClusterVerifyConfig(OpCode):
_PErrorCodes,
_PVerbose,
]
OP_RESULT = ht.TBool
class OpClusterVerifyGroup(OpCode):
......@@ -615,15 +622,14 @@ class OpClusterVerifyGroup(OpCode):
_PSkipChecks,
_PVerbose,
]
OP_RESULT = ht.TBool
class OpClusterVerifyDisks(OpCode):
"""Verify the cluster disks.
"""
OP_RESULT = ht.TStrictDict(True, True, {
constants.JOB_IDS_KEY: TJobIdList,
})
OP_RESULT = TJobIdListOnly
class OpGroupVerifyDisks(OpCode):
......
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