← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1482354] [NEW] Setting "enable_quotas"=False breaks GUI

 

Public bug reported:

Excluding OPENSTACK_NEUTRON_NETWORK["enable_quotas"] or setting to False
will result in Create Network, Create Subnet, Create Router buttons
not showing up when logged in as the demo account.  

These three side effects happen because the code in the views use the
following construct
https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/tables.py#L94

        usages = quotas.tenant_quota_usages(request)
        if usages['networks']['available'] <= 0:

if enable_quotas is false, then quotas.tenant_quota_usages does not add
the 'available' node to the usages dict and therefore a KeyError
'available' is thrown. This ends up aborting the whole is_allowed method
in horizon.BaseTable and therefore hiding the button.

quotas.tenant_quota_usages will not add the available key for usage
items which are disabled.

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
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/1482354

Title:
  Setting "enable_quotas"=False breaks GUI

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Excluding OPENSTACK_NEUTRON_NETWORK["enable_quotas"] or setting to False
  will result in Create Network, Create Subnet, Create Router buttons
  not showing up when logged in as the demo account.  

  These three side effects happen because the code in the views use the
  following construct
  https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/tables.py#L94

          usages = quotas.tenant_quota_usages(request)
          if usages['networks']['available'] <= 0:

  if enable_quotas is false, then quotas.tenant_quota_usages does not
  add the 'available' node to the usages dict and therefore a KeyError
  'available' is thrown. This ends up aborting the whole is_allowed
  method in horizon.BaseTable and therefore hiding the button.

  quotas.tenant_quota_usages will not add the available key for usage
  items which are disabled.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1482354/+subscriptions


Follow ups