Merge "Add pluralized aliases to config get commands"
This commit is contained in:
commit
0802ff1470
@ -36,7 +36,7 @@ credentials if no name is provided.
|
|||||||
airshipctl config get-credentials
|
airshipctl config get-credentials
|
||||||
|
|
||||||
# Display a specific user's credentials
|
# Display a specific user's credentials
|
||||||
airshipctl config get-credentials exampleUser
|
airshipctl config get-credential exampleUser
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -45,10 +45,11 @@ airshipctl config get-credentials exampleUser
|
|||||||
func NewGetAuthInfoCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {
|
func NewGetAuthInfoCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {
|
||||||
o := &config.AuthInfoOptions{}
|
o := &config.AuthInfoOptions{}
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "get-credentials [NAME]",
|
Use: "get-credential [NAME]",
|
||||||
Short: "Get user credentials from the airshipctl config",
|
Short: "Get user credentials from the airshipctl config",
|
||||||
Long: getAuthInfoLong[1:],
|
Long: getAuthInfoLong[1:],
|
||||||
Example: getAuthInfoExample,
|
Example: getAuthInfoExample,
|
||||||
|
Aliases: []string{"get-credentials"},
|
||||||
Args: cobra.MaximumNArgs(1),
|
Args: cobra.MaximumNArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
airconfig := rootSettings.Config
|
airconfig := rootSettings.Config
|
||||||
|
@ -36,7 +36,7 @@ Valid values for the --cluster-type flag are [ephemeral|target].
|
|||||||
|
|
||||||
getClusterExample = `
|
getClusterExample = `
|
||||||
# List all clusters
|
# List all clusters
|
||||||
airshipctl config get-cluster
|
airshipctl config get-clusters
|
||||||
|
|
||||||
# Display a specific cluster
|
# Display a specific cluster
|
||||||
airshipctl config get-cluster --cluster-type=ephemeral exampleCluster
|
airshipctl config get-cluster --cluster-type=ephemeral exampleCluster
|
||||||
@ -52,6 +52,7 @@ func NewGetClusterCommand(rootSettings *environment.AirshipCTLSettings) *cobra.C
|
|||||||
Short: "Get cluster information from the airshipctl config",
|
Short: "Get cluster information from the airshipctl config",
|
||||||
Long: getClusterLong[1:],
|
Long: getClusterLong[1:],
|
||||||
Example: getClusterExample,
|
Example: getClusterExample,
|
||||||
|
Aliases: []string{"get-clusters"},
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
airconfig := rootSettings.Config
|
airconfig := rootSettings.Config
|
||||||
if len(args) == 1 {
|
if len(args) == 1 {
|
||||||
|
@ -32,7 +32,7 @@ Display information about contexts such as associated manifests, users, and clus
|
|||||||
|
|
||||||
getContextExample = `
|
getContextExample = `
|
||||||
# List all contexts
|
# List all contexts
|
||||||
airshipctl config get-context
|
airshipctl config get-contexts
|
||||||
|
|
||||||
# Display the current context
|
# Display the current context
|
||||||
airshipctl config get-context --current
|
airshipctl config get-context --current
|
||||||
@ -51,6 +51,7 @@ func NewGetContextCommand(rootSettings *environment.AirshipCTLSettings) *cobra.C
|
|||||||
Short: "Get context information from the airshipctl config",
|
Short: "Get context information from the airshipctl config",
|
||||||
Long: getContextLong[1:],
|
Long: getContextLong[1:],
|
||||||
Example: getContextExample,
|
Example: getContextExample,
|
||||||
|
Aliases: []string{"get-contexts"},
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
airconfig := rootSettings.Config
|
airconfig := rootSettings.Config
|
||||||
if len(args) == 1 {
|
if len(args) == 1 {
|
||||||
|
@ -6,7 +6,7 @@ Usage:
|
|||||||
Available Commands:
|
Available Commands:
|
||||||
get-cluster Get cluster information from the airshipctl config
|
get-cluster Get cluster information from the airshipctl config
|
||||||
get-context Get context information from the airshipctl config
|
get-context Get context information from the airshipctl config
|
||||||
get-credentials Get user credentials from the airshipctl config
|
get-credential Get user credentials from the airshipctl config
|
||||||
help Help about any command
|
help Help about any command
|
||||||
import Merge information from a kubernetes config file
|
import Merge information from a kubernetes config file
|
||||||
init Generate initial configuration files for airshipctl
|
init Generate initial configuration files for airshipctl
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Error: Missing configuration: User credentials with name 'authinfoMissing'
|
Error: Missing configuration: User credentials with name 'authinfoMissing'
|
||||||
Usage:
|
Usage:
|
||||||
get-credentials [NAME] [flags]
|
get-credential [NAME] [flags]
|
||||||
|
|
||||||
|
Aliases:
|
||||||
|
get-credential, get-credentials
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -8,9 +11,9 @@ Examples:
|
|||||||
airshipctl config get-credentials
|
airshipctl config get-credentials
|
||||||
|
|
||||||
# Display a specific user's credentials
|
# Display a specific user's credentials
|
||||||
airshipctl config get-credentials exampleUser
|
airshipctl config get-credential exampleUser
|
||||||
|
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
-h, --help help for get-credentials
|
-h, --help help for get-credential
|
||||||
|
|
||||||
|
@ -2,10 +2,13 @@ Error: Missing configuration: Cluster with name 'clusterMissing' of type 'target
|
|||||||
Usage:
|
Usage:
|
||||||
get-cluster [NAME] [flags]
|
get-cluster [NAME] [flags]
|
||||||
|
|
||||||
|
Aliases:
|
||||||
|
get-cluster, get-clusters
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
# List all clusters
|
# List all clusters
|
||||||
airshipctl config get-cluster
|
airshipctl config get-clusters
|
||||||
|
|
||||||
# Display a specific cluster
|
# Display a specific cluster
|
||||||
airshipctl config get-cluster --cluster-type=ephemeral exampleCluster
|
airshipctl config get-cluster --cluster-type=ephemeral exampleCluster
|
||||||
|
@ -2,10 +2,13 @@ Error: Missing configuration: Context with name 'contextMissing'
|
|||||||
Usage:
|
Usage:
|
||||||
get-context [NAME] [flags]
|
get-context [NAME] [flags]
|
||||||
|
|
||||||
|
Aliases:
|
||||||
|
get-context, get-contexts
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
# List all contexts
|
# List all contexts
|
||||||
airshipctl config get-context
|
airshipctl config get-contexts
|
||||||
|
|
||||||
# Display the current context
|
# Display the current context
|
||||||
airshipctl config get-context --current
|
airshipctl config get-context --current
|
||||||
|
Loading…
Reference in New Issue
Block a user