faucet.router module

Configure routing between VLANs.

class faucet.router.Router(_id, dp_id, conf)[source]

Bases: faucet.conf.Conf

Implement FAUCET configuration for a router.

bgp_as()[source]

Return BGP AS.

bgp_connect_mode()[source]

Return BGP connect mode.

bgp_defaults_types = {'as': <class 'int'>, 'connect_mode': <class 'str'>, 'neighbor_addresses': <class 'list'>, 'neighbor_as': <class 'int'>, 'port': <class 'int'>, 'routerid': <class 'str'>, 'server_addresses': <class 'list'>, 'vlan': (<class 'str'>, <class 'int'>)}
bgp_ipvs()[source]

Return list of IP versions for BGP configured on this VLAN.

bgp_neighbor_addresses()[source]

Return BGP neighbor addresses.

bgp_neighbor_addresses_by_ipv(ipv)[source]

Return BGP neighbor addresses with specified IP version on this VLAN.

bgp_neighbor_as()[source]

Return BGP neighbor AS number.

bgp_port()[source]

Return BGP port.

bgp_routerid()[source]

Return BGP router ID.

bgp_server_addresses()[source]

Return BGP server addresses.

bgp_server_addresses_by_ipv(ipv)[source]

Return BGP server addresses with specified IP version on this VLAN.

bgp_vlan()[source]

Return BGP VLAN.

check_config()[source]

Check config at instantiation time for errors, typically via assert.

defaults = {'bgp': {}, 'vlans': None}
defaults_types = {'bgp': <class 'dict'>, 'vlans': <class 'list'>}
finalize()[source]

Configuration parsing marked complete.

ipaddress_fields = ('neighbor_addresses', 'server_addresses')
set_bgp_vlan(vlan)[source]

Set BGP VLAN.

set_defaults(defaults=None, conf=None)[source]

Set default values and run any basic sanity checks.

vip_map(ipa)[source]

Return VIP for IP address, if any.