Version 0.29f + WIP: gocage destroy
This commit is contained in:
parent
fabe9cc330
commit
38266af66e
18
cmd/root.go
18
cmd/root.go
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
gVersion = "0.29f"
|
gVersion = "0.29g"
|
||||||
|
|
||||||
// TODO : Get from $jail_zpool/defaults.json
|
// TODO : Get from $jail_zpool/defaults.json
|
||||||
MIN_DYN_DEVFS_RULESET = 1000
|
MIN_DYN_DEVFS_RULESET = 1000
|
||||||
@ -26,6 +26,7 @@ var (
|
|||||||
gDatastores []Datastore
|
gDatastores []Datastore
|
||||||
|
|
||||||
gUseSudo bool
|
gUseSudo bool
|
||||||
|
gForce bool
|
||||||
|
|
||||||
gConfigFile string
|
gConfigFile string
|
||||||
gDisplayJColumns string
|
gDisplayJColumns string
|
||||||
@ -90,7 +91,17 @@ ex: gocage list srv-db srv-web`,
|
|||||||
ListJailsProps(args)
|
ListJailsProps(args)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* destroyCmd = &cobra.Command{
|
||||||
|
Use: "destroy",
|
||||||
|
Short: "destroy jails",
|
||||||
|
Long: `Destroy jail filesystem, snapshots and configuration file.`,
|
||||||
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
ListJails(args, false)
|
||||||
|
DestroyJails(args)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
*/
|
||||||
stopCmd = &cobra.Command{
|
stopCmd = &cobra.Command{
|
||||||
Use: "stop",
|
Use: "stop",
|
||||||
Short: "stop jail",
|
Short: "stop jail",
|
||||||
@ -290,6 +301,8 @@ func init() {
|
|||||||
listCmd.Flags().BoolVarP(&gNoJailLineSep, "nolinesep", "l", false, "Do not display line separator between jails")
|
listCmd.Flags().BoolVarP(&gNoJailLineSep, "nolinesep", "l", false, "Do not display line separator between jails")
|
||||||
listCmd.Flags().StringVarP(&gFilterJails, "filter", "f", "none", "Only display jails with these values. Ex: \"gocage list -f Config.Boot=1\" will only list started on boot jails")
|
listCmd.Flags().StringVarP(&gFilterJails, "filter", "f", "none", "Only display jails with these values. Ex: \"gocage list -f Config.Boot=1\" will only list started on boot jails")
|
||||||
listCmd.Flags().StringVarP(&gSortJailFields, "sort", "s", "none", "Display jails sorted by field values. Ex: \"gocage list -s +Name,-Config.Priority\" will sort jails by their decreasing name, then increasing start priority. 3 critera max supported.")
|
listCmd.Flags().StringVarP(&gSortJailFields, "sort", "s", "none", "Display jails sorted by field values. Ex: \"gocage list -s +Name,-Config.Priority\" will sort jails by their decreasing name, then increasing start priority. 3 critera max supported.")
|
||||||
|
|
||||||
|
// destroyCmd.Flags().BoolVarP(&gForce, "force", "f", false, "Force stop jail if running")
|
||||||
|
|
||||||
snapshotListCmd.Flags().StringVarP(&gDisplaySColumns, "outcol", "o", "Jailname,Name,Creation,Referenced,Used", "Show these columns in output")
|
snapshotListCmd.Flags().StringVarP(&gDisplaySColumns, "outcol", "o", "Jailname,Name,Creation,Referenced,Used", "Show these columns in output")
|
||||||
snapshotListCmd.Flags().BoolVarP(&gNoSnapLineSep, "nolinesep", "l", false, "Do not display line separator between snapshots")
|
snapshotListCmd.Flags().BoolVarP(&gNoSnapLineSep, "nolinesep", "l", false, "Do not display line separator between snapshots")
|
||||||
@ -320,6 +333,7 @@ func init() {
|
|||||||
rootCmd.AddCommand(stopCmd)
|
rootCmd.AddCommand(stopCmd)
|
||||||
rootCmd.AddCommand(startCmd)
|
rootCmd.AddCommand(startCmd)
|
||||||
rootCmd.AddCommand(restartCmd)
|
rootCmd.AddCommand(restartCmd)
|
||||||
|
// rootCmd.AddCommand(destroyCmd)
|
||||||
rootCmd.AddCommand(shellCmd)
|
rootCmd.AddCommand(shellCmd)
|
||||||
rootCmd.AddCommand(getCmd)
|
rootCmd.AddCommand(getCmd)
|
||||||
rootCmd.AddCommand(setCmd)
|
rootCmd.AddCommand(setCmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user