← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1308984] [NEW] Floating IP addresses ordered in a weird way

 

Public bug reported:

The floating ip:s are ordered according to UUID instead of IP, more
information in the patch.

---
commit 83a10bf02a5079513741039860208e277e1d12e4
Author: Ian Kumlien <ian.kumlien@xxxxxxxxx>
Date:   Thu Apr 17 13:49:32 2014 +0200

    Sorting floating IP:s according to IP.
    
    While using alot of manually allocated floating ip:s we wondered why
    the IP list wasn't sorted. While looking at it we found that the UI
    actually does sort the IP but according to the UUID instead of the
    actual IP address.
    
    This change fixes this so that it's sorted according to IP.
    
    Found-By: Marko Bocevski <marko.bocevski@xxxxxxxxx>

diff --git a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
index c4ebbd1..d884dee 100644
--- a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
+++ b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
@@ -69,7 +69,7 @@ class AssociateIPAction(workflows.Action):
             exceptions.handle(self.request,
                               _('Unable to retrieve floating IP addresses.'),
                               redirect=redirect)
-        options = sorted([(ip.id, ip.ip) for ip in ips if not ip.port_id])
+        options = sorted([(ip.ip, ip.ip) for ip in ips if not ip.port_id])
         if options:
             options.insert(0, ("", _("Select an IP address")))
         else:

** Affects: horizon
     Importance: Undecided
         Status: New

** Patch added: "horizion-sort-ips.diff"
   https://bugs.launchpad.net/bugs/1308984/+attachment/4086149/+files/horizion-sort-ips.diff

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1308984

Title:
  Floating IP addresses ordered in a weird way

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  The floating ip:s are ordered according to UUID instead of IP, more
  information in the patch.

  ---
  commit 83a10bf02a5079513741039860208e277e1d12e4
  Author: Ian Kumlien <ian.kumlien@xxxxxxxxx>
  Date:   Thu Apr 17 13:49:32 2014 +0200

      Sorting floating IP:s according to IP.
      
      While using alot of manually allocated floating ip:s we wondered why
      the IP list wasn't sorted. While looking at it we found that the UI
      actually does sort the IP but according to the UUID instead of the
      actual IP address.
      
      This change fixes this so that it's sorted according to IP.
      
      Found-By: Marko Bocevski <marko.bocevski@xxxxxxxxx>

  diff --git a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
  index c4ebbd1..d884dee 100644
  --- a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
  +++ b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
  @@ -69,7 +69,7 @@ class AssociateIPAction(workflows.Action):
               exceptions.handle(self.request,
                                 _('Unable to retrieve floating IP addresses.'),
                                 redirect=redirect)
  -        options = sorted([(ip.id, ip.ip) for ip in ips if not ip.port_id])
  +        options = sorted([(ip.ip, ip.ip) for ip in ips if not ip.port_id])
           if options:
               options.insert(0, ("", _("Select an IP address")))
           else:

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1308984/+subscriptions


Follow ups

References