'Removes an IP from an instance.'

@wsgi.Controller.api_version('2.1', '2.43')
@wsgi.response(202)
@wsgi.action('removeFixedIp')
@extensions.expected_errors((400, 404))
@validation.schema(multinic.remove_fixed_ip)
def _remove_fixed_ip(self, req, id, body):

    context = req.environ['nova.context']
    context.can(multinic_policies.BASE_POLICY_NAME)
    instance = common.get_instance(self.compute_api, context, id)
    address = body['removeFixedIp']['address']
    try:
        self.compute_api.remove_fixed_ip(context, instance, address)
    except exception.InstanceUnknownCell as e:
        raise exc.HTTPNotFound(explanation=e.format_message())
    except exception.FixedIpNotFoundForSpecificInstance as e:
        raise exc.HTTPBadRequest(explanation=e.format_message())
