Library scope: | TEST |
---|
Topology class provide topology database and provide many method to get property of topology.
node_boilerplate = {u'type': u'MD_SAL', u'id': u'openflow:%d'}
For a tree structure, it numerates leaf nodes by following depth-first strategy @parameter fanout: fanout of tree @parameter depth: total depth of a tree @return leafnodes: list of ids of leaf nodes
get nodes from topology database by topology tree level
This function generates a dictionary that contains type and id of each node. It follows tree level topology. @parameter topo: either an interer (in this case, depth is set and fanout will be 2) or a string in format of "(a,b)" (a and b are integers and they stands for depth and fanout respectively) @return array of dicitonary objects that contains info about each node