faucet.valve_lldp module

Manage LLDP.

class faucet.valve_lldp.ValveLLDPManager(vlan_table, highest_priority, logger, notify, inc_var, set_var, set_port_var, stack_manager)[source]

Bases: ValveManagerBase

Manage LLDP.

add_port(port)[source]

install flows in response to a new port

del_port(port)[source]

delete flows in response to a port removal

Update the stack link states of the set of provided stack ports

Parameters:
  • ports (list) – List of stack ports to update the state of

  • now (float) – Current time

  • valve (Valve) – Valve that owns this LLDPManager instance

  • other_valves (list) – List of other valves

Returns:

ofmsgs by valve

Return type:

dict

verify_lldp(port, now, valve, other_valves, remote_dp_id, remote_dp_name, remote_port_id, remote_port_state)[source]

Verify correct LLDP cabling, then update port to next state

Parameters:
  • port (Port) – Port that received the LLDP

  • now (float) – Current time

  • other_valves (list) – Other valves in the topology

  • remote_dp_id (int) – Received LLDP remote DP ID

  • remote_dp_name (str) – Received LLDP remote DP name

  • remote_port_id (int) – Recevied LLDP port ID

  • remote_port_state (int) – Received LLDP port state

Returns:

Ofmsgs by valve

Return type:

dict