diff --git a/lib/opcodes.py b/lib/opcodes.py index bdcddc50e254e9824713e31a8a66472e18a3eb55..d99636e1f22e0e9ec115d52837a0672e8e95d384 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -1612,6 +1612,9 @@ class OpBackupQuery(OpCode): ("nodes", ht.EmptyList, ht.TListOf(ht.TNonEmptyString), "Empty list to query all nodes, node names otherwise"), ] + OP_RESULT = ht.TDictOf(ht.TNonEmptyString, + ht.TOr(ht.Comment("False on error")(ht.TBool), + ht.TListOf(ht.TNonEmptyString))) class OpBackupPrepare(OpCode): @@ -1666,6 +1669,11 @@ class OpBackupExport(OpCode): ("destination_x509_ca", None, ht.TMaybeString, "Destination X509 CA (remote export only)"), ] + OP_RESULT = \ + ht.TAnd(ht.TIsLength(2), ht.TItems([ + ht.Comment("Finalizing status")(ht.TBool), + ht.Comment("Status for every exported disk")(ht.TListOf(ht.TBool)), + ])) class OpBackupRemove(OpCode): @@ -1674,6 +1682,7 @@ class OpBackupRemove(OpCode): OP_PARAMS = [ _PInstanceName, ] + OP_RESULT = ht.TNone # Tags opcodes diff --git a/test/ganeti.opcodes_unittest.py b/test/ganeti.opcodes_unittest.py index 099800f4d629d988a369a3bb2ca6190ff098e286..a31503e96cf5f7d791b10dd6f99ae5c3ed1a588d 100755 --- a/test/ganeti.opcodes_unittest.py +++ b/test/ganeti.opcodes_unittest.py @@ -38,9 +38,6 @@ import testutils #: Unless an opcode is included in the following list it must have a result #: check of some sort MISSING_RESULT_CHECK = frozenset([ - opcodes.OpBackupExport, - opcodes.OpBackupQuery, - opcodes.OpBackupRemove, opcodes.OpClusterQuery, opcodes.OpGroupQuery, opcodes.OpInstanceQuery,