diff options
author | Brent Baude <bbaude@redhat.com> | 2020-05-12 13:04:10 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-05-12 13:23:43 -0500 |
commit | cf502b99feda401ced410fbcfd1a3a2663c7a559 (patch) | |
tree | 408c4ae509fc8563da7ae1ac3f8d141cfd96e695 /cmd/podman/networks/list.go | |
parent | 5b4e91db73a80f31f67b7c28832527e64b074b74 (diff) | |
download | podman-cf502b99feda401ced410fbcfd1a3a2663c7a559.tar.gz podman-cf502b99feda401ced410fbcfd1a3a2663c7a559.tar.bz2 podman-cf502b99feda401ced410fbcfd1a3a2663c7a559.zip |
enable podman v2 networking for remote client
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/networks/list.go')
-rw-r--r-- | cmd/podman/networks/list.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go index e27062255..1c0528e5c 100644 --- a/cmd/podman/networks/list.go +++ b/cmd/podman/networks/list.go @@ -4,13 +4,12 @@ import ( "encoding/json" "fmt" "html/template" - "io" "os" "strings" - - "github.com/containers/libpod/cmd/podman/validate" + "text/tabwriter" "github.com/containers/libpod/cmd/podman/registry" + "github.com/containers/libpod/cmd/podman/validate" "github.com/containers/libpod/pkg/domain/entities" "github.com/containers/libpod/pkg/network" "github.com/spf13/cobra" @@ -47,7 +46,7 @@ func networkListFlags(flags *pflag.FlagSet) { func init() { registry.Commands = append(registry.Commands, registry.CliCommand{ - Mode: []entities.EngineMode{entities.ABIMode}, + Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode}, Command: networklistCommand, Parent: networkCmd, }) @@ -57,7 +56,6 @@ func init() { func networkList(cmd *cobra.Command, args []string) error { var ( - w io.Writer = os.Stdout nlprs []NetworkListPrintReports ) @@ -95,13 +93,11 @@ func networkList(cmd *cobra.Command, args []string) error { if err != nil { return err } + w := tabwriter.NewWriter(os.Stdout, 8, 2, 2, ' ', 0) if err := tmpl.Execute(w, nlprs); err != nil { return err } - if flusher, ok := w.(interface{ Flush() error }); ok { - return flusher.Flush() - } - return nil + return w.Flush() } func quietOut(responses []*entities.NetworkListReport) error { |