fixing CLI host rewriting when host's default interface does not have an IP
This commit is contained in:
+2
-1
@@ -331,7 +331,8 @@ class CLI( Cmd ):
|
|||||||
node = self.mn[ first ]
|
node = self.mn[ first ]
|
||||||
rest = args.split( ' ' )
|
rest = args.split( ' ' )
|
||||||
# Substitute IP addresses for node names in command
|
# Substitute IP addresses for node names in command
|
||||||
rest = [ self.mn[ arg ].defaultIntf().updateIP()
|
# If updateIP() returns None, then use node name
|
||||||
|
rest = [ self.mn[ arg ].defaultIntf().updateIP() or arg
|
||||||
if arg in self.mn else arg
|
if arg in self.mn else arg
|
||||||
for arg in rest ]
|
for arg in rest ]
|
||||||
rest = ' '.join( rest )
|
rest = ' '.join( rest )
|
||||||
|
|||||||
Reference in New Issue
Block a user