summaryrefslogtreecommitdiff
path: root/cmd/podman/network.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-03 19:21:38 -0500
committerbaude <bbaude@redhat.com>2019-08-15 12:49:12 -0500
commit6220ef1488d3e135c332c265fdb6a3c7b240b561 (patch)
treeb4882936936c4d8c308c57ff0c460b3ae98897f3 /cmd/podman/network.go
parent3f1657d729b4f4c367b3e124621a6f3a9a5769d4 (diff)
downloadpodman-6220ef1488d3e135c332c265fdb6a3c7b240b561.tar.gz
podman-6220ef1488d3e135c332c265fdb6a3c7b240b561.tar.bz2
podman-6220ef1488d3e135c332c265fdb6a3c7b240b561.zip
inclusion of podman network
adding podman network and the subcommands inspect, list, and rm. the inspect subcommand displays the raw cni network configuration. the list subcommand displays a summary of the cni networks ala ps. and the rm subcommand removes a cni network. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/network.go')
-rw-r--r--cmd/podman/network.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmd/podman/network.go b/cmd/podman/network.go
new file mode 100644
index 000000000..83a5e71ab
--- /dev/null
+++ b/cmd/podman/network.go
@@ -0,0 +1,31 @@
+//+build !remoteclient
+
+package main
+
+import (
+ "github.com/containers/libpod/cmd/podman/cliconfig"
+ "github.com/spf13/cobra"
+)
+
+var networkcheckDescription = "Manage networks"
+var networkcheckCommand = cliconfig.PodmanCommand{
+ Command: &cobra.Command{
+ Use: "network",
+ Short: "Manage Networks",
+ Long: networkcheckDescription,
+ RunE: commandRunE(),
+ },
+}
+
+// Commands that are universally implemented
+var networkcheckCommands = []*cobra.Command{
+ _networkinspectCommand,
+ _networklistCommand,
+ _networkrmCommand,
+}
+
+func init() {
+ networkcheckCommand.AddCommand(networkcheckCommands...)
+ networkcheckCommand.SetUsageTemplate(UsageTemplate())
+ rootCmd.AddCommand(networkcheckCommand.Command)
+}