Tease out intfList() from intfNames().
This commit is contained in:
+6
-2
@@ -369,9 +369,13 @@ class Node( object ):
|
|||||||
|
|
||||||
# Other methods
|
# 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 ):
|
def intfNames( self ):
|
||||||
"The names of our interfaces"
|
"The names of our interfaces sorted by port number"
|
||||||
return [ str( i ) for i in sorted( self.ports.values() ) ]
|
return [ str( i ) for i in self.intfList() ]
|
||||||
|
|
||||||
def __str__( self ):
|
def __str__( self ):
|
||||||
return '%s: IP=%s intfs=%s pid=%s' % (
|
return '%s: IP=%s intfs=%s pid=%s' % (
|
||||||
|
|||||||
Reference in New Issue
Block a user