[lxc-devel] [lxd-pkg-snap/latest-edge] buginfo: Use "--format=yaml" in list commands

arossbell on Github lxc-bot at linuxcontainers.org
Tue Sep 15 04:08:15 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 766 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200914/7e931789/attachment.bin>
-------------- next part --------------
From 332e2944f1d387b153a73db023f247cc13f1e5e4 Mon Sep 17 00:00:00 2001
From: Adam R Bell <a_0x07 at protonmail.ch>
Date: Mon, 14 Sep 2020 21:49:56 -0600
Subject: [PATCH] buginfo: Use "--format=yaml" in list commands

lxc.buginfo has a few "lxc x list" commands listed without any specified
format.  This defaults to the "table" format.  However, the default "table"
format does not provide some information that another format, like the "yaml"
format, provides.  Some of the additional information could be useful for
engineers debugging a lxc setup.  This PR appends "--format=yaml" to the
applicable list commands.

Signed-off-by: Adam Bell <adam.bell at canonical.com>
---
 snapcraft/commands/buginfo | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/snapcraft/commands/buginfo b/snapcraft/commands/buginfo
index 95bf05c..d252252 100755
--- a/snapcraft/commands/buginfo
+++ b/snapcraft/commands/buginfo
@@ -45,37 +45,37 @@ if lxc info >/dev/null 2>&1; then
 
     echo "## Instances"
     echo '```'
-    lxc list
+    lxc list --format=yaml
     echo '```'
     echo ""
 
     echo "## Images"
     echo '```'
-    lxc image list
+    lxc image list --format=yaml
     echo '```'
     echo ""
 
     echo "## Storage pools"
     echo '```'
-    lxc storage list
+    lxc storage list --format=yaml
     echo '```'
     echo ""
 
     echo "## Networks"
     echo '```'
-    lxc network list
+    lxc network list --format=yaml
     echo '```'
     echo ""
 
     echo "## Projects"
     echo '```'
-    lxc project list
+    lxc project list --format=yaml
     echo '```'
     echo ""
 
     echo "## Profiles"
     echo '```'
-    lxc profile list
+    lxc profile list --format=yaml
     echo '```'
     echo ""
 
@@ -88,7 +88,7 @@ if lxc info >/dev/null 2>&1; then
     if lxc cluster list >/dev/null 2>&1; then
         echo "## Cluster"
         echo '```'
-        lxc cluster list
+        lxc cluster list --format=yaml
         echo '```'
         echo ""
     fi


More information about the lxc-devel mailing list