All done! GUI + working version. Some few adjustments on the code to be done.
diff --git a/mininet/net.py b/mininet/net.py
index 1255e12..2d6bca6 100644
--- a/mininet/net.py
+++ b/mininet/net.py
@@ -99,6 +99,7 @@
from mininet.util import quietRun, fixLimits, numCores, ensureRoot
from mininet.util import macColonHex, ipStr, ipParse, netParse, ipAdd, nextCCNnet
from mininet.term import cleanUpScreens, makeTerms
+import pdb
# Mininet version: should be consistent with README and LICENSE
VERSION = "2.0.0"
@@ -176,18 +177,20 @@
params: parameters for host
returns: added host"""
# Default IP and MAC addresses
-
- defaults = { 'ip': ipAdd( self.nextIP,
- ipBaseNum=self.ipBaseNum,
- prefixLen=self.prefixLen ) +
- '/%s' % self.prefixLen }
- if self.autoSetMacs:
- defaults[ 'mac'] = macColonHex( self.nextIP )
- if self.autoPinCpus:
- defaults[ 'cores' ] = self.nextCore
- self.nextCore = ( self.nextCore + 1 ) % self.numCores
- self.nextIP += 1
+ #pdb.set_trace()
+ #defaults = { 'ip': ipAdd( self.nextIP,
+ #ipBaseNum=self.ipBaseNum,
+ #prefixLen=self.prefixLen ) +
+ #'/%s' % self.prefixLen }
+ #if self.autoSetMacs:
+ #defaults[ 'mac'] = macColonHex( self.nextIP )
+ #if self.autoPinCpus:
+ #defaults[ 'cores' ] = self.nextCore
+ #self.nextCore = ( self.nextCore + 1 ) % self.numCores
+ #self.nextIP += 1
+ defaults = {}
defaults.update( params )
+
if not cls:
cls = self.host
h = cls( name, **defaults )
@@ -286,17 +289,18 @@
info( '*** Creating network\n' )
- if not self.controllers:
+ #if not self.controllers:
# Add a default controller
- info( '*** Adding controller\n' )
- classes = self.controller
- if type( classes ) is not list:
- classes = [ classes ]
- for i, cls in enumerate( classes ):
- self.addController( 'c%d' % i, cls )
+ #info( '*** Adding controller\n' )
+ #classes = self.controller
+ #if type( classes ) is not list:
+ # classes = [ classes ]
+ #for i, cls in enumerate( classes ):
+ # self.addController( 'c%d' % i, cls )
info( '*** Adding hosts:\n' )
for hostName in topo.hosts():
+ #pdb.set_trace()
self.addHost( hostName, **topo.nodeInfo( hostName ) )
info( hostName + ' ' )
@@ -328,6 +332,7 @@
def build( self ):
"Build mininet."
+
if self.topo:
self.buildFromTopo( self.topo )
if ( self.inNamespace ):