[lxc-devel] [lxd/master] lxc/info: show remote in lxc info output

brauner on Github lxc-bot at linuxcontainers.org
Mon Sep 19 15:48:10 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 667 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160919/3dcb0a5b/attachment.bin>
-------------- next part --------------
From 6a6f40de56374cf7c168e6dd9581061fece94766 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at canonical.com>
Date: Mon, 19 Sep 2016 17:43:58 +0200
Subject: [PATCH] lxc/info: show remote in lxc info output

Name: test
Remote: unix:/var/lib/lxd/unix.socket
Architecture: x86_64
Created: 2016/09/12 12:29 UTC
Status: Stopped
Type: persistent
Profiles: default

Signed-off-by: Christian Brauner <christian.brauner at canonical.com>
---
 lxc/info.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lxc/info.go b/lxc/info.go
index 34a6134..41c00bd 100644
--- a/lxc/info.go
+++ b/lxc/info.go
@@ -87,6 +87,9 @@ func (c *infoCmd) containerInfo(d *lxd.Client, name string, showLog bool) error
 	const layout = "2006/01/02 15:04 UTC"
 
 	fmt.Printf(i18n.G("Name: %s")+"\n", ct.Name)
+	if d.Remote != nil && d.Remote.Addr != "" {
+		fmt.Printf(i18n.G("Remote: %s")+"\n", d.Remote.Addr)
+	}
 	fmt.Printf(i18n.G("Architecture: %s")+"\n", ct.Architecture)
 	if ct.CreationDate.UTC().Unix() != 0 {
 		fmt.Printf(i18n.G("Created: %s")+"\n", ct.CreationDate.UTC().Format(layout))


More information about the lxc-devel mailing list