Commit 14f5f1b6 authored by Manuel Franceschini's avatar Manuel Franceschini
Browse files

Replace '0.0.0.0' with constant


Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 9769bb78
......@@ -551,7 +551,7 @@ def GenericMain(daemon_name, optionparser, dirs, check_fn, exec_fn,
choices=["no", "yes", "only"])
if daemon_name in constants.DAEMONS_PORTS:
default_bind_address = "0.0.0.0"
default_bind_address = constants.IP4_ADDRESS_ANY
default_port = utils.GetDaemonPort(daemon_name)
# For networked daemons we allow choosing the port and bind address
......
......@@ -517,7 +517,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if utils.IsValidIP(vnc_bind_address):
if instance.network_port > constants.VNC_BASE_PORT:
display = instance.network_port - constants.VNC_BASE_PORT
if vnc_bind_address == '0.0.0.0':
if vnc_bind_address == constants.IP4_ADDRESS_ANY:
vnc_arg = ':%d' % (display)
else:
vnc_arg = '%s:%d' % (vnc_bind_address, display)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment