Merge "Sort security group rules by protocol and port" into stable/icehouse

This commit is contained in:
Jenkins 2014-07-31 20:48:36 +00:00 committed by Gerrit Code Review
commit 18a47ba1a9
1 changed files with 2 additions and 1 deletions

View File

@ -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)