Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions cmd/mapt/cmd/aws/hosts/mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,18 @@ func getMacDestroy() *cobra.Command {
}
return mac.Destroy(
&maptContext.ContextArgs{
Context: cmd.Context(),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
KeepState: viper.IsSet(params.KeepState),
Context: cmd.Context(),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
ForceDestroy: viper.IsSet(params.ForceDestroy),
KeepState: viper.IsSet(params.KeepState),
},
viper.GetString(awsParams.MACDHID))
},
}
flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError)
flagSet.StringP(awsParams.MACDHID, "", "", awsParams.MACDHIDDesc)
flagSet.Bool(params.ForceDestroy, false, params.ForceDestroyDesc)
flagSet.Bool(params.KeepState, false, params.KeepStateDesc)
c.PersistentFlags().AddFlagSet(flagSet)
err := c.MarkPersistentFlagRequired(awsParams.MACDHID)
Expand Down
16 changes: 9 additions & 7 deletions cmd/mapt/cmd/aws/hosts/rhel.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,20 @@ func getRHELDestroy() *cobra.Command {
return err
}
return rhel.Destroy(&maptContext.ContextArgs{
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
Serverless: viper.IsSet(params.Serverless),
KeepState: viper.IsSet(params.KeepState),
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
Serverless: viper.IsSet(params.Serverless),
ForceDestroy: viper.IsSet(params.ForceDestroy),
KeepState: viper.IsSet(params.KeepState),
})
},
}
flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError)
flagSet.Bool(params.Serverless, false, params.ServerlessDesc)
flagSet.Bool(params.ForceDestroy, false, params.ForceDestroyDesc)
flagSet.Bool(params.KeepState, false, params.KeepStateDesc)
c.PersistentFlags().AddFlagSet(flagSet)
return c
Expand Down
16 changes: 9 additions & 7 deletions cmd/mapt/cmd/aws/hosts/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,20 @@ func getWindowsDestroy() *cobra.Command {
return err
}
return windows.Destroy(&maptContext.ContextArgs{
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
Serverless: viper.IsSet(params.Serverless),
KeepState: viper.IsSet(params.KeepState),
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
Serverless: viper.IsSet(params.Serverless),
ForceDestroy: viper.IsSet(params.ForceDestroy),
KeepState: viper.IsSet(params.KeepState),
})
},
}
flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError)
flagSet.Bool(params.Serverless, false, params.ServerlessDesc)
flagSet.Bool(params.ForceDestroy, false, params.ForceDestroyDesc)
flagSet.Bool(params.KeepState, false, params.KeepStateDesc)
c.PersistentFlags().AddFlagSet(flagSet)
return c
Expand Down
14 changes: 8 additions & 6 deletions cmd/mapt/cmd/aws/services/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,18 @@ func getDestroyEKS() *cobra.Command {
}
return awsEKS.Destroy(
&maptContext.ContextArgs{
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
KeepState: viper.IsSet(params.KeepState),
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
ForceDestroy: viper.IsSet(params.ForceDestroy),
KeepState: viper.IsSet(params.KeepState),
})
},
}
flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError)
flagSet.Bool(params.ForceDestroy, false, params.ForceDestroyDesc)
flagSet.Bool(params.KeepState, false, params.KeepStateDesc)
c.PersistentFlags().AddFlagSet(flagSet)
return c
Expand Down
14 changes: 8 additions & 6 deletions cmd/mapt/cmd/aws/services/mac-pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,19 @@ func destroyMP() *cobra.Command {
return err
}
return macpool.Destroy(&maptContext.ContextArgs{
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
KeepState: viper.IsSet(params.KeepState),
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
ForceDestroy: viper.IsSet(params.ForceDestroy),
KeepState: viper.IsSet(params.KeepState),
})
},
}
flagSet := pflag.NewFlagSet(params.CreateCmdName, pflag.ExitOnError)
params.AddCommonFlags(flagSet)
flagSet.Bool(params.ForceDestroy, false, params.ForceDestroyDesc)
flagSet.Bool(params.KeepState, false, params.KeepStateDesc)
c.PersistentFlags().AddFlagSet(flagSet)
return c
Expand Down
16 changes: 9 additions & 7 deletions cmd/mapt/cmd/aws/services/snc.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,20 @@ func destroySNC() *cobra.Command {
return err
}
return openshiftsnc.Destroy(&maptContext.ContextArgs{
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
Serverless: viper.IsSet(params.Serverless),
KeepState: viper.IsSet(params.KeepState),
Context: cmd.Context(),
ProjectName: viper.GetString(params.ProjectName),
BackedURL: viper.GetString(params.BackedURL),
Debug: viper.IsSet(params.Debug),
DebugLevel: viper.GetUint(params.DebugLevel),
Serverless: viper.IsSet(params.Serverless),
ForceDestroy: viper.IsSet(params.ForceDestroy),
KeepState: viper.IsSet(params.KeepState),
})
},
}
flagSet := pflag.NewFlagSet(params.DestroyCmdName, pflag.ExitOnError)
flagSet.Bool(params.Serverless, false, params.ServerlessDesc)
flagSet.Bool(params.ForceDestroy, false, params.ForceDestroyDesc)
flagSet.Bool(params.KeepState, false, params.KeepStateDesc)
c.PersistentFlags().AddFlagSet(flagSet)
return c
Expand Down