faucet.valve_host module

Manage host learning on VLANs.

class faucet.valve_host.ValveHostFlowRemovedManager(logger, ports, vlans, eth_src_table, eth_dst_table, learn_timeout, learn_jitter, learn_ban_timeout, low_priority, host_priority)[source]

Bases: faucet.valve_host.ValveHostManager

Trigger relearning on flow removed notifications.

Note

not currently reliable.

expire_hosts_from_vlan(_vlan, _now)[source]

Expire hosts from VLAN cache.

flow_timeout(table_id, match)[source]

Handle a flow timed out message from dataplane.

learn_host_timeouts(port)[source]

Calculate flow timeouts for learning on a port.

class faucet.valve_host.ValveHostManager(logger, ports, vlans, eth_src_table, eth_dst_table, learn_timeout, learn_jitter, learn_ban_timeout, low_priority, host_priority)[source]

Bases: object

Manage host learning on VLANs.

CACHE_UPDATE_GUARD_TIME = 2
ban_rules(pkt_meta)[source]

Limit learning to a maximum configured on this port/VLAN.

Parameters:pkt_meta – PacketMeta instance.
Returns:OpenFlow messages, if any.
Return type:list
delete_host_from_vlan(eth_src, vlan)[source]

Delete a host from a VLAN.

expire_hosts_from_vlan(vlan, now)[source]

Expire hosts from VLAN cache.

flow_timeout(_table_id, _match)[source]

Handle a flow timed out message from dataplane.

learn_host_on_vlan_port_flows(port, vlan, eth_src, delete_existing, src_rule_idle_timeout, src_rule_hard_timeout, dst_rule_idle_timeout)[source]

Return flows that implement learning a host on a port.

learn_host_on_vlan_ports(port, vlan, eth_src, delete_existing=True, last_dp_coldstart_time=None)[source]

Learn a host on a port.

learn_host_timeouts(port)[source]

Calculate flow timeouts for learning on a port.