ifupdownmain is the main ifupdown module.
ifupdown2 network interface object
It is modeled based on the ‘iface’ section in /etc/network/interfaces file. But can be extended to include any other network interface format
ifupdown2 iface object class
name Name of the interface
config dictionary of config lines for this interface
flags Internal flags used by iface processing
priv_flags private flags owned by module using this class
auto True if interface belongs to the auto class
classes List of classes the interface belongs to
raw_config raw interface config from file
add to the list of upperifaces
add to the list of upperifaces
get first value of the specified attr name
get n’th value of the specified attr name
add attribute name and value to the interface config
add attribute name and value to the interface config and also update the config_status dict with status of this attribute config
get status of a attribute config on this interface.
Looks at the iface _config_status dict
compares iface object with iface object passed as argument
Returns True if object self is same as dstiface and False otherwise
Enumerates iface state
Enumerates iface status
debian ifupdown /etc/network/interfaces file parser
This member function loads the networkinterfaces file.
Assumes networkinterfaces parser object is initialized with the parser arguments
This member function registers callback functions.
callback_name (str): callback function name (supported names: ‘iface_found’, ‘validateifaceattr’, ‘validateifaceobj’)
callback_func (function pointer): callback function pointer
Warns on error
class with helper methods for pickling/unpickling iface objects
pickle a list of iface objects
pickle iface object
load picked iface object
state manager for managing ifupdown iface obj state
ifupdown2 has to maitain old objects for down operation on interfaces. ie to down or delete old configuration.
This class uses pickle to store iface objects.
This member function reads saved iface objects
saves state (ifaceobjects) to persistent state file
graph functions to sort and print interface graph
runs topological sort on interface list passed as dependency graph
indegrees_arg (dict): indegrees array for all interfaces
spits out interface dependency graph in dot format
indegrees_arg (dict): indegrees array for all interfaces