The networking_cisco.apps.saf.agent.topo_disc.topo_disc
Module¶
This file contains the implementation of Topology Discovery of servers and their associated leaf switches using Open source implementation of LLDP. www.open-lldp.org
-
class
networking_cisco.apps.saf.agent.topo_disc.topo_disc.
TopoDisc
(cb, root_helper, intf_list=None, all_intf=True)¶ Bases:
networking_cisco.apps.saf.agent.topo_disc.topo_disc.TopoDiscPubApi
Topology Discovery Top level class once.
-
cfg_intf
(protocol_interface, phy_interface=None)¶ Called by application to add an interface to the list.
-
cfg_lldp_interface
(protocol_interface, phy_interface=None)¶ Cfg LLDP on interface and create object.
-
cfg_lldp_interface_list
(intf_list)¶ This routine configures LLDP on the given interfaces list.
-
cmp_store_tlv_params
(intf, tlv_data)¶ Compare and store the received TLV.
Compares the received TLV with stored TLV. Store the new TLV if it is different.
-
create_attr_obj
(protocol_interface, phy_interface)¶ Creates the local interface attribute object and stores it.
-
get_attr_obj
(intf)¶ Retrieve the interface object.
-
periodic_discovery_task
()¶ Periodic task that checks the interface TLV attributes.
-
uncfg_intf
(intf)¶ Called by application to remove an interface to the list.
From an applications perspective, it makes sense to have this function. But, here no action can be taken for the following reasons, but just having it as a place-holder for tomorrow. => Can’t remove interface from the list since DB in server may appear stale. self.intf_list.remove(intf) => One can just remove the interface DB, but need to retry that till it succeeds, so it has to be in periodic loop. => So, currently leaving it as is, since LLDP frames won’t be obtained over the bridge, the periodic handler will automatically remove the DB for this interface from server
-
-
class
networking_cisco.apps.saf.agent.topo_disc.topo_disc.
TopoDiscPubApi
¶ Bases:
object
-
classmethod
get_lldp_status
(intf)¶ Retrieves the LLDP status.
-
classmethod
store_obj
(intf, obj)¶ Stores the topo object.
-
topo_intf_obj_dict
= {}¶
-
classmethod
-
class
networking_cisco.apps.saf.agent.topo_disc.topo_disc.
TopoIntfAttr
(protocol_interface, phy_interface)¶ Bases:
object
Class that stores the interface attributes.
-
cmp_update_bond_intf
(bond_interface)¶ Update the bond interface and its members.
Update the bond interface, if this interface is a part of bond Return True if there’s a change.
-
get_db_retry_status
()¶ Retrieve the RPC retru status.
This retrieves the number of times RPC was retried with the server.
-
get_lldp_status
()¶ Retrieve the LLDP cfg status.
-
get_phy_interface
()¶ Retrieves the physical interface.
-
get_topo_disc_send_cnt
()¶ Retrieve the topology status send count for this interface.
-
incr_topo_disc_send_cnt
()¶ Increment the topology status send count for this interface.
-
init_params
(protocol_interface, phy_interface)¶ Initializing parameters.
-
remote_chassis_id_mac_uneq_store
(remote_chassis_id_mac)¶ This function saves the Chassis MAC, if different from stored.
-
remote_evb_cfgd_uneq_store
(remote_evb_cfgd)¶ This saves the EVB cfg, if it is not the same as stored.
-
remote_evb_mode_uneq_store
(remote_evb_mode)¶ Saves the EVB mode, if it is not the same as stored.
-
remote_mgmt_addr_uneq_store
(remote_mgmt_addr)¶ This function saves the MGMT address, if different from stored.
-
remote_port_id_mac_uneq_store
(remote_port_id_mac)¶ This function saves the port MAC, if different from stored.
-
remote_port_uneq_store
(remote_port)¶ This function saves the port, if different from stored.
-
remote_sys_desc_uneq_store
(remote_system_desc)¶ This function saves the system desc, if different from stored.
-
remote_sys_name_uneq_store
(remote_system_name)¶ This function saves the system name, if different from stored.
-
reset_topo_disc_send_cnt
()¶ Reset the topology status send count for this interface.
-
store_db_retry_status
(status)¶ This stores the number of times RPC was retried with the server.
-
update_lldp_status
(status)¶ Update the LLDP cfg status.
-