Module network
source code
Logical units dealing with networks.
Imports:
constants,
errors,
locking,
network,
objects,
qlang,
query,
utils,
LogicalUnit,
NoHooksLU,
QueryBase,
ShareAll,
CheckNodeGroupInstances
_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:
|