libioc.Network module¶
ioc network abstraction module.
-
class
libioc.Network.Network(jail, nic=None, ipv4_addresses=None, ipv6_addresses=None, mtu=None, bridge=None, logger=None)[source]¶ Bases:
objectNetworking for VNET jails.
VNET Jails may have access to different networks. Each is identified by a network interface name that is unique to the jail.
A Network is configured with IPv4 and IPv6 addresses, a bridge interface and an optional MTU.
-
property
epair_id¶ Return a unique ID for the jail network device combination.
- Return type
int
-
property
mtu¶ Return the configured MTU.
- Return type
int
-
nic= 'vnet0'¶
-
property
nic_local_description¶ Return the description text of the local NIC.
- Return type
str
-
setup(event_scope=None)[source]¶ Apply the network configuration.
Jails call this method to create the network after being started and configure the interfaces on jail and host side according to the class attributes.
- Return type
Generator[VnetInterfaceConfig,None,None]
-
teardown(jid=None, event_scope=None)[source]¶ Teardown the applied changes.
After Jails are stopped the devices that were used by it remain on the host. This method is called by jails after they terminated.
- Return type
Generator[VnetInterfaceConfig,None,None]
-
property