feature: Added command to list pods managed by fission for environment/function (#2207)
This commit is contained in:
@@ -85,13 +85,25 @@ func Commands() *cobra.Command {
|
||||
Optional: []flag.Flag{flag.NamespaceEnvironment},
|
||||
})
|
||||
|
||||
listPodsCmd := &cobra.Command{
|
||||
Use: "pods",
|
||||
Aliases: []string{"pod", "po"},
|
||||
Short: "List pods currently maintained by an environment",
|
||||
Long: "List pods currently maintained by an environment",
|
||||
RunE: wrapper.Wrapper(ListPods),
|
||||
}
|
||||
wrapper.SetFlags(listPodsCmd, flag.FlagSet{
|
||||
Required: []flag.Flag{flag.EnvName},
|
||||
Optional: []flag.Flag{flag.NamespaceEnvironment, flag.EnvExecutorType},
|
||||
})
|
||||
|
||||
command := &cobra.Command{
|
||||
Use: "environment",
|
||||
Aliases: []string{"env"},
|
||||
Short: "Create, update and manage environments",
|
||||
}
|
||||
|
||||
command.AddCommand(createCmd, getCmd, updateCmd, deleteCmd, listCmd)
|
||||
command.AddCommand(createCmd, getCmd, updateCmd, deleteCmd, listCmd, listPodsCmd)
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user