module documentation

IP pool related commands

Function AddNetwork Add a network to the cluster.
Function ConnectNetwork Map a network to a node group.
Function DisconnectNetwork Unmap a network from a node group.
Function ListNetworkFields List network fields.
Function ListNetworks List Ip pools and their properties.
Function Main Undocumented
Function RemoveNetwork Remove an IP address pool from the cluster.
Function RenameNetwork Rename a network.
Function SetNetworkParams Modifies an IP address pool's parameters.
Function ShowNetworkConfig Show network information.
Variable commands Undocumented
Function _GetDefaultGroups Gets list of groups to operate on.
Function _HandleReservedIPs Undocumented
Constant _LIST_DEF_FIELDS Undocumented
def AddNetwork(opts, args):

Add a network to the cluster.

Parameters
optsthe command line options selected by the user
args:lista list of length 1 with the network name to create
Returns
intthe desired exit code
def ConnectNetwork(opts, args):

Map a network to a node group.

Parameters
optsthe command line options selected by the user
args:listNetwork, mode, physlink and node groups
Returns
intthe desired exit code
def DisconnectNetwork(opts, args):

Unmap a network from a node group.

Parameters
optsthe command line options selected by the user
args:listNetwork and node groups
Returns
intthe desired exit code
def ListNetworkFields(opts, args):

List network fields.

Parameters
optsthe command line options selected by the user
args:listfields to list, or empty for all
Returns
intthe desired exit code
def ListNetworks(opts, args):

List Ip pools and their properties.

Parameters
optsthe command line options selected by the user
args:listnetworks to list, or empty for all
Returns
intthe desired exit code
def Main():

Undocumented

def RemoveNetwork(opts, args):

Remove an IP address pool from the cluster.

Parameters
optsthe command line options selected by the user
args:lista list of length 1 with the id of the IP address pool to remove
Returns
intthe desired exit code
def RenameNetwork(opts, args):

Rename a network.

Parameters
optsthe command line options selected by the user
args:lista list of length 2, [old_name, new_name]
Returns
intthe desired exit code
def SetNetworkParams(opts, args):

Modifies an IP address pool's parameters.

Parameters
optsthe command line options selected by the user
args:listshould contain only one element, the node group name
Returns
intthe desired exit code
def ShowNetworkConfig(_, args):

Show network information.

Parameters
_Undocumented
args:listshould either be an empty list, in which case we show information about all nodes, or should contain a list of networks (names or UUIDs) to be queried for information
Returns
intthe desired exit code
commands =

Undocumented

def _GetDefaultGroups(cl, groups):

Gets list of groups to operate on.

If groups doesn't contain groups, a list of all groups in the cluster is returned.

Parameters
cl:luxi.ClientUndocumented
groups:listUndocumented
Returns
listUndocumented
def _HandleReservedIPs(ips):

Undocumented

_LIST_DEF_FIELDS: list[str] =

Undocumented

Value
['name', 'network', 'gateway', 'mac_prefix', 'group_list', 'tags']