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

Topology for a tree network with a given depth and fanout. More...

Inheritance diagram for mininet.topolib.TreeTopo:
mininet.topo.Topo

Public Member Functions

def build (self, depth=1, fanout=2)
 
def addTree (self, depth, fanout)
 Add a subtree starting with node n. More...
 
- Public Member Functions inherited from mininet.topo.Topo
def __init__ (self, *args, **params)
 Topo object. More...
 
def build (self, *args, **params)
 Override this method to build your topology.
 
def addNode (self, name, **opts)
 Add Node to graph. More...
 
def addHost (self, name, **opts)
 Convenience. More...
 
def addSwitch (self, name, **opts)
 Convenience. More...
 
def addLink (self, node1, node2, port1=None, port2=None, key=None, **opts)
 node1, More...
 
def nodes (self, sort=True)
 Return nodes in graph.
 
def isSwitch (self, n)
 Returns true if node is a switch.
 
def switches (self, sort=True)
 Return switches. More...
 
def hosts (self, sort=True)
 Return hosts. More...
 
def iterLinks (self, withKeys=False, withInfo=False)
 Return links (iterator) More...
 
def links (self, sort=False, withKeys=False, withInfo=False)
 Return links. More...
 
def addPort (self, src, dst, sport=None, dport=None)
 Generate port mapping for new edge. More...
 
def port (self, src, dst)
 Get port numbers. More...
 
def linkInfo (self, src, dst, key=None)
 Return link metadata dict.
 
def setlinkInfo (self, src, dst, info, key=None)
 Set link metadata dict.
 
def nodeInfo (self, name)
 Return metadata (dict) for node.
 
def setNodeInfo (self, name, info)
 Set metadata (dict) for node.
 
def convertTo (self, cls, data=True, keys=True)
 Convert to a new object of networkx.MultiGraph-like class cls. More...
 

Public Attributes

 hostNum
 
 switchNum
 
- Public Attributes inherited from mininet.topo.Topo
 g
 
 hopts
 
 sopts
 
 lopts
 
 ports
 

Additional Inherited Members

- Static Public Member Functions inherited from mininet.topo.Topo
def sorted (items)
 Items sorted in natural (i.e. More...
 

Detailed Description

Topology for a tree network with a given depth and fanout.

Member Function Documentation

◆ addTree()

def mininet.topolib.TreeTopo.addTree (   self,
  depth,
  fanout 
)

Add a subtree starting with node n.

Returns
last node added

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