summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeigo Noha <knoha@redhat.com>2022-03-04 17:38:20 +0900
committerKeigo Noha <knoha@redhat.com>2022-03-25 05:03:24 +0000
commitd3bb9cd86a72fb270ff4f4d2b5ddea04c899ef53 (patch)
treea796a1b66072f754779578d651503c9a1a782cef
parent89e3e51e5f4bd61268c218caf502718870b44019 (diff)
downloadhorizon-d3bb9cd86a72fb270ff4f4d2b5ddea04c899ef53.tar.gz
Change to a proper policy for Resume operation
Previously, ToggleSuspend class checked 'os-rescue' policy for resuming an instance. To align to resume operation, this fix changes to 'os-suspend-server:resume'. Closes-Bug: #1963652 Change-Id: If6386ecdb81fb1f0d88dab447ee81c251b9857b7 (cherry picked from commit 29da801528a357449264e546182bd629f4654275) (cherry picked from commit db40c8ceb6c403bc94ac839f65c00805a5e4ff66)
-rw-r--r--openstack_dashboard/dashboards/project/instances/tables.py2
-rw-r--r--releasenotes/notes/bug_1963652_fix_policy_for_resume-a719efb23054c708.yaml6
2 files changed, 7 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/instances/tables.py b/openstack_dashboard/dashboards/project/instances/tables.py
index 624a59597..53e8b4b23 100644
--- a/openstack_dashboard/dashboards/project/instances/tables.py
+++ b/openstack_dashboard/dashboards/project/instances/tables.py
@@ -326,7 +326,7 @@ class ToggleSuspend(tables.BatchAction):
if self.suspended:
self.current_present_action = RESUME
policy_rules = (
- ("compute", "os_compute_api:os-rescue"),)
+ ("compute", "os_compute_api:os-suspend-server:resume"),)
else:
self.current_present_action = SUSPEND
policy_rules = (
diff --git a/releasenotes/notes/bug_1963652_fix_policy_for_resume-a719efb23054c708.yaml b/releasenotes/notes/bug_1963652_fix_policy_for_resume-a719efb23054c708.yaml
new file mode 100644
index 000000000..6c2b31faf
--- /dev/null
+++ b/releasenotes/notes/bug_1963652_fix_policy_for_resume-a719efb23054c708.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ Previously, ToggleSuspend class checked os-rescue policy for resume operation.
+ By this fix, the class checks 'os_compute_api:os-suspend-server:resume' policy
+ to align to resume operation.