Home | Trees | Indices | Help |
|
---|
|
The Graph class represents the topology graph as seen by a protocol from a node. A Graph object contains a collection of Edge objects.
Instance Methods | |||
|
|||
|
|||
|
|||
list of Edge
|
|
||
|
|||
|
|||
Inherited from |
Class Variables | |
node_list = property(_get_node_list, None, _doc)
|
|
type = property(_get_type, None, _doc)
|
Properties | |
Inherited from |
Method Details |
Updates the topology graph object with a list of objects passed, based on the topology change events. If the event is: ONEP_TOPOLOGY_EDGES_ADD - The list should contain a set of EDGE object that needs to be added to the graph object. ONEP_TOPOLOGY_EDGES_DELETE - The list should contain a set of EDGE objects that needs to be removed from the graph object. ONEP_TOPOLOGY_NODES_ADD - The list should contain a set of nodes that needs to be added to the graph object. ONEP_TOPOLOGY_NODES_DELETE - The list should contain a set of nodes that needs to be remove to the graph object. Removing a node from a graph would also result in removing all IN bound and OUT bound edges associated with the node. Note: Adding a node to a graph would only reflect in the output of get_node_list() method, and the node remains orphaned.
|
Concatenate this Graph object with another. The result graph is stored in this instance of Graph. Equal nodes(NodeA, NodeA') from the two graphs and their corresponding edges are merged to form a single node, the new node contains the edges from both the nodes(NodeA, NodeA'). If there are equal edges(with the same head and tail node connectors) in the two graphs, only one is retained in the original graph Two CDP nodes are equal if they have same management IP and the hostname. Two CDP connectors are equal if they have the same IP and the interface name.
|
Get the list of edges based on the directionality in a grpah The method returns a set of edges based on the direction requested if DIRECTED edges are requested then the edges to/from Node A and Node B are treated as different edges and both edges are returned. If UNDIRECTED edges are requested then the graph is assumed symmetric and only one edge in this case is returned
|
Get the edges connected with specified node in a given direction If the input edge_type is DIRECTED then graph is asymmetric If the edge_type is UNDIRECTED then graph is symmetric |
Get the node connectors associated with specified node in the graph This method returns the list of node connectors associated with a node in a graph. Every time a graph is concatenated with another and if new set of node connectors are added to the graph, the list returned would be different.
|
str(x)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 18 09:17:34 2014 | http://epydoc.sourceforge.net |