diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-21 17:59:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-21 17:59:56 -0400 |
commit | 2bd920b00540280696d19dc95ab6e562aebd6b7d (patch) | |
tree | 76e7bd0ff448253d4d4ec23f41865297161a973b /cmd/podman/networks | |
parent | 61b276a05c1c8adc51c6d4f7c061b89ce39a803b (diff) | |
parent | bab3cda0e81fa3ac3315601f5ec17724f3ad8ed5 (diff) | |
download | podman-2bd920b00540280696d19dc95ab6e562aebd6b7d.tar.gz podman-2bd920b00540280696d19dc95ab6e562aebd6b7d.tar.bz2 podman-2bd920b00540280696d19dc95ab6e562aebd6b7d.zip |
Merge pull request #8077 from jwhonce/wip/report
Refactor podman to use c/common/pkg/report
Diffstat (limited to 'cmd/podman/networks')
-rw-r--r-- | cmd/podman/networks/create.go | 4 | ||||
-rw-r--r-- | cmd/podman/networks/inspect.go | 5 | ||||
-rw-r--r-- | cmd/podman/networks/list.go | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/cmd/podman/networks/create.go b/cmd/podman/networks/create.go index 634b01ced..74646090d 100644 --- a/cmd/podman/networks/create.go +++ b/cmd/podman/networks/create.go @@ -34,9 +34,9 @@ func networkCreateFlags(flags *pflag.FlagSet) { flags.IPNetVar(&networkCreateOptions.Range, "ip-range", net.IPNet{}, "allocate container IP from range") flags.StringVar(&networkCreateOptions.MacVLAN, "macvlan", "", "create a Macvlan connection based on this device") // TODO not supported yet - //flags.StringVar(&networkCreateOptions.IPamDriver, "ipam-driver", "", "IP Address Management Driver") + // flags.StringVar(&networkCreateOptions.IPamDriver, "ipam-driver", "", "IP Address Management Driver") // TODO enable when IPv6 is working - //flags.BoolVar(&networkCreateOptions.IPV6, "IPv6", false, "enable IPv6 networking") + // flags.BoolVar(&networkCreateOptions.IPV6, "IPv6", false, "enable IPv6 networking") flags.IPNetVar(&networkCreateOptions.Subnet, "subnet", net.IPNet{}, "subnet in CIDR format") flags.BoolVar(&networkCreateOptions.DisableDNS, "disable-dns", false, "disable dns plugin") } diff --git a/cmd/podman/networks/inspect.go b/cmd/podman/networks/inspect.go index b5f141ac8..47503fd4b 100644 --- a/cmd/podman/networks/inspect.go +++ b/cmd/podman/networks/inspect.go @@ -7,9 +7,8 @@ import ( "text/tabwriter" "text/template" - "github.com/containers/podman/v2/cmd/podman/parse" + "github.com/containers/common/pkg/report" "github.com/containers/podman/v2/cmd/podman/registry" - "github.com/containers/podman/v2/cmd/podman/report" "github.com/containers/podman/v2/pkg/domain/entities" "github.com/spf13/cobra" ) @@ -47,7 +46,7 @@ func networkInspect(_ *cobra.Command, args []string) error { } switch { - case parse.MatchesJSONFormat(networkInspectOptions.Format) || networkInspectOptions.Format == "": + case report.IsJSON(networkInspectOptions.Format) || networkInspectOptions.Format == "": b, err := json.MarshalIndent(responses, "", " ") if err != nil { return err diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go index 25b7f292f..532af631e 100644 --- a/cmd/podman/networks/list.go +++ b/cmd/podman/networks/list.go @@ -36,7 +36,7 @@ var ( func networkListFlags(flags *pflag.FlagSet) { // TODO enable filters based on something - //flags.StringSliceVarP(&networklistCommand.Filter, "filter", "f", []string{}, "Pause all running containers") + // flags.StringSliceVarP(&networklistCommand.Filter, "filter", "f", []string{}, "Pause all running containers") flags.StringVarP(&networkListOptions.Format, "format", "f", "", "Pretty-print networks to JSON or using a Go template") flags.BoolVarP(&networkListOptions.Quiet, "quiet", "q", false, "display only names") flags.StringVarP(&networkListOptions.Filter, "filter", "", "", "Provide filter values (e.g. 'name=podman')") |