diff --git a/cmd/config/config.go b/cmd/config/config.go index 594745b92..fd6bd92c3 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -20,12 +20,17 @@ import ( "opendev.org/airship/airshipctl/pkg/config" ) +const configLong = ` +Provides commands which can be used to manage the airshipctl config file. +` + // NewConfigCommand creates a command for interacting with the airshipctl configuration. func NewConfigCommand(cfgFactory config.Factory) *cobra.Command { configRootCmd := &cobra.Command{ Use: "config", DisableFlagsInUseLine: true, - Short: "Manage the airshipctl config file", + Short: "Airshipctl command to manage airshipctl config file", + Long: configLong, } configRootCmd.AddCommand(NewGetContextCommand(cfgFactory)) diff --git a/cmd/config/get_context.go b/cmd/config/get_context.go index 965159581..2cac8f326 100644 --- a/cmd/config/get_context.go +++ b/cmd/config/get_context.go @@ -24,18 +24,19 @@ import ( const ( getContextLong = ` -Display information about contexts such as associated manifests, users, and clusters. +Displays information about contexts such as associated manifests, users, and clusters. It would display a specific +context information, or all defined context information if no name is provided. ` getContextExample = ` -# List all contexts -airshipctl config get-contexts +List all contexts +# airshipctl config get-contexts -# Display the current context -airshipctl config get-context --current +Display the current context +# airshipctl config get-context --current -# Display a specific context -airshipctl config get-context exampleContext +Display a specific context +# airshipctl config get-context exampleContext ` ) @@ -45,10 +46,9 @@ func NewGetContextCommand(cfgFactory config.Factory) *cobra.Command { o := &config.ContextOptions{} cmd := &cobra.Command{ Use: "get-context CONTEXT_NAME", - Short: "Get context information from the airshipctl config", + Short: "Airshipctl command to get context(s) information from the airshipctl config", Long: getContextLong[1:], Example: getContextExample, - // Adding a maximum args cap for documentation purpose Args: cobra.MaximumNArgs(1), Aliases: []string{"get-contexts"}, RunE: func(cmd *cobra.Command, args []string) error { @@ -76,15 +76,7 @@ func NewGetContextCommand(cfgFactory config.Factory) *cobra.Command { func addGetContextFlags(o *config.ContextOptions, cmd *cobra.Command) { flags := cmd.Flags() - flags.BoolVar( - &o.CurrentContext, - "current", - false, - "get the current context") - - flags.StringVar( - &o.Format, - "format", - "yaml", - "choose between `yaml` or `table`, default is `yaml`") + flags.BoolVar(&o.CurrentContext, "current", false, "get the current context") + flags.StringVar(&o.Format, "format", "yaml", + "supported output format `yaml` or `table`, default is `yaml`") } diff --git a/cmd/config/get_management_config.go b/cmd/config/get_management_config.go index ec0b1885a..56244dbb2 100644 --- a/cmd/config/get_management_config.go +++ b/cmd/config/get_management_config.go @@ -23,19 +23,27 @@ import ( "opendev.org/airship/airshipctl/pkg/config" ) -const getManagementConfigExample = ` -# View all defined management configurations -airshipctl config get-management-configs - -# View a specific management configuration named "default" -airshipctl config get-management-config default +const ( + getManagementConfigLong = ` +Displays a specific management config information, or all defined management configs if no name is provided. +The information relates to reboot-delays and retry in seconds along with management-type that has to be used. ` + getManagementConfigExample = ` +View all management configurations +# airshipctl config get-management-configs + +View a specific management configuration named "default" +# airshipctl config get-management-config default +` +) + // NewGetManagementConfigCommand creates a command that enables printing a management configuration to stdout. func NewGetManagementConfigCommand(cfgFactory config.Factory) *cobra.Command { cmd := &cobra.Command{ - Use: "get-management-config [NAME]", - Short: "View a management config or all management configs defined in the airshipctl config", + Use: "get-management-config MGMT_CONFIG_NAME", + Short: "Airshipctl command to view management config(s) defined in the airshipctl config", + Long: getManagementConfigLong, Example: getManagementConfigExample, Args: cobra.MaximumNArgs(1), Aliases: []string{"get-management-configs"}, diff --git a/cmd/config/get_manifest.go b/cmd/config/get_manifest.go index c5dddcecd..e41ceb44d 100644 --- a/cmd/config/get_manifest.go +++ b/cmd/config/get_manifest.go @@ -22,15 +22,16 @@ import ( const ( getManifestsLong = ` -Display a specific manifest information, or all defined manifests if no name is provided. +Displays a specific manifest information, or all defined manifests if no name is provided. The information +includes the repository details related to site manifest along with the local targetPath for them. ` getManifestsExample = ` -# List all the manifests airshipctl knows about -airshipctl config get-manifests +List all the manifests +# airshipctl config get-manifests -# Display a specific manifest -airshipctl config get-manifest e2e +Display a specific manifest +# airshipctl config get-manifest e2e ` ) @@ -39,8 +40,8 @@ airshipctl config get-manifest e2e func NewGetManifestCommand(cfgFactory config.Factory) *cobra.Command { var manifestName string cmd := &cobra.Command{ - Use: "get-manifest NAME", - Short: "Get a manifest(s) information from the airshipctl config", + Use: "get-manifest MANIFEST_NAME", + Short: "Airshipctl command to get a specific or all manifest(s) information from the airshipctl config", Long: getManifestsLong[1:], Example: getManifestsExample, Args: GetManifestNArgs(&manifestName), diff --git a/cmd/config/init.go b/cmd/config/init.go index ef950b70a..c796569e1 100644 --- a/cmd/config/init.go +++ b/cmd/config/init.go @@ -22,20 +22,20 @@ import ( const ( initLong = ` -Generate an airshipctl config file. This file by default will be written to the $HOME/.airship directory, -and will contain default configuration. In case if flag --airshipconf provided - the file will be -written to the specified location instead. If a configuration file already exists at the specified path, -an error will be thrown; to overwrite it, specify the --overwrite flag. +Generates airshipctl config file. This file by default will be written to the $HOME/.airship directory, +and will contain default configuration. In case if flag --airshipconf provided - the default configuration +will be written to the file in the specified location instead. If a configuration file already exists +at the specified path, an error will be thrown; to overwrite it, specify the --overwrite flag. ` initExample = ` -# Create new airshipctl config file at the default location -airshipctl config init +To create new airshipctl config file at the default location +# airshipctl config init -# Create new airshipctl config file at the custom location -airshipctl config init --airshipconf path/to/config +To create new airshipctl config file at the custom location +# airshipctl config init --airshipconf path/to/config -# Create new airshipctl config file at custom location and overwrite it -airshipctl config init --overwrite --airshipconf path/to/config +To create new airshipctl config file at the custom location and overwrite it +# airshipctl config init --overwrite --airshipconf path/to/config ` ) @@ -44,7 +44,7 @@ func NewInitCommand() *cobra.Command { var overwrite bool cmd := &cobra.Command{ Use: "init", - Short: "Generate initial configuration file for airshipctl", + Short: "Airshipctl command to generate initial configuration file for airshipctl", Long: initLong[1:], Example: initExample, RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/config/set_context.go b/cmd/config/set_context.go index 3be363516..4bacfe3e1 100644 --- a/cmd/config/set_context.go +++ b/cmd/config/set_context.go @@ -23,18 +23,16 @@ import ( const ( setContextLong = ` -Create or modify a context in the airshipctl config files. +Creates or modifies context in the airshipctl config file based on the CONTEXT_NAME passed or for the current context +if --current flag is specified. It accepts optional flags which include manifest name and management-config name. ` setContextExample = ` -# Create a new context named "exampleContext" -airshipctl config set-context exampleContext \ - --manifest=exampleManifest \ +To create a new context named "exampleContext" +# airshipctl config set-context exampleContext --manifest=exampleManifest -# Update the manifest of the current-context -airshipctl config set-context \ - --current \ - --manifest=exampleManifest +To update the manifest of the current-context +# airshipctl config set-context --current --manifest=exampleManifest ` setContextManifestFlag = "manifest" @@ -47,8 +45,8 @@ airshipctl config set-context \ func NewSetContextCommand(cfgFactory config.Factory) *cobra.Command { o := &config.ContextOptions{} cmd := &cobra.Command{ - Use: "set-context NAME", - Short: "Manage contexts", + Use: "set-context CONTEXT_NAME", + Short: "Airshipctl command to create/modify context in airshipctl config file", Long: setContextLong[1:], Example: setContextExample, Args: cobra.MaximumNArgs(1), @@ -62,22 +60,11 @@ func NewSetContextCommand(cfgFactory config.Factory) *cobra.Command { func addSetContextFlags(cmd *cobra.Command, o *config.ContextOptions) { flags := cmd.Flags() - flags.StringVar( - &o.Manifest, - setContextManifestFlag, - "", + flags.StringVar(&o.Manifest, setContextManifestFlag, "", "set the manifest for the specified context") - - flags.StringVar( - &o.ManagementConfiguration, - setContextManagementConfigFlag, - "", + flags.StringVar(&o.ManagementConfiguration, setContextManagementConfigFlag, "", "set the management config for the specified context") - - flags.BoolVar( - &o.Current, - setContextCurrentFlag, - false, + flags.BoolVar(&o.Current, setContextCurrentFlag, false, "update the current context") } diff --git a/cmd/config/set_management_configuration.go b/cmd/config/set_management_configuration.go index eb3724b16..9ad58c5cf 100644 --- a/cmd/config/set_management_configuration.go +++ b/cmd/config/set_management_configuration.go @@ -23,20 +23,36 @@ import ( ) const ( + setManagementConfigLong = ` +Creates or modifies management config information based on the MGMT_CONFIG_NAME passed. The allowed set +of optional flags are management-type, system-action-retries and system-reboot-delay. Use --use-proxy +and --insecure to enable proxy and insecure options respectively. +` + + setManagementConfigExample = ` +Create management configuration +# airshipctl config set-management-config default + +Create or update management configuration named "default" with retry and to enable insecure options +# airshipctl config set-management-config default --insecure --system-action-retries 40 + +Enable proxy for "test" management configuration +# airshipctl config set-management-config test --use-proxy +` flagInsecure = "insecure" - flagInsecureDescription = "Ignore SSL certificate verification on out-of-band management requests" + flagInsecureDescription = "ignore SSL certificate verification on out-of-band management requests" flagManagementType = "management-type" - flagManagementTypeDescription = "Set the out-of-band management type" + flagManagementTypeDescription = "set the out-of-band management type" flagUseProxy = "use-proxy" - flagUseProxyDescription = "Use the proxy configuration specified in the local environment" + flagUseProxyDescription = "use the proxy configuration specified in the local environment" flagSystemActionRetries = "system-action-retries" - flagSystemActionRetriesDescription = "Set the number of attempts to poll a host for a status" + flagSystemActionRetriesDescription = "set the number of attempts to poll a host for a status" flagSystemRebootDelay = "system-reboot-delay" - flagSystemRebootDelayDescription = "Set the number of seconds to wait between power actions (e.g. shutdown, startup)" + flagSystemRebootDelayDescription = "set the number of seconds to wait between power actions (e.g. shutdown, startup)" ) // NewSetManagementConfigCommand creates a command for creating and modifying clusters @@ -44,10 +60,12 @@ const ( func NewSetManagementConfigCommand(cfgFactory config.Factory) *cobra.Command { o := &config.ManagementConfiguration{} cmd := &cobra.Command{ - Use: "set-management-config NAME", - Short: "Modify an out-of-band management configuration", - Args: cobra.ExactArgs(1), - RunE: setManagementConfigRunE(cfgFactory, o), + Use: "set-management-config MGMT_CONFIG_NAME", + Short: "Airshipctl command to create/modify out-of-band management configuration in airshipctl config file", + Long: setManagementConfigLong, + Example: setManagementConfigExample, + Args: cobra.ExactArgs(1), + RunE: setManagementConfigRunE(cfgFactory, o), } addSetManagementConfigFlags(cmd, o) diff --git a/cmd/config/set_manifest.go b/cmd/config/set_manifest.go index d79cbfe4e..183d0d088 100644 --- a/cmd/config/set_manifest.go +++ b/cmd/config/set_manifest.go @@ -25,26 +25,22 @@ import ( const ( setManifestsLong = ` -Create or modify a manifests in the airshipctl config file. +Creates or modifies a manifests in the airshipctl config file based on the MANIFEST_NAME argument passed. +The optional flags that can be passed to the command are repo name, url, branch name, tag name, commit hash, +target-path and metadata-path. Use --force flag to enable force checkout of the repo. And use --phase flag +to enable phase repository. ` setManifestsExample = ` -# Create a new manifest -airshipctl config set-manifest exampleManifest \ - --repo exampleRepo \ - --url https://github.com/site \ - --branch master \ - --phase \ - --target-path exampleTargetpath +Create a new manifest +# airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ + --branch master --phase --target-path exampleTargetpath -# Change the phase repo for manifest -airshipctl config set-manifest e2e \ - --repo exampleRepo \ - --phase +Change the phase repo for manifest +# airshipctl config set-manifest e2e --repo exampleRepo --phase -# Change the target-path for manifest -airshipctl config set-manifest e2e \ - --target-path /tmp/e2e +Change the target-path for manifest +# airshipctl config set-manifest e2e --target-path /tmp/e2e ` ) @@ -53,8 +49,8 @@ airshipctl config set-manifest e2e \ func NewSetManifestCommand(cfgFactory config.Factory) *cobra.Command { o := &config.ManifestOptions{} cmd := &cobra.Command{ - Use: "set-manifest NAME", - Short: "Manage manifests in airship config", + Use: "set-manifest MANIFEST_NAME", + Short: "Airshipctl command to create/modify manifests in airship config", Long: setManifestsLong[1:], Example: setManifestsExample, Args: cobra.ExactArgs(1), @@ -88,57 +84,22 @@ func NewSetManifestCommand(cfgFactory config.Factory) *cobra.Command { func addSetManifestFlags(o *config.ManifestOptions, cmd *cobra.Command) { flags := cmd.Flags() - flags.StringVar( - &o.RepoName, - "repo", - "", + flags.StringVar(&o.RepoName, "repo", "", "the name of the repository to be associated with this manifest") - - flags.StringVar( - &o.URL, - "url", - "", + flags.StringVar(&o.URL, "url", "", "the repository url to be associated with this manifest") - - flags.StringVar( - &o.Branch, - "branch", - "", + flags.StringVar(&o.Branch, "branch", "", "the branch to be associated with repository in this manifest") - - flags.StringVar( - &o.CommitHash, - "commithash", - "", + flags.StringVar(&o.CommitHash, "commithash", "", "the commit hash to be associated with repository in this manifest") - - flags.StringVar( - &o.Tag, - "tag", - "", + flags.StringVar(&o.Tag, "tag", "", "the tag to be associated with repository in this manifest") - - flags.BoolVar( - &o.Force, - "force", - false, + flags.BoolVar(&o.Force, "force", false, "if set, enable force checkout in repository with this manifest") - - flags.BoolVar( - &o.IsPhase, - "phase", - false, - "if set, enable this repository as phase repository to be used with this manifest") - - flags.StringVar( - &o.TargetPath, - "target-path", - "", + flags.StringVar(&o.TargetPath, "target-path", "", "the target path to be set for this manifest") - - flags.StringVar( - &o.MetadataPath, - "metadata-path", - "", + flags.StringVar(&o.MetadataPath, "metadata-path", "", "the metadata path to be set for this manifest") + flags.BoolVar(&o.IsPhase, "phase", false, + "if set, enable this repository as phase repository to be used with this manifest") } diff --git a/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden b/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden index 6cd2a7a9d..9de5d349d 100644 --- a/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden +++ b/cmd/config/testdata/TestConfigGoldenOutput/config-cmd-with-help.golden @@ -1,18 +1,19 @@ -Manage the airshipctl config file + +Provides commands which can be used to manage the airshipctl config file. Usage: config [command] Available Commands: - get-context Get context information from the airshipctl config - get-management-config View a management config or all management configs defined in the airshipctl config - get-manifest Get a manifest(s) information from the airshipctl config + get-context Airshipctl command to get context(s) information from the airshipctl config + get-management-config Airshipctl command to view management config(s) defined in the airshipctl config + get-manifest Airshipctl command to get a specific or all manifest(s) information from the airshipctl config help Help about any command - init Generate initial configuration file for airshipctl - set-context Manage contexts - set-management-config Modify an out-of-band management configuration - set-manifest Manage manifests in airship config - use-context Switch to a different context + init Airshipctl command to generate initial configuration file for airshipctl + set-context Airshipctl command to create/modify context in airshipctl config file + set-management-config Airshipctl command to create/modify out-of-band management configuration in airshipctl config file + set-manifest Airshipctl command to create/modify manifests in airship config + use-context Airshipctl command to switch to a different context Flags: -h, --help help for config diff --git a/cmd/config/testdata/TestConfigInitGoldenOutput/config-init-help.golden b/cmd/config/testdata/TestConfigInitGoldenOutput/config-init-help.golden index e3ed66334..b8cc079c7 100644 --- a/cmd/config/testdata/TestConfigInitGoldenOutput/config-init-help.golden +++ b/cmd/config/testdata/TestConfigInitGoldenOutput/config-init-help.golden @@ -1,21 +1,21 @@ -Generate an airshipctl config file. This file by default will be written to the $HOME/.airship directory, -and will contain default configuration. In case if flag --airshipconf provided - the file will be -written to the specified location instead. If a configuration file already exists at the specified path, -an error will be thrown; to overwrite it, specify the --overwrite flag. +Generates airshipctl config file. This file by default will be written to the $HOME/.airship directory, +and will contain default configuration. In case if flag --airshipconf provided - the default configuration +will be written to the file in the specified location instead. If a configuration file already exists +at the specified path, an error will be thrown; to overwrite it, specify the --overwrite flag. Usage: init [flags] Examples: -# Create new airshipctl config file at the default location -airshipctl config init +To create new airshipctl config file at the default location +# airshipctl config init -# Create new airshipctl config file at the custom location -airshipctl config init --airshipconf path/to/config +To create new airshipctl config file at the custom location +# airshipctl config init --airshipconf path/to/config -# Create new airshipctl config file at custom location and overwrite it -airshipctl config init --overwrite --airshipconf path/to/config +To create new airshipctl config file at the custom location and overwrite it +# airshipctl config init --overwrite --airshipconf path/to/config Flags: diff --git a/cmd/config/testdata/TestConfigSetContextGoldenOutput/config-cmd-set-context-with-help.golden b/cmd/config/testdata/TestConfigSetContextGoldenOutput/config-cmd-set-context-with-help.golden index 18ce30d3d..eb3edc3bc 100644 --- a/cmd/config/testdata/TestConfigSetContextGoldenOutput/config-cmd-set-context-with-help.golden +++ b/cmd/config/testdata/TestConfigSetContextGoldenOutput/config-cmd-set-context-with-help.golden @@ -1,18 +1,16 @@ -Create or modify a context in the airshipctl config files. +Creates or modifies context in the airshipctl config file based on the CONTEXT_NAME passed or for the current context +if --current flag is specified. It accepts optional flags which include manifest name and management-config name. Usage: - set-context NAME [flags] + set-context CONTEXT_NAME [flags] Examples: -# Create a new context named "exampleContext" -airshipctl config set-context exampleContext \ - --manifest=exampleManifest \ +To create a new context named "exampleContext" +# airshipctl config set-context exampleContext --manifest=exampleManifest -# Update the manifest of the current-context -airshipctl config set-context \ - --current \ - --manifest=exampleManifest +To update the manifest of the current-context +# airshipctl config set-context --current --manifest=exampleManifest Flags: diff --git a/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden b/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden index 197729208..d8266ac3d 100644 --- a/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden +++ b/cmd/config/testdata/TestConfigSetManagementConfigurationCmdGoldenOutput/config-cmd-set-management-config-with-help.golden @@ -1,12 +1,27 @@ -Modify an out-of-band management configuration + +Creates or modifies management config information based on the MGMT_CONFIG_NAME passed. The allowed set +of optional flags are management-type, system-action-retries and system-reboot-delay. Use --use-proxy +and --insecure to enable proxy and insecure options respectively. Usage: - set-management-config NAME [flags] + set-management-config MGMT_CONFIG_NAME [flags] + +Examples: + +Create management configuration +# airshipctl config set-management-config default + +Create or update management configuration named "default" with retry and to enable insecure options +# airshipctl config set-management-config default --insecure --system-action-retries 40 + +Enable proxy for "test" management configuration +# airshipctl config set-management-config test --use-proxy + Flags: -h, --help help for set-management-config - --insecure Ignore SSL certificate verification on out-of-band management requests - --management-type string Set the out-of-band management type (default "redfish") - --system-action-retries int Set the number of attempts to poll a host for a status (default 30) - --system-reboot-delay int Set the number of seconds to wait between power actions (e.g. shutdown, startup) (default 30) - --use-proxy Use the proxy configuration specified in the local environment (default true) + --insecure ignore SSL certificate verification on out-of-band management requests + --management-type string set the out-of-band management type (default "redfish") + --system-action-retries int set the number of attempts to poll a host for a status (default 30) + --system-reboot-delay int set the number of seconds to wait between power actions (e.g. shutdown, startup) (default 30) + --use-proxy use the proxy configuration specified in the local environment (default true) diff --git a/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-few-args.golden b/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-few-args.golden index 8a528f20e..2bbf73f85 100644 --- a/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-few-args.golden +++ b/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-few-args.golden @@ -1,25 +1,18 @@ Error: accepts 1 arg(s), received 0 Usage: - set-manifest NAME [flags] + set-manifest MANIFEST_NAME [flags] Examples: -# Create a new manifest -airshipctl config set-manifest exampleManifest \ - --repo exampleRepo \ - --url https://github.com/site \ - --branch master \ - --phase \ - --target-path exampleTargetpath +Create a new manifest +# airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ + --branch master --phase --target-path exampleTargetpath -# Change the phase repo for manifest -airshipctl config set-manifest e2e \ - --repo exampleRepo \ - --phase +Change the phase repo for manifest +# airshipctl config set-manifest e2e --repo exampleRepo --phase -# Change the target-path for manifest -airshipctl config set-manifest e2e \ - --target-path /tmp/e2e +Change the target-path for manifest +# airshipctl config set-manifest e2e --target-path /tmp/e2e Flags: diff --git a/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-many-args.golden b/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-many-args.golden index fb48ed149..1691e3d24 100644 --- a/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-many-args.golden +++ b/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-too-many-args.golden @@ -1,25 +1,18 @@ Error: accepts 1 arg(s), received 2 Usage: - set-manifest NAME [flags] + set-manifest MANIFEST_NAME [flags] Examples: -# Create a new manifest -airshipctl config set-manifest exampleManifest \ - --repo exampleRepo \ - --url https://github.com/site \ - --branch master \ - --phase \ - --target-path exampleTargetpath +Create a new manifest +# airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ + --branch master --phase --target-path exampleTargetpath -# Change the phase repo for manifest -airshipctl config set-manifest e2e \ - --repo exampleRepo \ - --phase +Change the phase repo for manifest +# airshipctl config set-manifest e2e --repo exampleRepo --phase -# Change the target-path for manifest -airshipctl config set-manifest e2e \ - --target-path /tmp/e2e +Change the target-path for manifest +# airshipctl config set-manifest e2e --target-path /tmp/e2e Flags: diff --git a/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-with-help.golden b/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-with-help.golden index 3fcddf00b..6707f8dcb 100644 --- a/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-with-help.golden +++ b/cmd/config/testdata/TestConfigSetManifestGoldenOutput/config-cmd-set-manifest-with-help.golden @@ -1,26 +1,22 @@ -Create or modify a manifests in the airshipctl config file. +Creates or modifies a manifests in the airshipctl config file based on the MANIFEST_NAME argument passed. +The optional flags that can be passed to the command are repo name, url, branch name, tag name, commit hash, +target-path and metadata-path. Use --force flag to enable force checkout of the repo. And use --phase flag +to enable phase repository. Usage: - set-manifest NAME [flags] + set-manifest MANIFEST_NAME [flags] Examples: -# Create a new manifest -airshipctl config set-manifest exampleManifest \ - --repo exampleRepo \ - --url https://github.com/site \ - --branch master \ - --phase \ - --target-path exampleTargetpath +Create a new manifest +# airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ + --branch master --phase --target-path exampleTargetpath -# Change the phase repo for manifest -airshipctl config set-manifest e2e \ - --repo exampleRepo \ - --phase +Change the phase repo for manifest +# airshipctl config set-manifest e2e --repo exampleRepo --phase -# Change the target-path for manifest -airshipctl config set-manifest e2e \ - --target-path /tmp/e2e +Change the target-path for manifest +# airshipctl config set-manifest e2e --target-path /tmp/e2e Flags: diff --git a/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-does-not-exist.golden b/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-does-not-exist.golden index 76c16fec2..2ea3e7b0b 100644 --- a/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-does-not-exist.golden +++ b/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-does-not-exist.golden @@ -1,11 +1,11 @@ Error: missing configuration: context with name 'foo' Usage: - use-context NAME [flags] + use-context CONTEXT_NAME [flags] Examples: -# Switch to a context named "exampleContext" in airshipctl config file -airshipctl config use-context exampleContext +Switch to a context named "exampleContext" in airshipctl config file +# airshipctl config use-context exampleContext Flags: diff --git a/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-no-args.golden b/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-no-args.golden index d98a33ff2..49d8ba1b8 100644 --- a/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-no-args.golden +++ b/cmd/config/testdata/TestConfigUseContextGoldenOutput/config-use-context-no-args.golden @@ -1,11 +1,11 @@ Error: accepts 1 arg(s), received 0 Usage: - use-context NAME [flags] + use-context CONTEXT_NAME [flags] Examples: -# Switch to a context named "exampleContext" in airshipctl config file -airshipctl config use-context exampleContext +Switch to a context named "exampleContext" in airshipctl config file +# airshipctl config use-context exampleContext Flags: diff --git a/cmd/config/testdata/TestGetContextCmdGoldenOutput/get-multiple-contexts.golden b/cmd/config/testdata/TestGetContextCmdGoldenOutput/get-multiple-contexts.golden index 112ec0c2c..d83320409 100644 --- a/cmd/config/testdata/TestGetContextCmdGoldenOutput/get-multiple-contexts.golden +++ b/cmd/config/testdata/TestGetContextCmdGoldenOutput/get-multiple-contexts.golden @@ -7,18 +7,18 @@ Aliases: Examples: -# List all contexts -airshipctl config get-contexts +List all contexts +# airshipctl config get-contexts -# Display the current context -airshipctl config get-context --current +Display the current context +# airshipctl config get-context --current -# Display a specific context -airshipctl config get-context exampleContext +Display a specific context +# airshipctl config get-context exampleContext Flags: --current get the current context - --format yaml choose between yaml or `table`, default is `yaml` (default "yaml") + --format yaml supported output format yaml or `table`, default is `yaml` (default "yaml") -h, --help help for get-context diff --git a/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden b/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden index 17f5cdd1c..34064eb31 100644 --- a/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden +++ b/cmd/config/testdata/TestGetContextCmdGoldenOutput/missing.golden @@ -7,18 +7,18 @@ Aliases: Examples: -# List all contexts -airshipctl config get-contexts +List all contexts +# airshipctl config get-contexts -# Display the current context -airshipctl config get-context --current +Display the current context +# airshipctl config get-context --current -# Display a specific context -airshipctl config get-context exampleContext +Display a specific context +# airshipctl config get-context exampleContext Flags: --current get the current context - --format yaml choose between yaml or `table`, default is `yaml` (default "yaml") + --format yaml supported output format yaml or `table`, default is `yaml` (default "yaml") -h, --help help for get-context diff --git a/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-not-found.golden b/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-not-found.golden index 36844b15e..36110bda9 100644 --- a/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-not-found.golden +++ b/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-not-found.golden @@ -1,17 +1,17 @@ Error: Unknown management configuration 'foo'. Usage: - get-management-config [NAME] [flags] + get-management-config MGMT_CONFIG_NAME [flags] Aliases: get-management-config, get-management-configs Examples: -# View all defined management configurations -airshipctl config get-management-configs +View all management configurations +# airshipctl config get-management-configs -# View a specific management configuration named "default" -airshipctl config get-management-config default +View a specific management configuration named "default" +# airshipctl config get-management-config default Flags: diff --git a/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden b/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden index 555befa2a..9ff1e025a 100644 --- a/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden +++ b/cmd/config/testdata/TestGetManagementConfigCmdGoldenOutput/get-management-config-with-help.golden @@ -1,18 +1,20 @@ -View a management config or all management configs defined in the airshipctl config + +Displays a specific management config information, or all defined management configs if no name is provided. +The information relates to reboot-delays and retry in seconds along with management-type that has to be used. Usage: - get-management-config [NAME] [flags] + get-management-config MGMT_CONFIG_NAME [flags] Aliases: get-management-config, get-management-configs Examples: -# View all defined management configurations -airshipctl config get-management-configs +View all management configurations +# airshipctl config get-management-configs -# View a specific management configuration named "default" -airshipctl config get-management-config default +View a specific management configuration named "default" +# airshipctl config get-management-config default Flags: diff --git a/cmd/config/testdata/TestNewGetManifestCommandGoldenOutput/config-get-manifest-help.golden b/cmd/config/testdata/TestNewGetManifestCommandGoldenOutput/config-get-manifest-help.golden index 7d3eb66a5..f1d2564d7 100644 --- a/cmd/config/testdata/TestNewGetManifestCommandGoldenOutput/config-get-manifest-help.golden +++ b/cmd/config/testdata/TestNewGetManifestCommandGoldenOutput/config-get-manifest-help.golden @@ -1,18 +1,19 @@ -Display a specific manifest information, or all defined manifests if no name is provided. +Displays a specific manifest information, or all defined manifests if no name is provided. The information +includes the repository details related to site manifest along with the local targetPath for them. Usage: - get-manifest NAME [flags] + get-manifest MANIFEST_NAME [flags] Aliases: get-manifest, get-manifests Examples: -# List all the manifests airshipctl knows about -airshipctl config get-manifests +List all the manifests +# airshipctl config get-manifests -# Display a specific manifest -airshipctl config get-manifest e2e +Display a specific manifest +# airshipctl config get-manifest e2e Flags: diff --git a/cmd/config/use_context.go b/cmd/config/use_context.go index 13eb11a42..d608818e6 100644 --- a/cmd/config/use_context.go +++ b/cmd/config/use_context.go @@ -25,20 +25,20 @@ import ( const ( useContextLong = ` Switch to a different context defined in the airshipctl config file. -This command doesn't change a context for the kubeconfig file. +This command doesn't change the context for the kubeconfig file. ` useContextExample = ` -# Switch to a context named "exampleContext" in airshipctl config file -airshipctl config use-context exampleContext +Switch to a context named "exampleContext" in airshipctl config file +# airshipctl config use-context exampleContext ` ) // NewUseContextCommand creates a command for switching to a defined airshipctl context. func NewUseContextCommand(cfgFactory config.Factory) *cobra.Command { cmd := &cobra.Command{ - Use: "use-context NAME", - Short: "Switch to a different context", + Use: "use-context CONTEXT_NAME", + Short: "Airshipctl command to switch to a different context", Long: useContextLong[1:], Example: useContextExample, Args: cobra.ExactArgs(1), diff --git a/cmd/testdata/TestRootGoldenOutput/rootCmd-with-default-subcommands.golden b/cmd/testdata/TestRootGoldenOutput/rootCmd-with-default-subcommands.golden index fc68771cb..655add631 100644 --- a/cmd/testdata/TestRootGoldenOutput/rootCmd-with-default-subcommands.golden +++ b/cmd/testdata/TestRootGoldenOutput/rootCmd-with-default-subcommands.golden @@ -9,7 +9,7 @@ Available Commands: baremetal Airshipctl command to manage bare metal host(s) cluster Airshipctl command to manage kubernetes clusters completion Generate completion script for the specified shell (bash or zsh) - config Manage the airshipctl config file + config Airshipctl command to manage airshipctl config file document Manage deployment documents help Help about any command phase Manage phases diff --git a/docs/source/cli/airshipctl.md b/docs/source/cli/airshipctl.md index 373b3ebd1..2b8db1047 100644 --- a/docs/source/cli/airshipctl.md +++ b/docs/source/cli/airshipctl.md @@ -22,7 +22,7 @@ A unified entrypoint to various airship components * [airshipctl baremetal](airshipctl_baremetal.md) - Airshipctl command to manage bare metal host(s) * [airshipctl cluster](airshipctl_cluster.md) - Airshipctl command to manage kubernetes clusters * [airshipctl completion](airshipctl_completion.md) - Generate completion script for the specified shell (bash or zsh) -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file * [airshipctl document](airshipctl_document.md) - Manage deployment documents * [airshipctl phase](airshipctl_phase.md) - Manage phases * [airshipctl plan](airshipctl_plan.md) - Manage plans diff --git a/docs/source/cli/airshipctl_config.md b/docs/source/cli/airshipctl_config.md index 67b004cbb..ca093fb39 100644 --- a/docs/source/cli/airshipctl_config.md +++ b/docs/source/cli/airshipctl_config.md @@ -1,10 +1,12 @@ ## airshipctl config -Manage the airshipctl config file +Airshipctl command to manage airshipctl config file ### Synopsis -Manage the airshipctl config file + +Provides commands which can be used to manage the airshipctl config file. + ### Options @@ -22,12 +24,12 @@ Manage the airshipctl config file ### SEE ALSO * [airshipctl](airshipctl.md) - A unified entrypoint to various airship components -* [airshipctl config get-context](airshipctl_config_get-context.md) - Get context information from the airshipctl config -* [airshipctl config get-management-config](airshipctl_config_get-management-config.md) - View a management config or all management configs defined in the airshipctl config -* [airshipctl config get-manifest](airshipctl_config_get-manifest.md) - Get a manifest(s) information from the airshipctl config -* [airshipctl config init](airshipctl_config_init.md) - Generate initial configuration file for airshipctl -* [airshipctl config set-context](airshipctl_config_set-context.md) - Manage contexts -* [airshipctl config set-management-config](airshipctl_config_set-management-config.md) - Modify an out-of-band management configuration -* [airshipctl config set-manifest](airshipctl_config_set-manifest.md) - Manage manifests in airship config -* [airshipctl config use-context](airshipctl_config_use-context.md) - Switch to a different context +* [airshipctl config get-context](airshipctl_config_get-context.md) - Airshipctl command to get context(s) information from the airshipctl config +* [airshipctl config get-management-config](airshipctl_config_get-management-config.md) - Airshipctl command to view management config(s) defined in the airshipctl config +* [airshipctl config get-manifest](airshipctl_config_get-manifest.md) - Airshipctl command to get a specific or all manifest(s) information from the airshipctl config +* [airshipctl config init](airshipctl_config_init.md) - Airshipctl command to generate initial configuration file for airshipctl +* [airshipctl config set-context](airshipctl_config_set-context.md) - Airshipctl command to create/modify context in airshipctl config file +* [airshipctl config set-management-config](airshipctl_config_set-management-config.md) - Airshipctl command to create/modify out-of-band management configuration in airshipctl config file +* [airshipctl config set-manifest](airshipctl_config_set-manifest.md) - Airshipctl command to create/modify manifests in airship config +* [airshipctl config use-context](airshipctl_config_use-context.md) - Airshipctl command to switch to a different context diff --git a/docs/source/cli/airshipctl_config_get-context.md b/docs/source/cli/airshipctl_config_get-context.md index b1c9af814..b9950e2d2 100644 --- a/docs/source/cli/airshipctl_config_get-context.md +++ b/docs/source/cli/airshipctl_config_get-context.md @@ -1,10 +1,11 @@ ## airshipctl config get-context -Get context information from the airshipctl config +Airshipctl command to get context(s) information from the airshipctl config ### Synopsis -Display information about contexts such as associated manifests, users, and clusters. +Displays information about contexts such as associated manifests, users, and clusters. It would display a specific +context information, or all defined context information if no name is provided. ``` @@ -15,14 +16,14 @@ airshipctl config get-context CONTEXT_NAME [flags] ``` -# List all contexts -airshipctl config get-contexts +List all contexts +# airshipctl config get-contexts -# Display the current context -airshipctl config get-context --current +Display the current context +# airshipctl config get-context --current -# Display a specific context -airshipctl config get-context exampleContext +Display a specific context +# airshipctl config get-context exampleContext ``` @@ -30,7 +31,7 @@ airshipctl config get-context exampleContext ``` --current get the current context - --format yaml choose between yaml or `table`, default is `yaml` (default "yaml") + --format yaml supported output format yaml or `table`, default is `yaml` (default "yaml") -h, --help help for get-context ``` @@ -43,5 +44,5 @@ airshipctl config get-context exampleContext ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_get-management-config.md b/docs/source/cli/airshipctl_config_get-management-config.md index 7f2731eed..0312c9236 100644 --- a/docs/source/cli/airshipctl_config_get-management-config.md +++ b/docs/source/cli/airshipctl_config_get-management-config.md @@ -1,24 +1,27 @@ ## airshipctl config get-management-config -View a management config or all management configs defined in the airshipctl config +Airshipctl command to view management config(s) defined in the airshipctl config ### Synopsis -View a management config or all management configs defined in the airshipctl config + +Displays a specific management config information, or all defined management configs if no name is provided. +The information relates to reboot-delays and retry in seconds along with management-type that has to be used. + ``` -airshipctl config get-management-config [NAME] [flags] +airshipctl config get-management-config MGMT_CONFIG_NAME [flags] ``` ### Examples ``` -# View all defined management configurations -airshipctl config get-management-configs +View all management configurations +# airshipctl config get-management-configs -# View a specific management configuration named "default" -airshipctl config get-management-config default +View a specific management configuration named "default" +# airshipctl config get-management-config default ``` @@ -37,5 +40,5 @@ airshipctl config get-management-config default ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_get-manifest.md b/docs/source/cli/airshipctl_config_get-manifest.md index 370ba82f9..c7ecbec53 100644 --- a/docs/source/cli/airshipctl_config_get-manifest.md +++ b/docs/source/cli/airshipctl_config_get-manifest.md @@ -1,25 +1,26 @@ ## airshipctl config get-manifest -Get a manifest(s) information from the airshipctl config +Airshipctl command to get a specific or all manifest(s) information from the airshipctl config ### Synopsis -Display a specific manifest information, or all defined manifests if no name is provided. +Displays a specific manifest information, or all defined manifests if no name is provided. The information +includes the repository details related to site manifest along with the local targetPath for them. ``` -airshipctl config get-manifest NAME [flags] +airshipctl config get-manifest MANIFEST_NAME [flags] ``` ### Examples ``` -# List all the manifests airshipctl knows about -airshipctl config get-manifests +List all the manifests +# airshipctl config get-manifests -# Display a specific manifest -airshipctl config get-manifest e2e +Display a specific manifest +# airshipctl config get-manifest e2e ``` @@ -38,5 +39,5 @@ airshipctl config get-manifest e2e ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_init.md b/docs/source/cli/airshipctl_config_init.md index fbdbd0223..d55e9bb9b 100644 --- a/docs/source/cli/airshipctl_config_init.md +++ b/docs/source/cli/airshipctl_config_init.md @@ -1,13 +1,13 @@ ## airshipctl config init -Generate initial configuration file for airshipctl +Airshipctl command to generate initial configuration file for airshipctl ### Synopsis -Generate an airshipctl config file. This file by default will be written to the $HOME/.airship directory, -and will contain default configuration. In case if flag --airshipconf provided - the file will be -written to the specified location instead. If a configuration file already exists at the specified path, -an error will be thrown; to overwrite it, specify the --overwrite flag. +Generates airshipctl config file. This file by default will be written to the $HOME/.airship directory, +and will contain default configuration. In case if flag --airshipconf provided - the default configuration +will be written to the file in the specified location instead. If a configuration file already exists +at the specified path, an error will be thrown; to overwrite it, specify the --overwrite flag. ``` @@ -18,14 +18,14 @@ airshipctl config init [flags] ``` -# Create new airshipctl config file at the default location -airshipctl config init +To create new airshipctl config file at the default location +# airshipctl config init -# Create new airshipctl config file at the custom location -airshipctl config init --airshipconf path/to/config +To create new airshipctl config file at the custom location +# airshipctl config init --airshipconf path/to/config -# Create new airshipctl config file at custom location and overwrite it -airshipctl config init --overwrite --airshipconf path/to/config +To create new airshipctl config file at the custom location and overwrite it +# airshipctl config init --overwrite --airshipconf path/to/config ``` @@ -45,5 +45,5 @@ airshipctl config init --overwrite --airshipconf path/to/config ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_set-context.md b/docs/source/cli/airshipctl_config_set-context.md index ce18d1afe..88e046b47 100644 --- a/docs/source/cli/airshipctl_config_set-context.md +++ b/docs/source/cli/airshipctl_config_set-context.md @@ -1,28 +1,26 @@ ## airshipctl config set-context -Manage contexts +Airshipctl command to create/modify context in airshipctl config file ### Synopsis -Create or modify a context in the airshipctl config files. +Creates or modifies context in the airshipctl config file based on the CONTEXT_NAME passed or for the current context +if --current flag is specified. It accepts optional flags which include manifest name and management-config name. ``` -airshipctl config set-context NAME [flags] +airshipctl config set-context CONTEXT_NAME [flags] ``` ### Examples ``` -# Create a new context named "exampleContext" -airshipctl config set-context exampleContext \ - --manifest=exampleManifest \ +To create a new context named "exampleContext" +# airshipctl config set-context exampleContext --manifest=exampleManifest -# Update the manifest of the current-context -airshipctl config set-context \ - --current \ - --manifest=exampleManifest +To update the manifest of the current-context +# airshipctl config set-context --current --manifest=exampleManifest ``` @@ -44,5 +42,5 @@ airshipctl config set-context \ ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_set-management-config.md b/docs/source/cli/airshipctl_config_set-management-config.md index a48b627a3..832dc3226 100644 --- a/docs/source/cli/airshipctl_config_set-management-config.md +++ b/docs/source/cli/airshipctl_config_set-management-config.md @@ -1,24 +1,43 @@ ## airshipctl config set-management-config -Modify an out-of-band management configuration +Airshipctl command to create/modify out-of-band management configuration in airshipctl config file ### Synopsis -Modify an out-of-band management configuration + +Creates or modifies management config information based on the MGMT_CONFIG_NAME passed. The allowed set +of optional flags are management-type, system-action-retries and system-reboot-delay. Use --use-proxy +and --insecure to enable proxy and insecure options respectively. + ``` -airshipctl config set-management-config NAME [flags] +airshipctl config set-management-config MGMT_CONFIG_NAME [flags] +``` + +### Examples + +``` + +Create management configuration +# airshipctl config set-management-config default + +Create or update management configuration named "default" with retry and to enable insecure options +# airshipctl config set-management-config default --insecure --system-action-retries 40 + +Enable proxy for "test" management configuration +# airshipctl config set-management-config test --use-proxy + ``` ### Options ``` -h, --help help for set-management-config - --insecure Ignore SSL certificate verification on out-of-band management requests - --management-type string Set the out-of-band management type (default "redfish") - --system-action-retries int Set the number of attempts to poll a host for a status (default 30) - --system-reboot-delay int Set the number of seconds to wait between power actions (e.g. shutdown, startup) (default 30) - --use-proxy Use the proxy configuration specified in the local environment (default true) + --insecure ignore SSL certificate verification on out-of-band management requests + --management-type string set the out-of-band management type (default "redfish") + --system-action-retries int set the number of attempts to poll a host for a status (default 30) + --system-reboot-delay int set the number of seconds to wait between power actions (e.g. shutdown, startup) (default 30) + --use-proxy use the proxy configuration specified in the local environment (default true) ``` ### Options inherited from parent commands @@ -30,5 +49,5 @@ airshipctl config set-management-config NAME [flags] ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_set-manifest.md b/docs/source/cli/airshipctl_config_set-manifest.md index a41926979..93a7b785e 100644 --- a/docs/source/cli/airshipctl_config_set-manifest.md +++ b/docs/source/cli/airshipctl_config_set-manifest.md @@ -1,36 +1,32 @@ ## airshipctl config set-manifest -Manage manifests in airship config +Airshipctl command to create/modify manifests in airship config ### Synopsis -Create or modify a manifests in the airshipctl config file. +Creates or modifies a manifests in the airshipctl config file based on the MANIFEST_NAME argument passed. +The optional flags that can be passed to the command are repo name, url, branch name, tag name, commit hash, +target-path and metadata-path. Use --force flag to enable force checkout of the repo. And use --phase flag +to enable phase repository. ``` -airshipctl config set-manifest NAME [flags] +airshipctl config set-manifest MANIFEST_NAME [flags] ``` ### Examples ``` -# Create a new manifest -airshipctl config set-manifest exampleManifest \ - --repo exampleRepo \ - --url https://github.com/site \ - --branch master \ - --phase \ - --target-path exampleTargetpath +Create a new manifest +# airshipctl config set-manifest exampleManifest --repo exampleRepo --url https://github.com/site \ + --branch master --phase --target-path exampleTargetpath -# Change the phase repo for manifest -airshipctl config set-manifest e2e \ - --repo exampleRepo \ - --phase +Change the phase repo for manifest +# airshipctl config set-manifest e2e --repo exampleRepo --phase -# Change the target-path for manifest -airshipctl config set-manifest e2e \ - --target-path /tmp/e2e +Change the target-path for manifest +# airshipctl config set-manifest e2e --target-path /tmp/e2e ``` @@ -58,5 +54,5 @@ airshipctl config set-manifest e2e \ ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file diff --git a/docs/source/cli/airshipctl_config_use-context.md b/docs/source/cli/airshipctl_config_use-context.md index 29a00253c..ba36a6322 100644 --- a/docs/source/cli/airshipctl_config_use-context.md +++ b/docs/source/cli/airshipctl_config_use-context.md @@ -1,23 +1,23 @@ ## airshipctl config use-context -Switch to a different context +Airshipctl command to switch to a different context ### Synopsis Switch to a different context defined in the airshipctl config file. -This command doesn't change a context for the kubeconfig file. +This command doesn't change the context for the kubeconfig file. ``` -airshipctl config use-context NAME [flags] +airshipctl config use-context CONTEXT_NAME [flags] ``` ### Examples ``` -# Switch to a context named "exampleContext" in airshipctl config file -airshipctl config use-context exampleContext +Switch to a context named "exampleContext" in airshipctl config file +# airshipctl config use-context exampleContext ``` @@ -36,5 +36,5 @@ airshipctl config use-context exampleContext ### SEE ALSO -* [airshipctl config](airshipctl_config.md) - Manage the airshipctl config file +* [airshipctl config](airshipctl_config.md) - Airshipctl command to manage airshipctl config file