faucet.port module¶
Port configuration.
-
class
faucet.port.
Port
(_id, dp_id, conf=None)[source]¶ Bases:
faucet.conf.Conf
Stores state for ports, including the configuration.
-
defaults
= {'acl_in': None, 'acls_in': None, 'description': None, 'dot1x': False, 'dot1x_acl': False, 'enabled': True, 'hairpin': False, 'hairpin_unicast': False, 'lacp': 0, 'lacp_active': False, 'lacp_passthrough': None, 'lacp_resp_interval': 1, 'lldp_beacon': {}, 'lldp_peer_mac': None, 'loop_protect': False, 'loop_protect_external': False, 'max_hosts': 255, 'max_lldp_lost': 3, 'mirror': None, 'name': None, 'native_vlan': None, 'number': None, 'opstatus_reconf': True, 'output_only': False, 'override_output_port': None, 'permanent_learn': False, 'receive_lldp': False, 'stack': None, 'tagged_vlans': None, 'unicast_flood': True}¶
-
defaults_types
= {'acl_in': (<class 'str'>, <class 'int'>), 'acls_in': <class 'list'>, 'description': <class 'str'>, 'dot1x': <class 'bool'>, 'dot1x_acl': <class 'bool'>, 'enabled': <class 'bool'>, 'hairpin': <class 'bool'>, 'hairpin_unicast': <class 'bool'>, 'lacp': <class 'int'>, 'lacp_active': <class 'bool'>, 'lacp_passthrough': <class 'list'>, 'lacp_resp_interval': <class 'int'>, 'lldp_beacon': <class 'dict'>, 'lldp_peer_mac': <class 'str'>, 'loop_protect': <class 'bool'>, 'loop_protect_external': <class 'bool'>, 'max_hosts': <class 'int'>, 'max_lldp_lost': <class 'int'>, 'mirror': (<class 'list'>, <class 'str'>, <class 'int'>), 'name': <class 'str'>, 'native_vlan': (<class 'str'>, <class 'int'>), 'number': <class 'int'>, 'opstatus_reconf': <class 'bool'>, 'output_only': <class 'bool'>, 'override_output_port': (<class 'str'>, <class 'int'>), 'permanent_learn': <class 'bool'>, 'receive_lldp': <class 'bool'>, 'stack': <class 'dict'>, 'tagged_vlans': <class 'list'>, 'unicast_flood': <class 'bool'>}¶
-
hosts
(vlans=None)[source]¶ Return all host cache entries this port has learned (on all or specified VLANs).
-
hosts_count
(vlans=None)[source]¶ Return count of all hosts this port has learned (on all or specified VLANs).
-
lldp_beacon_defaults_types
= {'enable': <class 'bool'>, 'org_tlvs': <class 'list'>, 'port_descr': <class 'str'>, 'system_name': <class 'str'>}¶
-
lldp_org_tlv_defaults_types
= {'info': (<class 'str'>, <class 'bytearray'>), 'oui': (<class 'int'>, <class 'bytearray'>), 'subtype': (<class 'int'>, <class 'bytearray'>)}¶
-
stack_defaults_types
= {'dp': <class 'str'>, 'port': (<class 'str'>, <class 'int'>)}¶
-