fix: implement missing network:info command
Also add json format output to the network:list command. Closes #7093
This commit is contained in:
@@ -21,8 +21,8 @@ Additional commands:`
|
||||
network:create <network>, Creates an attachable docker network
|
||||
network:destroy <network>, Destroys a docker network
|
||||
network:exists <network>, Checks if a docker network exists
|
||||
network:info <network>, Outputs information about a docker network
|
||||
network:list, Lists all docker networks
|
||||
network:info <network> [--format text|json], Outputs information about a docker network
|
||||
network:list [--format text|json], Lists all docker networks
|
||||
network:rebuild <app>, Rebuilds network settings for an app
|
||||
network:rebuildall, Rebuild network settings for all apps
|
||||
network:report [<app>] [<flag>], Displays a network report for one or more apps
|
||||
|
||||
@@ -36,12 +36,15 @@ func main() {
|
||||
err = network.CommandExists(networkName)
|
||||
case "info":
|
||||
args := flag.NewFlagSet("network:info", flag.ExitOnError)
|
||||
format := args.String("format", "text", "format: [ text | json ]")
|
||||
args.Parse(os.Args[2:])
|
||||
err = network.CommandInfo()
|
||||
networkName := args.Arg(0)
|
||||
err = network.CommandInfo(networkName, *format)
|
||||
case "list":
|
||||
args := flag.NewFlagSet("network:list", flag.ExitOnError)
|
||||
format := args.String("format", "text", "format: [ text | json ]")
|
||||
args.Parse(os.Args[2:])
|
||||
err = network.CommandList()
|
||||
err = network.CommandList(*format)
|
||||
case "rebuild":
|
||||
args := flag.NewFlagSet("network:rebuild", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
|
||||
Reference in New Issue
Block a user