'Called by dhcp-bridge when IP is released.'

def release_fixed_ip(self, context, address, mac=None):

    LOG.debug('Released    IP    |%s|', address)
    fixed_ip = objects.FixedIP.get_by_address(context, address)
    if (fixed_ip.instance_uuid is None):
        LOG.warning(_LW('IP    %s    released    that    is    not    associated'), fixed_ip)
        return
    if (not fixed_ip.leased):
        LOG.warning(_LW('IP    %s    released    that    was    not    leased'), fixed_ip, instance_uuid=fixed_ip.instance_uuid)
    else:
        fixed_ip.leased = False
        fixed_ip.save()
    if (not fixed_ip.allocated):
        if mac:
            LOG.debug('Checking    to    see    if    virtual    interface    with    MAC    %(mac)s    is    still    associated    to    instance.', {'mac': mac}, instance_uuid=fixed_ip.instance_uuid)
            vif = objects.VirtualInterface.get_by_address(context, mac)
            if vif:
                LOG.debug('Found    VIF:    %s', vif, instance_uuid=fixed_ip.instance_uuid)
                if (vif.instance_uuid != fixed_ip.instance_uuid):
                    LOG.info(_LI("Ignoring    request    to    release    fixed    IP    %(address)s    with    MAC    %(mac)s    since    it    is    now    associated    with    a    new    instance    that    is    in    the    process    of    allocating    it's    network."), {'address': address, 'mac': mac}, instance_uuid=fixed_ip.instance_uuid)
                    return
            else:
                LOG.debug('No    VIF    was    found    for    MAC:    %s', mac, instance_uuid=fixed_ip.instance_uuid)
        LOG.debug('Disassociating    fixed    IP    %s    from    instance.', address, instance_uuid=fixed_ip.instance_uuid)
        fixed_ip.disassociate()
