The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/2789

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
This closes an issue in a different repo: https://github.com/lxc/lxc/issues/1383

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
From c73e430764bfe0d370620a02c683504ff4b9bf0b Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.ander...@canonical.com>
Date: Fri, 13 Jan 2017 12:25:39 +0200
Subject: [PATCH] sort addresses in `lxc list` output

This closes an issue in a different repo: https://github.com/lxc/lxc/issues/1383

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
---
 lxc/list.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lxc/list.go b/lxc/list.go
index 8ec0a16..1fd9317 100644
--- a/lxc/list.go
+++ b/lxc/list.go
@@ -537,6 +537,7 @@ func (c *listCmd) IP4ColumnData(cInfo api.Container, cState 
*api.ContainerState,
                                }
                        }
                }
+               sort.Sort(sort.Reverse(sort.StringSlice(ipv4s)))
                return strings.Join(ipv4s, "\n")
        } else {
                return ""
@@ -561,6 +562,7 @@ func (c *listCmd) IP6ColumnData(cInfo api.Container, cState 
*api.ContainerState,
                                }
                        }
                }
+               sort.Sort(sort.Reverse(sort.StringSlice(ipv6s)))
                return strings.Join(ipv6s, "\n")
        } else {
                return ""
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to