Merge pull request #22406 from evgeni/network-list

add `list` as an alias to list networks
This commit is contained in:
openshift-merge-bot[bot]
2024-04-17 17:23:43 +00:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ var (
networklistDescription = `List networks`
networklistCommand = &cobra.Command{
Use: "ls [options]",
Aliases: []string{"list"},
Args: validate.NoArgs,
Short: "List networks",
Long: networklistDescription,

View File

@ -10,6 +10,8 @@ load helpers.network
heading="NETWORK *ID *NAME *DRIVER"
run_podman network ls
assert "${lines[0]}" =~ "^$heading\$" "network ls header missing"
run_podman network list
assert "${lines[0]}" =~ "^$heading\$" "network list header missing"
run_podman network ls --noheading
assert "$output" !~ "$heading" "network ls --noheading shows header anyway"