def _check_graphics_addresses_can_live_migrate(self, listen_addrs):
    LOCAL_ADDRS = ('0.0.0.0', '127.0.0.1', '::', '::1')
    local_vnc = (CONF.vncserver_listen in LOCAL_ADDRS)
    local_spice = (CONF.spice.server_listen in LOCAL_ADDRS)
    if ((CONF.vnc_enabled and (not local_vnc)) or (CONF.spice.enabled and (not local_spice))):
        raise exception.MigrationError(_('Your libvirt version does not support the VIR_DOMAIN_XML_MIGRATABLE flag or your destination node does not support retrieving listen addresses.  In order for live migration to work properly, you must configure the graphics (VNC and/or SPICE) listen addresses to be either the catch-all address (0.0.0.0 or ::) or the local address (127.0.0.1 or ::1).'))
    if (listen_addrs is not None):
        dest_local_vnc = (listen_addrs['vnc'] in LOCAL_ADDRS)
        dest_local_spice = (listen_addrs['spice'] in LOCAL_ADDRS)
        if ((CONF.vnc_enabled and (not dest_local_vnc)) or (CONF.spice.enabled and (not dest_local_spice))):
            LOG.warn(_('Your libvirt version does not support the VIR_DOMAIN_XML_MIGRATABLE flag, and the  graphics (VNC and/or SPICE) listen addresses on the destination node do not match the addresses on the source node. Since the source node has listen addresses set to either the catch-all address (0.0.0.0 or ::) or the local address (127.0.0.1 or ::1), the live migration will succeed, but the VM will continue to listen on the current addresses.'))
def _check_graphics_addresses_can_live_migrate(self, listen_addrs):
    LOCAL_ADDRS = ('0.0.0.0', '127.0.0.1', '::', '::1')
    local_vnc = (CONF.vncserver_listen in LOCAL_ADDRS)
    local_spice = (CONF.spice.server_listen in LOCAL_ADDRS)
    if ((CONF.vnc_enabled and (not local_vnc)) or (CONF.spice.enabled and (not local_spice))):
        raise exception.MigrationError(_('Your libvirt version does not support the VIR_DOMAIN_XML_MIGRATABLE flag or your destination node does not support retrieving listen addresses.  In order for live migration to work properly, you must configure the graphics (VNC and/or SPICE) listen addresses to be either the catch-all address (0.0.0.0 or ::) or the local address (127.0.0.1 or ::1).'))
    if (listen_addrs is not None):
        dest_local_vnc = (listen_addrs['vnc'] in LOCAL_ADDRS)
        dest_local_spice = (listen_addrs['spice'] in LOCAL_ADDRS)
        if ((CONF.vnc_enabled and (not dest_local_vnc)) or (CONF.spice.enabled and (not dest_local_spice))):
            LOG.warn(_('Your libvirt version does not support the VIR_DOMAIN_XML_MIGRATABLE flag, and the  graphics (VNC and/or SPICE) listen addresses on the destination node do not match the addresses on the source node. Since the source node has listen addresses set to either the catch-all address (0.0.0.0 or ::) or the local address (127.0.0.1 or ::1), the live migration will succeed, but the VM will continue to listen on the current addresses.'))