The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6281
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) === Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From b078e07ecd6654f78753c640e58f5f04857bab18 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Thu, 19 Sep 2019 12:50:45 +0100 Subject: [PATCH] lxc: Changes lxc list and lxc info Type field to show instance type Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxc/info.go | 7 ++----- lxc/list.go | 6 +----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/lxc/info.go b/lxc/info.go index 6402ce53da..41b6702aa7 100644 --- a/lxc/info.go +++ b/lxc/info.go @@ -449,11 +449,8 @@ func (c *cmdInfo) containerInfo(d lxd.InstanceServer, remote config.Remote, name } fmt.Printf(i18n.G("Status: %s")+"\n", ct.Status) - if ct.Ephemeral { - fmt.Printf(i18n.G("Type: ephemeral") + "\n") - } else { - fmt.Printf(i18n.G("Type: persistent") + "\n") - } + fmt.Printf(i18n.G("Type: %s")+"\n", ct.Type) + fmt.Printf(i18n.G("Profiles: %s")+"\n", strings.Join(ct.Profiles, ", ")) if cs.Pid != 0 { fmt.Printf(i18n.G("Pid: %d")+"\n", cs.Pid) diff --git a/lxc/list.go b/lxc/list.go index 04234d6447..8bd3598f84 100644 --- a/lxc/list.go +++ b/lxc/list.go @@ -620,11 +620,7 @@ func (c *cmdList) IP6ColumnData(cInfo api.InstanceFull) string { } func (c *cmdList) typeColumnData(cInfo api.InstanceFull) string { - if cInfo.Ephemeral { - return i18n.G("EPHEMERAL") - } - - return i18n.G("PERSISTENT") + return i18n.G(strings.ToUpper(cInfo.Type)) } func (c *cmdList) numberSnapshotsColumnData(cInfo api.InstanceFull) string {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel