components/openstack/horizon/patches/06-remove-security-groups.patch
changeset 5405 66fd59fecd68
parent 3998 5bd484384122
equal deleted inserted replaced
5404:55e409ba4e72 5405:66fd59fecd68
     1 Solaris/EVS do not yet support security_groups so disable all
     1 Solaris/EVS do not yet support security_groups so disable all
     2 security_group quotas and remove the pie chart from the summary page.
     2 security_group quotas and remove the pie chart from the summary page.
     3 This patch is not suitable for upstream contribution.
     3 This patch is not suitable for upstream contribution.
     4 
     4 
     5 --- horizon-2014.2.2/horizon/templates/horizon/common/_limit_summary.html.orig 2015-03-04 08:18:40.918393776 -0700
     5 --- horizon-2015.1.2/horizon/templates/horizon/common/_limit_summary.html.orig	2015-12-12 12:53:10.612619487 -0500
     6 +++ horizon-2014.2.2/horizon/templates/horizon/common/_limit_summary.html 2015-03-04 08:18:50.752267276 -0700
     6 +++ horizon-2015.1.2/horizon/templates/horizon/common/_limit_summary.html	2015-12-12 12:54:55.097278375 -0500
     7 @@ -30,12 +30,6 @@
     7 @@ -30,12 +30,6 @@
     8        </strong>
     8        </strong>
     9      </div>
     9      </div>
    10 
    10  
    11 -    <div class="d3_quota_bar">
    11 -    <div class="d3_quota_bar">
    12 -      <div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups 100 %}"></div>
    12 -      <div class="d3_pie_chart_usage" data-used="{% quotapercent usage.limits.totalSecurityGroupsUsed usage.limits.maxSecurityGroups %}"></div>
    13 -      <strong>{% trans "Security Groups" %} <br />
    13 -      <strong>{% trans "Security Groups" %} <br />
    14 -        {% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma%}Used <span> {{ used }} </span> of <span> {{ available  }} </span>{% endblocktrans %}
    14 -        {% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma %}Used <span> {{ used }} </span> of <span> {{ available  }} </span>{% endblocktrans %}
    15 -      </strong>
    15 -      </strong>
    16 -    </div>
    16 -    </div>
    17    {% if usage.limits.totalVolumesUsed >= 0 %}
    17    {% if usage.limits.totalVolumesUsed >= 0 %}
    18      <div class="d3_quota_bar">
    18      <div class="d3_quota_bar">
    19        <div class="d3_pie_chart_usage" data-used="{% widthratio usage.limits.totalVolumesUsed usage.limits.maxTotalVolumes 100 %}"></div>
    19        <div class="d3_pie_chart_usage" data-used="{% quotapercent usage.limits.totalVolumesUsed usage.limits.maxTotalVolumes %}"></div>
    20 
    20 
    21 --- horizon-2014.2.2/openstack_dashboard/usage/quotas.py.orig       2015-03-04 13:53:40.924434219 -0700
    21 --- horizon-2015.1.2/openstack_dashboard/usage/quotas.py.orig	2015-12-12 12:56:35.439533474 -0500
    22 +++ horizon-2014.2.2/openstack_dashboard/usage/quotas.py   2015-03-04 13:54:19.737460759 -0700
    22 +++ horizon-2015.1.2/openstack_dashboard/usage/quotas.py	2015-12-12 13:03:03.987504312 -0500
    23 @@ -197,12 +197,10 @@ def get_disabled_quotas(request):
    23 @@ -235,13 +235,11 @@
    24          # Remove the nova network quotas
    24          # Remove the nova network quotas
    25          disabled_quotas.extend(['floating_ips', 'fixed_ips'])
    25          disabled_quotas.extend(['floating_ips', 'fixed_ips'])
    26 
    26  
    27 -        if neutron.is_extension_supported(request, 'security-group'):
    27 -        if neutron.is_extension_supported(request, 'security-group'):
    28 -            # If Neutron security group is supported, disable Nova quotas
    28 -            # If Neutron security group is supported, disable Nova quotas
    29 -            disabled_quotas.extend(['security_groups', 'security_group_rules'])
    29 -            disabled_quotas.extend(['security_groups', 'security_group_rules'])
    30 -        else:
    30 -        else:
    31 -            # If Nova security group is used, disable Neutron quotas
    31 -            # If Nova security group is used, disable Neutron quotas
    32 -            disabled_quotas.extend(['security_group', 'security_group_rule'])
    32 -            disabled_quotas.extend(['security_group', 'security_group_rule'])
       
    33 -
    33 +        # Solaris/EVS do not yet support security_groups, so disable all
    34 +        # Solaris/EVS do not yet support security_groups, so disable all
    34 +        # security_group quotas
    35 +        # security_group quotas
    35 +        disabled_quotas.extend(['security_groups', 'security_group_rules'])
    36 +        disabled_quotas.extend(['security_groups', 'security_group_rules'])
    36 +        disabled_quotas.extend(['security_group', 'security_group_rule'])
    37 +        disabled_quotas.extend(['security_group', 'security_group_rule'])
    37 
    38 +        
    38          try:
    39          try:
    39              if not neutron.is_quotas_extension_supported(request):
    40              if not neutron.is_quotas_extension_supported(request):
       
    41                  disabled_quotas.extend(NEUTRON_QUOTA_FIELDS)
       
    42