@@ -563,7 +563,9 @@ class MiniEdit( Frame ):
|
|||||||
if 'Switch' in tags:
|
if 'Switch' in tags:
|
||||||
net.addSwitch( name )
|
net.addSwitch( name )
|
||||||
elif 'Host' in tags:
|
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:
|
else:
|
||||||
raise Exception( "Cannot create mystery node: " + name )
|
raise Exception( "Cannot create mystery node: " + name )
|
||||||
# Make links
|
# Make links
|
||||||
@@ -601,8 +603,7 @@ class MiniEdit( Frame ):
|
|||||||
if name not in self.net.nameToNode:
|
if name not in self.net.nameToNode:
|
||||||
return
|
return
|
||||||
term = makeTerm( self.net.nameToNode[ name ], 'Host' )
|
term = makeTerm( self.net.nameToNode[ name ], 'Host' )
|
||||||
self.net.terms.append( term )
|
self.net.terms += term
|
||||||
|
|
||||||
|
|
||||||
def miniEditImages():
|
def miniEditImages():
|
||||||
"Create and return images for MiniEdit."
|
"Create and return images for MiniEdit."
|
||||||
|
|||||||
Reference in New Issue
Block a user