Mininet Python API Reference Manual
Public Member Functions | Public Attributes | List of all members
mininet.topo.MultiGraph Class Reference

Utility class to track nodes and edges - replaces networkx.MultiGraph. More...

Inheritance diagram for mininet.topo.MultiGraph:

Public Member Functions

def __init__
 
def add_node
 Add node to graph. More...
 
def add_edge
 Add edge to graph. More...
 
def nodes
 Return list of graph nodes. More...
 
def edges_iter
 Iterator: return graph edges.
 
def edges
 Return list of graph edges.
 
def __getitem__
 Return link dict for given src node.
 
def __len__
 Return the number of nodes.
 
def convertTo
 Convert to a new object of networkx.MultiGraph-like class cls. More...
 

Public Attributes

 node
 
 edge
 

Detailed Description

Utility class to track nodes and edges - replaces networkx.MultiGraph.

Member Function Documentation

def mininet.topo.MultiGraph.add_edge (   self,
  src,
  dst,
  key = None,
  attr_dict = None,
  attrs 
)

Add edge to graph.

Parameters
keyoptional key
attr_dictoptional attribute dict
attrsmore attributes
warningudpates attr_dict with attrs
def mininet.topo.MultiGraph.add_node (   self,
  node,
  attr_dict = None,
  attrs 
)

Add node to graph.

Parameters
attr_dictattribute dict (optional)
attrsmore attributes (optional)
warningupdates attr_dict with attrs
def mininet.topo.MultiGraph.convertTo (   self,
  cls,
  data = False,
  keys = False 
)

Convert to a new object of networkx.MultiGraph-like class cls.

Parameters
datainclude node and edge data
keysinclude edge keys as well as edge data
def mininet.topo.MultiGraph.nodes (   self,
  data = False 
)

Return list of graph nodes.

Parameters
datareturn list of ( node, attrs)

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