The Assimilation Project  based on Assimilation version
cma.linkdiscovery.LinkDiscoveryListener Class Reference
Inheritance diagram for cma.linkdiscovery.LinkDiscoveryListener:
Collaboration diagram for cma.linkdiscovery.LinkDiscoveryListener:

Public Member Functions

def processpkt (self, drone, srcaddr, jsonobj, discoverychanged)
def processpkt_netconfig (self, drone, _unused_srcaddr, jsonobj)
def processpkt_linkdiscovery (self, drone, _unused_srcaddr, jsonobj)

Static Public Attributes

 prio = DiscoveryListener.PRI_OPTION
tuple wantedpackets = ('__LinkDiscovery', 'netconfig')

Detailed Description

Class for processing Link Discovery JSON messages
We create the System nodes for switches we discover and
any NIC nodes for the port we're connected to and any other
NICs that the switch tells us about.
We also create 'wiredto' relationships between host NICs and switch NICs.

Note that all the CDP and LLDP packets are sent intact (in binary) from the
nanoprobes then post-processed by the CMA to create the JSON which we
receive here just as though the nanoprobe had sent us JSON in the first place.

Definition at line 55 of file

Member Function Documentation

def cma.linkdiscovery.LinkDiscoveryListener.processpkt (   self,
Trigger Switch discovery or add Low Level (Link Level) discovery data to the database.

Definition at line 73 of file

References cma.linkdiscovery.LinkDiscoveryListener.processpkt_linkdiscovery(), cma.linkdiscovery.LinkDiscoveryListener.processpkt_netconfig(), and cma.arpdiscovery.ArpDiscoveryListener.processpkt_netconfig().

Here is the call graph for this function:

def cma.linkdiscovery.LinkDiscoveryListener.processpkt_linkdiscovery (   self,

Definition at line 110 of file

References cma.linkdiscovery.LinkDiscoveryListener._process_mgmt_addr(), and cma.linkdiscovery.LinkDiscoveryListener._process_ports().

Referenced by cma.linkdiscovery.LinkDiscoveryListener.processpkt().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.linkdiscovery.LinkDiscoveryListener.processpkt_netconfig (   self,
We want to trigger Switch discovery when we hear a 'netconfig' packet

Build up the parameters for the discovery
action, then send it to drone.request_discovery(...)
To build up the parameters, you use ConfigFile.agent_params()
which will pull values from the system configuration.

Definition at line 85 of file

References _Listener.config, cma.dispatchtarget.DispatchTarget.config, cma.discoverylistener.DiscoveryListener.config, cma.packetlistener.PacketListener.config, cma.assimcli.DummyIO.config, cma.tests.cma_test.IOTestIO.config, obsolete_cma.DispatchTarget.config, obsolete_cma.PacketListener.config, cma.AssimCclasses.pyNetIO.config, and cma.linkdiscovery.discovery_indicates_link_is_up().

Referenced by cma.linkdiscovery.LinkDiscoveryListener.processpkt().

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

cma.linkdiscovery.LinkDiscoveryListener.prio = DiscoveryListener.PRI_OPTION
tuple cma.linkdiscovery.LinkDiscoveryListener.wantedpackets = ('__LinkDiscovery', 'netconfig')

Definition at line 68 of file

The documentation for this class was generated from the following file: