Allow sorting of security group rules

Bug #1264738 reported by Kevin Breit
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Akihiro Motoki

Bug Description

I would like Horizon to allow me to sort security group rules. I picture this like Netflix allowing me to drag and drop movies in my queue.

Tags: neutron
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Wishlist
Revision history for this message
Julie Pichon (jpichon) wrote :

I don't think there's any way for the underlying API to remember the sorting though, so on the next page load it would be gone again. I'm not sure how useful such a feature would be considering this?

Revision history for this message
Miroslav Suchý (msuchy) wrote :

Well right now the records are not sorted at all. And are reproduced as underlying component report it. It would be nice to have some default sort - it can be even internal id or rowid. Right now new items appear on top, but sometime on bottom and sometime in middle. This is confusing.
And it would be nice if I can decide to sort it using Name or Description. You can store this in cookie
 security_group_sort=Name
or
 security_group_sort=Description

This way it would be preserved between reloads and user decision will be honoured.

Revision history for this message
Julie Pichon (jpichon) wrote :

Agreed! I think that part should be fixed in Juno with bug 1326132 ("Adding a new Security Rule to a Security Group shouldn't remove the sort on the table").

Changed in horizon:
assignee: nobody → Swati Shukla (swati-shukla1)
Revision history for this message
Florian Fuchs (flo-fuchs) wrote :

Hi Swati,

are you still working on this bug? OK if I just assign it to myself?

Best,
Florian

Revision history for this message
Florian Fuchs (flo-fuchs) wrote :

Reading through the comments I think this report now mixes three different items:

1) The original bug report describes some sort of manual sorting (drag&drop) of the security group rules.

2) However, comment #2 appears to be about the sorting of the security *groups* (not the group *rules*), which are currently seemingly unsorted (apparently by id; but by name would probably make more sense).

3) The default sorting of the sec group rules has been fixed as mentioned in comment #3.

It probably makes most sense to open another bug for 2) and leave *this* bug marked as "whishlist" (and set to "unassigned") until someone decides if it's feasible (and desirable?) to implement a drag&drop mechanism as mentioned in the original description.

Revision history for this message
Matthias Runge (mrunge) wrote :

removing assignee due to inactivity

Changed in horizon:
assignee: Swati Sharma (swati-shukla1) → nobody
status: New → Confirmed
Revision history for this message
Eddie Ramirez (ediardo) wrote :

Should this bug be closed/invalidated?

anusha (anusha)
Changed in horizon:
assignee: nobody → anusha (anusha)
assignee: anusha (anusha) → nobody
Revision history for this message
Akihiro Motoki (amotoki) wrote :

As mentioned in #3, some sorting logic was added. The sort fields are 'ip_protocol' and 'from_port'.
It is specific to nova security group.

Neutron security group supports 'direction' and 'ethertype' (like IPv4/IPv6). these two fields should be considered before 'ip_protocol' and 'from_port' for better sorting.

Changed in horizon:
importance: Wishlist → Low
tags: added: neutron
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/510847

Changed in horizon:
status: Confirmed → In Progress
Ying Zuo (yingzuo)
Changed in horizon:
milestone: none → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/510847
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=1afba5f0828addbdd54e13081b66e5f09f604816
Submitter: Zuul
Branch: master

commit 1afba5f0828addbdd54e13081b66e5f09f604816
Author: Akihiro Motoki <email address hidden>
Date: Tue Oct 10 11:32:46 2017 +0000

    Sort security group rules more meaningfully

    At now, security gorup rules are sorted based on ip_protocol and
    from_port by default, but there are more higher level classification
    like direction and ethertype (like IPv4, IPv6).
    This commit improves the default sort order in more meaningful order.

    Also improves the handling of IP protocol which can be a string,
    an integer or None. Sorting in python 3 assumes all corresponding
    values have a same type, so we need to ensure IP protocols in all rules
    have a same type, so IP protocol fields are converted into a string
    before sorting.

    Change-Id: Ia45830e9953e92141a3ce91a78dd338960b5ac11
    Closes-Bug: #1264738

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b2

This issue was fixed in the openstack/horizon 13.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.