ironic_python_agent.netutils module¶
-
class
ironic_python_agent.netutils.
RawPromiscuousSockets
(interface_names, protocol)[source]¶ Bases:
object
-
ironic_python_agent.netutils.
get_default_ip_addr
(type, interface_id)[source]¶ Retrieve default IPv4 or IPv6 address.
-
ironic_python_agent.netutils.
get_lldp_info
(interface_names)[source]¶ Get LLDP info from the switch(es) the agent is connected to.
Listens on either a single or all interfaces for LLDP packets, then parses them. If no LLDP packets are received before lldp_timeout, returns a dictionary in the form {‘interface’: [],…}.
- Parameters
interface_names – The interface to listen for packets on. If None, will listen on each interface.
- Returns
A dictionary in the form {‘interface’: [(lldp_type, lldp_data)],…}