Created
November 20, 2015 22:41
-
-
Save mriedem/ab9cdde3d7e3f0911112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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..3486789 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) | |
@@ -53,7 +54,9 @@ class InstanceActionsController(wsgi.Controller): | |
def index(self, req, server_id): | |
"""Returns the list of actions recorded for a given instance.""" | |
context = req.environ["nova.context"] | |
- instance = common.get_instance(self.compute_api, context, server_id) | |
+ with utils.temporary_mutation(context, read_deleted='yes'): | |
+ instance = common.get_instance(self.compute_api, context, | |
+ server_id) | |
authorize(context, target=instance) | |
actions_raw = self.action_api.actions_get(context, instance) | |
actions = [self._format_action(action) for action in actions_raw] | |
mriedem@ubuntu:~/git/nova$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment