ipmininet.router.config.zebra module¶
-
class
ipmininet.router.config.zebra.
AccessList
(name=None, entries=())¶ Bases:
object
A zebra access-list class. It contains a set of AccessListEntry, which describes all prefix belonging or not to this ACL
Setup a new access-list
Parameters: - name – The name of the acl, which will default to acl## where ## is the instance number
- entries – A sequence of AccessListEntry instance, or of ip_interface which describes which prefixes are composing the ACL
-
acl_type
¶ Return the zebra string describing this ACL (access-list, prefix-list, …)
-
count
= 0¶
-
class
ipmininet.router.config.zebra.
AccessListEntry
(prefix, action='permit')¶ Bases:
object
A zebra access-list entry
Parameters: - prefix – The ip_interface prefix for that ACL entry
- action – Wether that prefix belongs to the ACL (PERMIT) or not (DENY)
-
class
ipmininet.router.config.zebra.
QuaggaDaemon
(node, **kwargs)¶ Bases:
ipmininet.router.config.base.Daemon
The base class for all Quagga-derived daemons
Parameters: - node – The node for which we build the config
- kwargs – Pre-set options for the daemon, see defaults()
-
STARTUP_LINE_EXTRA
= ''¶
-
build
()¶ Build the configuration tree for this daemon
Returns: ConfigDict-like object describing this configuration
-
dry_run
¶ The startup line to use to check that the daemon is well-configured
-
set_defaults
(defaults)¶ Parameters: debug – the set of debug events that should be logged
-
startup_line
¶ Return the corresponding startup_line for this daemon
-
zebra_socket
¶ Return the path towards the zebra API socket for the given node
-
class
ipmininet.router.config.zebra.
RouteMap
(name=None, maps=(), proto=())¶ Bases:
object
A class representing a set of route maps applied to a given protocol
Parameters: - name – The name of the route-map, defaulting to rm##
- maps – A set of RouteMapEntry, or of (action, [acl, acl, …]) tuples that will compose the route map
- proto – The set of protocols to which this route-map applies
-
count
= 0¶
-
describe
¶ Return the zebra description of this route map and apply it to the relevant protocols
-
class
ipmininet.router.config.zebra.
RouteMapEntry
(action='deny', match=(), prio=10)¶ Bases:
object
A class representing a set of match clauses in a route map with an action applied to it
Parameters: - action – Wether routes matching this route map entry will be accepted or not
- match – The set of ACL that will match in this route map entry
- prio – The priority of this route map entry wrt. other in the route map
-
class
ipmininet.router.config.zebra.
Zebra
(*args, **kwargs)¶ Bases:
ipmininet.router.config.zebra.QuaggaDaemon
-
KILL_PATTERNS
= ('zebra',)¶
-
NAME
= 'zebra'¶
-
PRIO
= 0¶
-
STARTUP_LINE_EXTRA
= '-k'¶
-
build
()¶ Build the configuration tree for this daemon
Returns: ConfigDict-like object describing this configuration
-
has_started
()¶ Return whether this daemon has started or not
-
listening
()¶
-
set_defaults
(defaults)¶ Parameters: - debug – the set of debug events that should be logged
- access_lists – The set of AccessList to create, independently from the ones already included by route_maps
- route_maps – The set of RouteMap to create
-