Reviewed: https://review.openstack.org/302925 Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=8dc3e4324770bcc963cc213884861a563c2fd8e3 Submitter: Jenkins Branch: master
commit 8dc3e4324770bcc963cc213884861a563c2fd8e3 Author: Paul Karikh <pkar...@mirantis.com> Date: Thu Apr 7 19:04:36 2016 +0300 Fix allowed() function for CreateSubnet If neutron quotas disabled, there is no usages['subnets']['available'] So this check raises KeyError exception and makes "Create subnet" button dissapear. In addition, common codes in project.networks.tests related to this change are merged into a common method. Change-Id: I998c98c190fd4dc4039c7fb8ef7b1ef27bbeb863 Closes-Bug: #1567529 ** 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/1567529 Title: Disabled neutron quota breaks "Create subnet" button Status in OpenStack Dashboard (Horizon): Fix Released Bug description: If we set OPENSTACK_NEUTRON_NETWORK= {'enable_quotas': False}, "Create subnet" button dissapears and we get the following error: Error while checking action permissions. Traceback (most recent call last): File "horizon/horizon/tables/base.py", line 1278, in _filter_action return action._allowed(request, datum) and row_matched File "horizon/horizon/tables/actions.py", line 136, in _allowed self.allowed(request, datum)) File "horizon/openstack_dashboard/dashboards/project/networks/subnets/tables.py", line 103, in allowed if usages['subnets']['available'] <= 0: KeyError: 'available' Error while checking action permissions. Steps to reproduce: 1) Set 'enable_quotas': False in OPENSTACK_NEUTRON_NETWORK 2) Restart Horizon 3) Go to Project/Networks 4) Click on any network 5) Note that you've got "Delete" button, but there is no "Create" button 6) Enable neutron quotas again and make sure that "Create" button appeared There were already patch[1] for fixing this but looks like this piece of code has been missed. [1] https://github.com/openstack/horizon/commit/5ba219acbfddb9b9308a75da361fda915ba61f37 #diff-6f73ca5e50c3e694b8147669832912baR2152 To manage notifications about this bug go to: https://bugs.launchpad.net/horizon/+bug/1567529/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp