summaryrefslogtreecommitdiff
path: root/cmd/podman/networks
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/networks')
-rw-r--r--cmd/podman/networks/create.go2
-rw-r--r--cmd/podman/networks/inspect.go2
-rw-r--r--cmd/podman/networks/list.go14
-rw-r--r--cmd/podman/networks/network.go2
-rw-r--r--cmd/podman/networks/rm.go2
5 files changed, 9 insertions, 13 deletions
diff --git a/cmd/podman/networks/create.go b/cmd/podman/networks/create.go
index 2bb75ea9e..10973e6bf 100644
--- a/cmd/podman/networks/create.go
+++ b/cmd/podman/networks/create.go
@@ -46,7 +46,7 @@ func networkCreateFlags(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: networkCreateCommand,
Parent: networkCmd,
})
diff --git a/cmd/podman/networks/inspect.go b/cmd/podman/networks/inspect.go
index 0bc73579a..60cede894 100644
--- a/cmd/podman/networks/inspect.go
+++ b/cmd/podman/networks/inspect.go
@@ -26,7 +26,7 @@ var (
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
- Mode: []entities.EngineMode{entities.ABIMode},
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
Command: networkinspectCommand,
Parent: networkCmd,
})
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 {
diff --git a/cmd/podman/networks/network.go b/cmd/podman/networks/network.go
index 56dd390ea..7f38cd2cd 100644
--- a/cmd/podman/networks/network.go
+++ b/cmd/podman/networks/network.go
@@ -20,7 +20,7 @@ var (
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
- Mode: []entities.EngineMode{entities.ABIMode},
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
Command: networkCmd,
})
}
diff --git a/cmd/podman/networks/rm.go b/cmd/podman/networks/rm.go
index dc1eb9909..34d57f6ef 100644
--- a/cmd/podman/networks/rm.go
+++ b/cmd/podman/networks/rm.go
@@ -35,7 +35,7 @@ func networkRmFlags(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: networkrmCommand,
Parent: networkCmd,
})