Merge "Sort security group rules by protocol and port"

This commit is contained in:
Jenkins
2014-06-17 15:49:01 +00:00
committed by Gerrit Code Review

View File

@@ -56,7 +56,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)