virsh: Reformat output of virsh net-list

This patch changes whitespace and the length of the separation line from
this format:

$ virsh net-list --all
Name                 State      Autostart     Persistent
--------------------------------------------------
default              inactive   yes           yes

to

$ virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              inactive   yes           yes

to match the output of virsh list.
This commit is contained in:
Peter Krempa 2013-01-11 11:14:54 +01:00
parent bb19491cf5
commit d0b8bc8565

View File

@ -614,9 +614,10 @@ cmdNetworkList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
if (!(list = vshNetworkListCollect(ctl, flags)))
return false;
vshPrintExtra(ctl, "%-20s %-10s %-13s %s\n", _("Name"), _("State"),
vshPrintExtra(ctl, " %-20s %-10s %-13s %s\n", _("Name"), _("State"),
_("Autostart"), _("Persistent"));
vshPrintExtra(ctl, "--------------------------------------------------\n");
vshPrintExtra(ctl,
"----------------------------------------------------------\n");
for (i = 0; i < list->nnets; i++) {
virNetworkPtr network = list->nets[i];
@ -628,7 +629,7 @@ cmdNetworkList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
else
autostartStr = is_autostart ? _("yes") : _("no");
vshPrint(ctl, "%-20s %-10s %-13s %s\n",
vshPrint(ctl, " %-20s %-10s %-13s %s\n",
virNetworkGetName(network),
virNetworkIsActive(network) ? _("active") : _("inactive"),
autostartStr,