Tease out intfList() from intfNames().

This commit is contained in:
Bob Lantz
2012-03-02 20:34:37 -08:00
parent a6bcad8f48
commit 03dd914edc
+6 -2
View File
@@ -369,9 +369,13 @@ class Node( object ):
# Other methods
def intfList( self ):
"List of our interfaces sorted by port number"
return [ self.intfs[ p ] for p in sorted( self.intfs.iterkeys() ) ]
def intfNames( self ):
"The names of our interfaces"
return [ str( i ) for i in sorted( self.ports.values() ) ]
"The names of our interfaces sorted by port number"
return [ str( i ) for i in self.intfList() ]
def __str__( self ):
return '%s: IP=%s intfs=%s pid=%s' % (