class documentation

class OpNodeAdd(OpCode):

View In Hierarchy

Add a node to the cluster.

Constant OP_DSC_FIELD Undocumented
Constant OP_PARAMS Undocumented
Instance Variable group The node group to which this node will belong.
Instance Variable master_capable The master_capable node attribute
Instance Variable node_name The name of the node to add. This can be a short name, but it will be expanded to the FQDN.
Instance Variable primary_ip The primary IP of the node. This will be ignored when the opcode is submitted, but will be filled during the node add (so it will be visible in the job query).
Instance Variable readd Whether to re-add an existing node to the cluster. If this is not passed, then the operation will abort if the node name is already in the cluster; use this parameter to 'repair' a node that had its configuration broken, or was reinstalled without removal from the cluster.
Instance Variable secondary_ip The secondary IP of the node. This needs to be passed if the cluster has been initialized in 'dual-network' mode, otherwise it must not be given.
Instance Variable vm_capable The vm_capable node attribute

Inherited from OpCode:

Class Method LoadOpCode Generic load opcode method.
Method __getstate__ Specialized getstate for opcodes.
Method Summary Generates a summary description of this opcode.
Method TinySummary Generates a compact summary description of the opcode.
Constant OP_RESULT Callable to verify opcode result
Constant WITH_LU Boolean that specifies whether this should be included in mcpu's dispatch table
Class Variable OP_DSC_FORMATTER A callable that should format the OP_DSC_FIELD; if not present, then the field will be simply converted to string
Class Variable OP_ID The ID of this opcode. This should be unique amongst all children of this class.
Instance Variable dry_run Whether the LU should be run in dry-run mode, i.e. just the check steps
Instance Variable priority Opcode priority for queue

Inherited from BaseOpCode (via OpCode):

Class Method GetAllParams Compute list of all parameters for an opcode.
Method __init__ Constructor for BaseOpCode.
Method __setstate__ Generic unserializer.
Method Validate Validate opcode parameters, optionally setting default values.

Inherited from ValidatedSlots (via OpCode, BaseOpCode):

Class Method GetAllSlots Compute the list of all declared slots for a class.
Class Variable __slots__ Undocumented
OP_DSC_FIELD: str =

Undocumented

Value
'node_name'
OP_PARAMS =

Undocumented

Value
[('node_name',
  None,
  ht.TNonEmptyString,
  'A required node name (for single-node LUs)'),
 ('hv_state', None, ht.TMaybe(ht.TObject(ht.TAny)), 'Set hypervisor states'),
 ('disk_state', None, ht.TMaybe(ht.TObject(ht.TAny)), 'Set disk states'),
 ('primary_ip', None, ht.TMaybeString, 'Primary IP address'),
...
group: str =

The node group to which this node will belong.

master_capable: bool =

The master_capable node attribute

node_name: str =

The name of the node to add. This can be a short name, but it will be expanded to the FQDN.

primary_ip: IP address =

The primary IP of the node. This will be ignored when the opcode is submitted, but will be filled during the node add (so it will be visible in the job query).

readd: bool =

Whether to re-add an existing node to the cluster. If this is not passed, then the operation will abort if the node name is already in the cluster; use this parameter to 'repair' a node that had its configuration broken, or was reinstalled without removal from the cluster.

secondary_ip: IP address =

The secondary IP of the node. This needs to be passed if the cluster has been initialized in 'dual-network' mode, otherwise it must not be given.

vm_capable: bool =

The vm_capable node attribute