Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. diff --git a/nova/api/openstack/compute/server_tags.py b/nova/api/openstack/compute/server_tags.py
  2. index 7b6238c..0c1861e 100644
  3. --- a/nova/api/openstack/compute/server_tags.py
  4. +++ b/nova/api/openstack/compute/server_tags.py
  5. @@ -96,14 +96,18 @@ class ServerTagsController(wsgi.Controller):
  6. @extensions.expected_errors((400, 404, 409))
  7. @validation.schema(schema.update)
  8. def update(self, req, server_id, id, body):
  9. + LOG.error('DAN: update')
  10. context = req.environ["nova.context"]
  11. context.can(st_policies.POLICY_ROOT % 'update')
  12. try:
  13. im = objects.InstanceMapping.get_by_instance_uuid(context,
  14. server_id)
  15. except exception.InstanceMappingNotFound as e:
  16. + LOG.error('DAN: no mapping for instance')
  17. raise webob.exc.HTTPNotFound(explanation=e.format_message())
  18.  
  19. + LOG.error('DAN: mapping is %s' % im)
  20. +
  21. with nova_context.target_cell(context, im.cell_mapping):
  22. self._check_instance_in_valid_state(context, server_id,
  23. 'update tag')
  24. @@ -147,14 +151,18 @@ class ServerTagsController(wsgi.Controller):
  25. @extensions.expected_errors((400, 404, 409))
  26. @validation.schema(schema.update_all)
  27. def update_all(self, req, server_id, body):
  28. + LOG.error('DAN: update_all')
  29. context = req.environ["nova.context"]
  30. context.can(st_policies.POLICY_ROOT % 'update_all')
  31. try:
  32. im = objects.InstanceMapping.get_by_instance_uuid(context,
  33. server_id)
  34. except exception.InstanceMappingNotFound as e:
  35. + LOG.error('DAN: no update_all mapping')
  36. raise webob.exc.HTTPNotFound(explanation=e.format_message())
  37.  
  38. + LOG.error('DAN: update_all mapping is %s' % im)
  39. +
  40. with nova_context.target_cell(context, im.cell_mapping):
  41. self._check_instance_in_valid_state(context, server_id,
  42. 'update tags')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement