Add datastore to snapshots, force Datastore display when jail exist on multi datastores

This commit is contained in:
yo
2022-06-18 18:24:09 +02:00
parent 1c04f62ed8
commit 9218ffafe1
6 changed files with 145 additions and 92 deletions

View File

@ -225,7 +225,10 @@ You can specify multiple jails.`,
Run: func(cmd *cobra.Command, args []string) {
// Load inventory
ListJails(args, false)
CleanMigrateMess(args)
err := CleanMigrateMess(args)
if err != nil {
fmt.Printf("%v", err)
}
},
}
@ -262,8 +265,8 @@ func init() {
// Command dependant switches
// We reuse these in "gocage snapshot list myjail" and 'gocage datastore list" commands (TODO)
listCmd.Flags().StringVarP(&gDisplayJColumns, "outcol", "o", "JID,Name,Config.Release,Config.Ip4_addr,Running", "Show these columns in output")
// We reuse these flags in "gocage snapshot list myjail" and 'gocage datastore list" commands
listCmd.Flags().StringVarP(&gDisplayJColumns, "outcol", "o", "JID,Name,Datastore,Config.Release,Config.Ip4_addr,Running", "Show these columns in output")
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(&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.")