Add gocage destroy command, v0.35
This commit is contained in:
		
							
								
								
									
										10
									
								
								cmd/root.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								cmd/root.go
									
									
									
									
									
								
							@ -15,7 +15,7 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	gVersion = "0.34"
 | 
						gVersion = "0.35"
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	// TODO : Get from $jail_zpool/defaults.json
 | 
						// TODO : Get from $jail_zpool/defaults.json
 | 
				
			||||||
	MIN_DYN_DEVFS_RULESET = 1000
 | 
						MIN_DYN_DEVFS_RULESET = 1000
 | 
				
			||||||
@ -100,7 +100,7 @@ ex: gocage list srv-db srv-web`,
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*	destroyCmd = &cobra.Command{
 | 
						destroyCmd = &cobra.Command{
 | 
				
			||||||
		Use:   "destroy",
 | 
							Use:   "destroy",
 | 
				
			||||||
		Short: "destroy jails",
 | 
							Short: "destroy jails",
 | 
				
			||||||
		Long: `Destroy jail filesystem, snapshots and configuration file.`,
 | 
							Long: `Destroy jail filesystem, snapshots and configuration file.`,
 | 
				
			||||||
@ -109,7 +109,7 @@ ex: gocage list srv-db srv-web`,
 | 
				
			|||||||
			DestroyJails(args)
 | 
								DestroyJails(args)
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
*/
 | 
					
 | 
				
			||||||
	stopCmd = &cobra.Command{
 | 
						stopCmd = &cobra.Command{
 | 
				
			||||||
		Use:   "stop",
 | 
							Use:   "stop",
 | 
				
			||||||
		Short: "stop jail",
 | 
							Short: "stop jail",
 | 
				
			||||||
@ -343,7 +343,7 @@ func init() {
 | 
				
			|||||||
	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")
 | 
						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")
 | 
				
			||||||
@ -381,7 +381,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(destroyCmd)
 | 
				
			||||||
	rootCmd.AddCommand(shellCmd)
 | 
						rootCmd.AddCommand(shellCmd)
 | 
				
			||||||
	rootCmd.AddCommand(getCmd)
 | 
						rootCmd.AddCommand(getCmd)
 | 
				
			||||||
	rootCmd.AddCommand(setCmd)
 | 
						rootCmd.AddCommand(setCmd)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user