diff --git a/docs/cli/commands/tanzu.md b/docs/cli/commands/tanzu.md index 2983df387..0dcc5365b 100644 --- a/docs/cli/commands/tanzu.md +++ b/docs/cli/commands/tanzu.md @@ -10,7 +10,7 @@ The Tanzu CLI ### SEE ALSO -* [tanzu api-token](tanzu_api-token.md) - Manage API Tokens for Tanzu Platform +* [tanzu api-token](tanzu_api-token.md) - Manage API Tokens for Tanzu Platform Self-managed * [tanzu completion](tanzu_completion.md) - Output shell completion code * [tanzu config](tanzu_config.md) - Configuration for the CLI * [tanzu context](tanzu_context.md) - Configure and manage contexts for the Tanzu CLI diff --git a/docs/cli/commands/tanzu_api-token.md b/docs/cli/commands/tanzu_api-token.md index 79e18982a..ce09bd026 100644 --- a/docs/cli/commands/tanzu_api-token.md +++ b/docs/cli/commands/tanzu_api-token.md @@ -1,6 +1,6 @@ ## tanzu api-token -Manage API Tokens for Tanzu Platform +Manage API Tokens for Tanzu Platform Self-managed ### Options @@ -11,5 +11,5 @@ Manage API Tokens for Tanzu Platform ### SEE ALSO * [tanzu](tanzu.md) - The Tanzu CLI -* [tanzu api-token create](tanzu_api-token_create.md) - Create a new API Token for Tanzu Platform +* [tanzu api-token create](tanzu_api-token_create.md) - Create a new API Token for Tanzu Platform Self-managed diff --git a/docs/cli/commands/tanzu_api-token_create.md b/docs/cli/commands/tanzu_api-token_create.md index 257571781..5ea49f51c 100644 --- a/docs/cli/commands/tanzu_api-token_create.md +++ b/docs/cli/commands/tanzu_api-token_create.md @@ -1,6 +1,6 @@ ## tanzu api-token create -Create a new API Token for Tanzu Platform +Create a new API Token for Tanzu Platform Self-managed ``` tanzu api-token create [flags] @@ -10,7 +10,7 @@ tanzu api-token create [flags] ``` - # Create an API Token for the Tanzu Platform + # Create an API Token for the Tanzu Platform Self-managed tanzu api-token create # Note: The retrieved token can be used as the value of TANZU_API_TOKEN @@ -25,5 +25,5 @@ tanzu api-token create [flags] ### SEE ALSO -* [tanzu api-token](tanzu_api-token.md) - Manage API Tokens for Tanzu Platform +* [tanzu api-token](tanzu_api-token.md) - Manage API Tokens for Tanzu Platform Self-managed diff --git a/pkg/command/apitoken.go b/pkg/command/apitoken.go index ac06155e6..733bd1bb8 100644 --- a/pkg/command/apitoken.go +++ b/pkg/command/apitoken.go @@ -24,7 +24,7 @@ import ( func newAPITokenCmd() *cobra.Command { apiTokenCmd := &cobra.Command{ Use: "api-token", - Short: "Manage API Tokens for Tanzu Platform", + Short: "Manage API Tokens for Tanzu Platform Self-managed", Aliases: []string{"apitoken"}, Annotations: map[string]string{ "group": string(plugin.SystemCmdGroup), @@ -42,10 +42,10 @@ func newAPITokenCmd() *cobra.Command { func newAPITokenCreateCmd() *cobra.Command { createCmd := &cobra.Command{ Use: "create", - Short: "Create a new API Token for Tanzu Platform", + Short: "Create a new API Token for Tanzu Platform Self-managed", Aliases: []string{}, Example: ` - # Create an API Token for the Tanzu Platform + # Create an API Token for the Tanzu Platform Self-managed tanzu api-token create # Note: The retrieved token can be used as the value of TANZU_API_TOKEN @@ -60,10 +60,10 @@ func newAPITokenCreateCmd() *cobra.Command { func createAPIToken(cmd *cobra.Command, _ []string) (err error) { c, err := config.GetActiveContext(types.ContextTypeTanzu) if err != nil { - return errors.New("no active context of type `tanzu`. Please login to Tanzu Platform first to generate an API token") + return errors.New("no active context found for Tanzu Platform. Please login to Tanzu Platform first to generate an API token") } if c == nil || c.GlobalOpts == nil || c.GlobalOpts.Auth.Issuer == "" { - return errors.New("invalid active context of type `tanzu`. Please login to Tanzu Platform first to generate an API token") + return errors.New("invalid active context found for Tanzu Platform. Please login to Tanzu Platform first to generate an API token") } // Make sure it is of type tanzu with tanzuIdpType as `uaa` else return error if idpType, exist := c.AdditionalMetadata[config.TanzuIdpTypeKey]; !exist || idpType != string(config.UAAIdpType) { diff --git a/pkg/command/apitoken_test.go b/pkg/command/apitoken_test.go index 9ecdad4ec..33d160f45 100644 --- a/pkg/command/apitoken_test.go +++ b/pkg/command/apitoken_test.go @@ -125,7 +125,7 @@ Please copy and save your token securely. Note that you will need to regenerate context: nil, tanzuLoginErr: nil, wantErr: true, - errMsg: "no active context of type `tanzu`. Please login to Tanzu Platform first to generate an API token", + errMsg: "no active context found for Tanzu Platform. Please login to Tanzu Platform first to generate an API token", }, { name: "invalid active context", @@ -138,7 +138,7 @@ Please copy and save your token securely. Note that you will need to regenerate }, tanzuLoginErr: nil, wantErr: true, - errMsg: "invalid active context of type `tanzu`. Please login to Tanzu Platform first to generate an API token", + errMsg: "invalid active context found for Tanzu Platform. Please login to Tanzu Platform first to generate an API token", }, { name: "invalid IDP type",