Add spec list feature (#1468)

Adding fission spec list functionality. It lists Functions, Environment, Packages, HTTPTrigger, MessageQueueTriggers, Canary Config, TimeTrigger, KubeWatch created by an application specification.
This commit is contained in:
Anubhav
2019-12-19 19:41:59 +08:00
committed by Ta-Ching Chen
parent c184e7be65
commit 7b3cc8fdf0
2 changed files with 464 additions and 1 deletions
+10 -1
View File
@@ -60,13 +60,22 @@ func Commands() *cobra.Command {
Optional: []flag.Flag{flag.SpecDir},
})
listCmd := &cobra.Command{
Use: "list",
Short: "List all the resources that were created through this spec",
RunE: wrapper.Wrapper(List),
}
wrapper.SetFlags(listCmd, flag.FlagSet{
Optional: []flag.Flag{flag.SpecDeployID, flag.SpecDir},
})
command := &cobra.Command{
Use: "spec",
Aliases: []string{"specs"},
Short: "Manage a declarative application specification",
}
command.AddCommand(initCmd, validateCmd, applyCmd, destroyCmd)
command.AddCommand(initCmd, validateCmd, applyCmd, listCmd, destroyCmd)
return command
}