Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/nova/api/openstack/compute/server_tags.py b/nova/api/openstack/compute/server_tags.py
- index 7b6238c..0c1861e 100644
- --- a/nova/api/openstack/compute/server_tags.py
- +++ b/nova/api/openstack/compute/server_tags.py
- @@ -96,14 +96,18 @@ class ServerTagsController(wsgi.Controller):
- @extensions.expected_errors((400, 404, 409))
- @validation.schema(schema.update)
- def update(self, req, server_id, id, body):
- + LOG.error('DAN: update')
- context = req.environ["nova.context"]
- context.can(st_policies.POLICY_ROOT % 'update')
- try:
- im = objects.InstanceMapping.get_by_instance_uuid(context,
- server_id)
- except exception.InstanceMappingNotFound as e:
- + LOG.error('DAN: no mapping for instance')
- raise webob.exc.HTTPNotFound(explanation=e.format_message())
- + LOG.error('DAN: mapping is %s' % im)
- +
- with nova_context.target_cell(context, im.cell_mapping):
- self._check_instance_in_valid_state(context, server_id,
- 'update tag')
- @@ -147,14 +151,18 @@ class ServerTagsController(wsgi.Controller):
- @extensions.expected_errors((400, 404, 409))
- @validation.schema(schema.update_all)
- def update_all(self, req, server_id, body):
- + LOG.error('DAN: update_all')
- context = req.environ["nova.context"]
- context.can(st_policies.POLICY_ROOT % 'update_all')
- try:
- im = objects.InstanceMapping.get_by_instance_uuid(context,
- server_id)
- except exception.InstanceMappingNotFound as e:
- + LOG.error('DAN: no update_all mapping')
- raise webob.exc.HTTPNotFound(explanation=e.format_message())
- + LOG.error('DAN: update_all mapping is %s' % im)
- +
- with nova_context.target_cell(context, im.cell_mapping):
- self._check_instance_in_valid_state(context, server_id,
- 'update tags')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement