components/openstack/horizon/patches/06-remove-security-groups.patch
author Craig Mohrman <craig.mohrman@oracle.com>
Mon, 20 Jul 2015 09:11:32 -0700
branchs11u2-sru
changeset 4673 7ca7277ea064
parent 4156 4b1def16fe9b
child 5405 66fd59fecd68
permissions -rw-r--r--
20803826 problem in UTILITY/PHP 21296988 problem in UTILITY/PHP 21445788 CANONICAL_REPO no longer correct for s11.2sru since releasing FOSS Eval packages

Solaris/EVS do not yet support security_groups so disable all
security_group quotas and remove the pie chart from the summary page.
This patch is not suitable for upstream contribution.

--- horizon-2014.2.2/horizon/templates/horizon/common/_limit_summary.html.orig 2015-03-04 08:18:40.918393776 -0700
+++ horizon-2014.2.2/horizon/templates/horizon/common/_limit_summary.html 2015-03-04 08:18:50.752267276 -0700
@@ -30,12 +30,6 @@
       </strong>
     </div>

-    <div class="d3_quota_bar">
-      <div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups 100 %}"></div>
-      <strong>{% trans "Security Groups" %} <br />
-        {% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma%}Used <span> {{ used }} </span> of <span> {{ available  }} </span>{% endblocktrans %}
-      </strong>
-    </div>
   {% if usage.limits.totalVolumesUsed >= 0 %}
     <div class="d3_quota_bar">
       <div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalVolumesUsed usage.limits.maxTotalVolumes 100 %}"></div>

--- horizon-2014.2.2/openstack_dashboard/usage/quotas.py.orig       2015-03-04 13:53:40.924434219 -0700
+++ horizon-2014.2.2/openstack_dashboard/usage/quotas.py   2015-03-04 13:54:19.737460759 -0700
@@ -197,12 +197,10 @@ def get_disabled_quotas(request):
         # Remove the nova network quotas
         disabled_quotas.extend(['floating_ips', 'fixed_ips'])

-        if neutron.is_extension_supported(request, 'security-group'):
-            # If Neutron security group is supported, disable Nova quotas
-            disabled_quotas.extend(['security_groups', 'security_group_rules'])
-        else:
-            # If Nova security group is used, disable Neutron quotas
-            disabled_quotas.extend(['security_group', 'security_group_rule'])
+        # Solaris/EVS do not yet support security_groups, so disable all
+        # security_group quotas
+        disabled_quotas.extend(['security_groups', 'security_group_rules'])
+        disabled_quotas.extend(['security_group', 'security_group_rule'])

         try:
             if not neutron.is_quotas_extension_supported(request):