Skip to content

Instantly share code, notes, and snippets.

@mriedem
Created November 20, 2015 22:39
Show Gist options
  • Save mriedem/891cc00c528e7ba2d99b to your computer and use it in GitHub Desktop.
Save mriedem/891cc00c528e7ba2d99b to your computer and use it in GitHub Desktop.
mriedem@ubuntu:~/git/nova$ git diff
diff --git a/nova/api/openstack/compute/instance_actions.py b/nova/api/openstack/compute/instance_actions.py
index b915ea8..2936ba2 100644
--- a/nova/api/openstack/compute/instance_actions.py
+++ b/nova/api/openstack/compute/instance_actions.py
@@ -20,6 +20,7 @@ from nova.api.openstack import extensions
from nova.api.openstack import wsgi
from nova import compute
from nova.i18n import _
+from nova import utils
ALIAS = "os-instance-actions"
authorize = extensions.os_compute_authorizer(ALIAS)
@@ -55,7 +56,8 @@ class InstanceActionsController(wsgi.Controller):
context = req.environ["nova.context"]
instance = common.get_instance(self.compute_api, context, server_id)
authorize(context, target=instance)
- actions_raw = self.action_api.actions_get(context, instance)
+ with utils.temporary_mutation(context, read_deleted='yes'):
+ actions_raw = self.action_api.actions_get(context, instance)
actions = [self._format_action(action) for action in actions_raw]
return {'instanceActions': actions}
mriedem@ubuntu:~/git/nova$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment