Reviewed: https://review.openstack.org/570268 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=b9a1c445d9c357967ea2ee7152651131118a135d Submitter: Zuul Branch: master
commit b9a1c445d9c357967ea2ee7152651131118a135d Author: jmoffitt <[email protected]> Date: Wed May 23 15:05:47 2018 -0700 Update attach_volume and detach_volume policy rules The prior commit for this was functional but not quite correct. The policy rules currently in Horizon for attach and detach of volumes don't exist in Nova and are missing from the local copy of nova_policy.json and from Nova generated policy files. The fix to use the create instance copy of the rule only worked for attach and not detach ( https://review.openstack.org/#/c/570071/ ) This commit updates detach as well, and should be correct going forward based on the Nova policy rules at: https://git.openstack.org/cgit/openstack/nova/tree/nova/policies/volumes_attachments.py Change-Id: I07fccd6f12149cd88a049c46aa113dfd2b60bbaa Closes-bug: 1772759 ** Changed in: horizon Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Dashboard (Horizon). https://bugs.launchpad.net/bugs/1772759 Title: Horizon checks wrong policy rule for attach_volume Status in OpenStack Dashboard (Horizon): Fix Released Bug description: The instances table in Horizon checks for policy rule "os_compute_api:servers:attach_volume" (see: https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/dashboards/project/instances/tables.py#n895 ), but this rule doesn't exist in the default policy file ( https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/conf/nova_policy.json?h=master ) or in Novas own source or tests. Instead, the rule "os_compute_api:servers:create:attach_volume" is used... In the policy file: https://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/conf/nova_policy.json?h=master#n138 And in Novas unit tests: https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/api/openstack/compute/test_serversV21.py#n5414 Generating a policy file from Nova using the oslo policy generator ( https://docs.openstack.org/horizon/latest/contributor/topics/policy.html ) has the same results, the output file includes a rule of "os_compute_api:servers:create:attach_volume" but *NOT* of "os_compute_api:servers:attach_volume" . The net result is that using the default policy file, or an unmodified generated policy file, results in the "attach volume" option missing from the Compute Instances menu. To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1772759/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

