This patch extends the gnt-instance info again. If vnc_bind_address is
set to 127.0.0.1 then the 'VNC console port' line will also print the
nodename on which to connect to localhost.
While this duplicates info from the Node:primary output, it should make
it simpler for scripts that look for VNC console port information.
Reviewed-by: ultrotter
if instance.network_port is None:
vnc_console_port = None
elif instance.vnc_bind_address == constants.BIND_ADDRESS_GLOBAL:
- vnc_console_port = "%s:%s"% (instance.primary_node,
+ vnc_console_port = "%s:%s" % (instance.primary_node,
instance.network_port)
+ elif instance.vnc_bind_address == constants.LOCALHOST_IP_ADDRESS:
+ vnc_console_port = "%s:%s on node %s" % (instance.vnc_bind_address,
+ instance.network_port,
+ instance.primary_node)
else:
vnc_console_port = "%s:%s" % (instance.vnc_bind_address,
instance.network_port)