objects: Add custom de-/serializing code for query responses
[ganeti-local] / lib / opcodes.py
index d119f45..6bf14d5 100644 (file)
@@ -328,6 +328,7 @@ class OpSetClusterParams(OpCode):
     "hidden_os",
     "blacklisted_os",
     "prealloc_wipe_disks",
+    "master_netdev",
     ]
 
 
@@ -369,6 +370,16 @@ class OpQueryFields(OpCode):
     ]
 
 
+class OpOutOfBand(OpCode):
+  """Interact with OOB."""
+  OP_ID = "OP_OUT_OF_BAND"
+  __slots__ = [
+    "node_name",
+    "command",
+    "timeout",
+    ]
+
+
 # node opcodes
 
 class OpRemoveNode(OpCode):
@@ -710,12 +721,33 @@ class OpGrowDisk(OpCode):
 
 # Node group opcodes
 
+class OpAddGroup(OpCode):
+  """Add a node group to the cluster."""
+  OP_ID = "OP_GROUP_ADD"
+  OP_DSC_FIELD = "group_name"
+  __slots__ = ["group_name"]
+
+
 class OpQueryGroups(OpCode):
   """Compute the list of node groups."""
   OP_ID = "OP_GROUP_QUERY"
   __slots__ = ["output_fields", "names"]
 
 
+class OpRemoveGroup(OpCode):
+  """Remove a node group from the cluster."""
+  OP_ID = "OP_GROUP_REMOVE"
+  OP_DSC_FIELD = "group_name"
+  __slots__ = ["group_name"]
+
+
+class OpRenameGroup(OpCode):
+  """Rename a node group in the cluster."""
+  OP_ID = "OP_GROUP_RENAME"
+  OP_DSC_FIELD = "old_name"
+  __slots__ = ["old_name", "new_name"]
+
+
 # OS opcodes
 class OpDiagnoseOS(OpCode):
   """Compute the list of guest operating systems."""