Package ganeti :: Package cmdlib :: Module network
[hide private]
[frames] | no frames]

Module network

source code

Logical units dealing with networks.

Classes [hide private]
  LUNetworkAdd
Logical unit for creating networks.
  LUNetworkRemove
  LUNetworkSetParams
Modifies the parameters of a network.
  NetworkQuery
  LUNetworkQuery
Logical unit for querying networks.
  LUNetworkConnect
Connect a network to a nodegroup
  LUNetworkDisconnect
Disconnect a network to a nodegroup
Functions [hide private]
 
_BuildNetworkHookEnv(name, subnet, gateway, network6, gateway6, mac_prefix, tags)
Builds network related env variables for hooks
source code
 
_FmtNetworkConflict(details)
Utility for _NetworkConflictCheck.
source code
 
_NetworkConflictCheck(lu, check_fn, action, instances)
Checks for network interface conflicts with a network.
source code

Imports: constants, errors, locking, network, objects, qlang, query, utils, LogicalUnit, NoHooksLU, QueryBase, ShareAll, CheckNodeGroupInstances


Function Details [hide private]

_BuildNetworkHookEnv(name, subnet, gateway, network6, gateway6, mac_prefix, tags)

source code 

Builds network related env variables for hooks

This builds the hook environment from individual variables.

Parameters:
  • name (string) - the name of the network
  • subnet (string) - the ipv4 subnet
  • gateway (string) - the ipv4 gateway
  • network6 (string) - the ipv6 subnet
  • gateway6 (string) - the ipv6 gateway
  • mac_prefix (string) - the mac_prefix
  • tags (list) - the tags of the network

_NetworkConflictCheck(lu, check_fn, action, instances)

source code 

Checks for network interface conflicts with a network.

Parameters:
  • check_fn (callable receiving one parameter (objects.NIC) and returning boolean) - Function checking for conflict
  • action (string) - Part of error message (see code)
  • instances (list of instance objects) - the instances to check
  • lu (LogicalUnit)
Raises: