summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-07-31 20:48:36 +0000
committerGerrit Code Review <review@openstack.org>2014-07-31 20:48:36 +0000
commit18a47ba1a9a7734b9c5e6204e6185499fac3658b (patch)
treeafe79babc9b7bfff007df071cc0e3908e8cd4220
parente665d6bb9b74a4d50f09b9458135d509e87e18a4 (diff)
parente66fbc3b9f3cc0ab800c8d7caef8d8e61d5a9eb6 (diff)
downloadhorizon-18a47ba1a9a7734b9c5e6204e6185499fac3658b.tar.gz
Merge "Sort security group rules by protocol and port" into stable/icehouse
-rw-r--r--openstack_dashboard/dashboards/project/access_and_security/security_groups/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/access_and_security/security_groups/views.py b/openstack_dashboard/dashboards/project/access_and_security/security_groups/views.py
index 5aefbf497..093f216e9 100644
--- a/openstack_dashboard/dashboards/project/access_and_security/security_groups/views.py
+++ b/openstack_dashboard/dashboards/project/access_and_security/security_groups/views.py
@@ -58,7 +58,8 @@ class DetailView(tables.DataTableView):
data = self._get_data()
if data is None:
return []
- return data.rules
+ return sorted(data.rules, key=lambda rule: (rule.ip_protocol,
+ rule.from_port))
def get_context_data(self, **kwargs):
context = super(DetailView, self).get_context_data(**kwargs)