def action(self, req, id, body):
        context = req.environ['nova.context']
        authorize(context)

        if 'reserve' in body:
            return self._set_reserved(context, id, True)
        elif 'unreserve' in body:
            return self._set_reserved(context, id, False)
        else:
            raise webob.exc.HTTPBadRequest(
                explanation="No valid action specified")
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/contrib/fixed_ips.py/FixedIPController.action/original