Skip to content
Snippets Groups Projects
Commit a3879524 authored by Brian O'Connor's avatar Brian O'Connor
Browse files

fixed host ip assignment and shutdown with xterms

fixes #189
parent 7523c420
No related branches found
No related tags found
No related merge requests found
......@@ -563,7 +563,9 @@ def build( self ):
if 'Switch' in tags:
net.addSwitch( name )
elif 'Host' in tags:
net.addHost( name, ip=ipStr( nodeNum ) )
#Generate IP adddress in the 10.0/8 block
ipAddr = ( 10 << 24 ) + nodeNum
net.addHost( name, ip=ipStr( ipAddr ) )
else:
raise Exception( "Cannot create mystery node: " + name )
# Make links
......@@ -601,8 +603,7 @@ def xterm( self, _ignore=None ):
if name not in self.net.nameToNode:
return
term = makeTerm( self.net.nameToNode[ name ], 'Host' )
self.net.terms.append( term )
self.net.terms += term
def miniEditImages():
"Create and return images for MiniEdit."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment