From 0e1bb7e36a19cd76175afc355ddbf28a41e6580b Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Wed, 4 May 2016 06:19:17 -0400 Subject: [PATCH] Fix duplicate lines in policy.json Removed duplicate lines from etc/nova/policy.json file. Commit [1] introduced the delete targets with empty rules and commit [2] changed them in Liberty incompletely to admin_or_owner rules. [1] https://github.com/openstack/nova/commit/9c917816048482e3a42aa06e2aa4933a1a6f7f8c [2] https://github.com/openstack/nova/commit/09a55e2bf4f3d5df3b76454f4839e2ce96f9d42f Change-Id: I9081ccf28ec72a2d791cddac0597efef67e56429 Closes-Bug:1577370 --- etc/nova/policy.json | 3 --- nova/tests/unit/test_policy.py | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/etc/nova/policy.json b/etc/nova/policy.json index 5f6023e5c388..129acfc7a498 100644 --- a/etc/nova/policy.json +++ b/etc/nova/policy.json @@ -85,9 +85,6 @@ "compute:security_groups:add_to_instance": "", "compute:security_groups:remove_from_instance": "", - "compute:delete": "", - "compute:soft_delete": "", - "compute:force_delete": "", "compute:restore": "", "compute:volume_snapshot_create": "", diff --git a/nova/tests/unit/test_policy.py b/nova/tests/unit/test_policy.py index a99f79a04c49..249392e00287 100644 --- a/nova/tests/unit/test_policy.py +++ b/nova/tests/unit/test_policy.py @@ -368,6 +368,9 @@ class RealRolePolicyTestCase(test.NoDBTestCase): "default", "compute:start", "compute:stop", +"compute:delete", +"compute:soft_delete", +"compute:force_delete", "compute_extension:admin_actions:pause", "compute_extension:admin_actions:unpause", "compute_extension:admin_actions:suspend", @@ -405,8 +408,6 @@ class RealRolePolicyTestCase(test.NoDBTestCase): "compute:create", "compute:create:attach_network", "compute:create:attach_volume", -"compute:delete", -"compute:force_delete", "compute:get_all_instance_metadata", "compute:get_all_instance_system_metadata", "compute:get_console_output", @@ -452,7 +453,6 @@ class RealRolePolicyTestCase(test.NoDBTestCase): "compute:security_groups:remove_from_instance", "compute:set_admin_password", "compute:snapshot", -"compute:soft_delete", "compute:suspend", "compute:swap_volume", "compute:unlock",