faucet.valve_host module

Manage host learning on VLANs.

class faucet.valve_host.ValveHostFlowRemovedManager(logger, ports, vlans, eth_src_table, eth_dst_table, eth_dst_hairpin_table, pipeline, learn_timeout, learn_jitter, learn_ban_timeout, cache_update_guard_time, idle_dst, stack)[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(now, 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, eth_dst_hairpin_table, pipeline, learn_timeout, learn_jitter, learn_ban_timeout, cache_update_guard_time, idle_dst, stack)[source]

Bases: faucet.valve_manager_base.ValveManagerBase

Manage host learning on VLANs.

add_port(port)[source]

initialise override_output_port if necessary

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

del_port(port)[source]

delete flows in response to a port removal

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(_now, _table_id, _match)[source]

Handle a flow timed out message from dataplane.

initialise_tables()[source]

initialise tables controlled by this manager

learn_host_on_vlan_port_flows(port, vlan, eth_src, delete_existing, refresh_rules, 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(now, 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.