def release_floating_ip_from_instance(self, instance):
        if not instance.external_ips:
            return

        membership = instance.cloud_project_membership
        try:
            floating_ip = membership.floating_ips.get(
                status='ACTIVE',
                address=instance.external_ips,
                backend_network_id=membership.external_network_id
            )
        except (__HOLE__, MultipleObjectsReturned):
            logger.warning('Failed to release floating ip %s from instance %s',
                           instance.external_ips, instance.uuid)
        else:
            floating_ip.status = 'DOWN'
            floating_ip.save()
            logger.info('Successfully released floating ip %s from instance %s',
                        instance.external_ips, instance.uuid)
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/backend.py/OpenStackBackend.release_floating_ip_from_instance