Rename --offline flag to --airgap (#3837)

Retain `--offline` as hidden for backward compatibility (won't show up
in help)
This commit is contained in:
Shireesh Anjal
2021-10-18 09:49:52 -07:00
committed by GitHub
parent 3177a62819
commit e45d648ce9
3 changed files with 11 additions and 5 deletions
+3 -3
View File
@@ -98,7 +98,7 @@ EXAMPLES:
3. Periodically upload health diagnostics for the MinIO cluster with alias 'play' (https://play.min.io by default) to SUBNET every 2 days
{{.Prompt}} {{.HelpName}} play --schedule 2
4. Generate health diagnostics report for the MinIO cluster with alias 'play' (https://play.min.io by default) to and output them to the current working directory
{{.Prompt}} {{.HelpName}} play --offline
{{.Prompt}} {{.HelpName}} play --airgap
`,
}
@@ -219,7 +219,7 @@ func fetchSubnetUploadFlags(ctx *cli.Context) (string, int, string, bool) {
// If set, the health report file will not be uploaded
// to subnet and will only be saved locally.
offline := ctx.Bool("offline")
offline := ctx.Bool("airgap") || ctx.Bool("offline")
return license, schedule, name, offline
}
@@ -233,7 +233,7 @@ func validateFlags(uploadToSubnet bool, uploadPeriodically bool, name string) er
}
if globalDevMode {
return errors.New("--dev is not applicable in offline mode")
return errors.New("--dev is not applicable in airgap mode")
}
if uploadPeriodically {
+1 -1
View File
@@ -105,7 +105,7 @@ type SubnetMFAReq struct {
func mainAdminRegister(ctx *cli.Context) error {
checkAdminRegisterSyntax(ctx)
offlineMode := ctx.Bool(("offline"))
offlineMode := ctx.Bool("airgap") || ctx.Bool("offline")
if !offlineMode && !subnetReachable() {
console.Fatalln(subnetNotReachableMsg())
}
+7 -1
View File
@@ -53,7 +53,7 @@ var subnetCommonFlags = []cli.Flag{
Usage: "Specify the HTTP(S) proxy URL to use for connecting to SUBNET",
},
cli.BoolFlag{
Name: "offline",
Name: "airgap",
Usage: "Use in environments without network access to SUBNET (e.g. airgapped, firewalled, etc.)",
},
cli.BoolFlag{
@@ -61,6 +61,12 @@ var subnetCommonFlags = []cli.Flag{
Usage: "Development mode - talks to local SUBNET",
Hidden: true,
},
cli.BoolFlag{
// Deprecated Oct 2021. Same as airgap, retaining as hidden for backward compatibility
Name: "offline",
Usage: "Use in environments without network access to SUBNET (e.g. airgapped, firewalled, etc.)",
Hidden: true,
},
}
func subnetBaseURL() string {