Add command "list properties" so we can get all internal properties to sort, filter, or set jail properties
This commit is contained in:
15
cmd/root.go
15
cmd/root.go
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
gVersion = "0.022a"
|
||||
gVersion = "0.022b"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -63,10 +63,20 @@ ex: gocage list srv-db srv-web`,
|
||||
},
|
||||
}
|
||||
|
||||
listPropsCmd = &cobra.Command{
|
||||
Use: "properties",
|
||||
Short: "Print jails properties",
|
||||
Long: "Display jails properties. You can use properties to filter, get or set them.",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ListJailsProps(args)
|
||||
cleanAfterRun()
|
||||
},
|
||||
}
|
||||
|
||||
stopCmd = &cobra.Command{
|
||||
Use: "stop",
|
||||
Short: "stop jail",
|
||||
Long: `shutdown jail`,
|
||||
Long: "shutdown jail",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// Get the inventory
|
||||
ListJails(args, false)
|
||||
@ -105,6 +115,7 @@ func init() {
|
||||
// Now declare commands
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
rootCmd.AddCommand(listCmd)
|
||||
listCmd.AddCommand(listPropsCmd)
|
||||
rootCmd.AddCommand(stopCmd)
|
||||
rootCmd.AddCommand(startCmd)
|
||||
|
||||
|
Reference in New Issue
Block a user