Xen: Remove one hardcoded constant
authorGuido Trotter <ultrotter@google.com>
Tue, 10 Mar 2009 15:02:43 +0000 (15:02 +0000)
committerGuido Trotter <ultrotter@google.com>
Tue, 10 Mar 2009 15:02:43 +0000 (15:02 +0000)
s/"vnc_bind_address"/constants.HV_VNC_BIND_ADDRESS/

Reviewed-by: imsnah

lib/hypervisor/hv_xen.py

index efc9364..eaa7ec6 100644 (file)
@@ -597,7 +597,7 @@ class XenHvmHypervisor(XenHypervisor):
     if hvp[constants.HV_VNC_BIND_ADDRESS] is None:
       config.write("vnclisten = '%s'\n" % constants.VNC_DEFAULT_BIND_ADDRESS)
     else:
-      config.write("vnclisten = '%s'\n" % hvp["vnc_bind_address"])
+      config.write("vnclisten = '%s'\n" % hvp[constants.HV_VNC_BIND_ADDRESS])
 
     if instance.network_port > constants.VNC_BASE_PORT:
       display = instance.network_port - constants.VNC_BASE_PORT