'Removes (deallocates) and deletes the floating IP.
This api call was added to allow this to be done in one operation
if using neutron.'

def disassociate_and_release_floating_ip(self, context, instance, floating_ip):

    @base_api.refresh_cache
    def _release_floating_ip_and_refresh_cache(self, context, instance, floating_ip):
        self._release_floating_ip(context, floating_ip['address'], raise_if_associated=False)
    if instance:
        _release_floating_ip_and_refresh_cache(self, context, instance, floating_ip)
    else:
        self._release_floating_ip(context, floating_ip['address'], raise_if_associated=False)
