Skip to content

Commit 07d64b6

Browse files
committed
hide api-server flag
1 parent 11eef7f commit 07d64b6

34 files changed

Lines changed: 75 additions & 68 deletions

cmd/global_flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func loadGlobalFlags() {
8484
func addGlobalFlags() {
8585
rootCmd.PersistentFlags().StringVar(&flagApiServerValue, flagApiServer, "", "API Server Hostname")
8686
_ = viper.BindPFlag(flagApiServerKey, rootCmd.PersistentFlags().Lookup(flagApiServer))
87+
rootCmd.PersistentFlags().Lookup(flagApiServer).Hidden = true
8788

8889
rootCmd.PersistentFlags().StringVar(&flagApiClientidValue, flagApiClientid, "", "API Client ID")
8990
_ = viper.BindPFlag(flagApiClientidKey, rootCmd.PersistentFlags().Lookup(flagApiClientid))

cmd/root_command.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ You can set credentials and arguments using one of the following options:
2626
2727
* A yaml configuration file at HOME/.cloudcli.yaml (or specified using the CLOUDCLI_CONFIG env var or --config flag)
2828
* Environment variables - uppercase strings, split with underscore and prefixed with CLOUDCLI_
29-
* CLI flags: --api-server "" --api-clientid "" --api-secret ""
29+
* CLI flags: --api-clientid "" --api-secret ""
3030
3131
See [example.cloudcli.yaml](https://github.com/cloudwm/cloudcli/blob/master/example-cloudcli.yaml) and [example-cloudcli.env](https://github.com/cloudwm/cloudcli/blob/master/example-cloudcli.env) for more details on using the yaml config file or environment variables.
3232
33-
**Important** Please keep your server and API credentials secure,
33+
**Important** Please keep your API credentials secure,
3434
it's recommended to use a configuration file with appropriate permissions and location.
3535
`
3636
}

docs/cloudcli.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ You can set credentials and arguments using one of the following options:
1212

1313
* A yaml configuration file at HOME/.cloudcli.yaml (or specified using the CLOUDCLI_CONFIG env var or --config flag)
1414
* Environment variables - uppercase strings, split with underscore and prefixed with CLOUDCLI_
15-
* CLI flags: --api-server "" --api-clientid "" --api-secret ""
15+
* CLI flags: --api-clientid "" --api-secret ""
1616

1717
See [example.cloudcli.yaml](https://github.com/cloudwm/cloudcli/blob/master/example-cloudcli.yaml) and [example-cloudcli.env](https://github.com/cloudwm/cloudcli/blob/master/example-cloudcli.env) for more details on using the yaml config file or environment variables.
1818

19-
**Important** Please keep your server and API credentials secure,
19+
**Important** Please keep your API credentials secure,
2020
it's recommended to use a configuration file with appropriate permissions and location.
2121

2222

@@ -25,7 +25,6 @@ it's recommended to use a configuration file with appropriate permissions and lo
2525
```
2626
--api-clientid string API Client ID
2727
--api-secret string API Secret
28-
--api-server string API Server Hostname
2928
--config string config file (default is $HOME/.cloudcli.yaml)
3029
--debug enable debug output to stderr
3130
--dryrun enable dry run mode, does not perform actions
@@ -41,4 +40,4 @@ it's recommended to use a configuration file with appropriate permissions and lo
4140
* [cloudcli server](cloudcli_server.md) - Server management
4241
* [cloudcli version](cloudcli_version.md) - Get the cloudcli version
4342

44-
###### Auto generated by spf13/cobra on 1-Nov-2020
43+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_init.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ cloudcli init [flags]
2323
```
2424
--api-clientid string API Client ID
2525
--api-secret string API Secret
26-
--api-server string API Server Hostname
2726
--config string config file (default is $HOME/.cloudcli.yaml)
2827
--debug enable debug output to stderr
2928
--dryrun enable dry run mode, does not perform actions
@@ -35,4 +34,4 @@ cloudcli init [flags]
3534

3635
* [cloudcli](cloudcli.md) - Cloudcli server management
3736

38-
###### Auto generated by spf13/cobra on 1-Nov-2020
37+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_queue.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Task queue management
1717
```
1818
--api-clientid string API Client ID
1919
--api-secret string API Secret
20-
--api-server string API Server Hostname
2120
--config string config file (default is $HOME/.cloudcli.yaml)
2221
--debug enable debug output to stderr
2322
--dryrun enable dry run mode, does not perform actions
@@ -31,4 +30,4 @@ Task queue management
3130
* [cloudcli queue detail](cloudcli_queue_detail.md) - Get details of tasks
3231
* [cloudcli queue list](cloudcli_queue_list.md) - List all tasks in queue
3332

34-
###### Auto generated by spf13/cobra on 1-Nov-2020
33+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_queue_detail.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ cloudcli queue detail [flags]
2525
```
2626
--api-clientid string API Client ID
2727
--api-secret string API Secret
28-
--api-server string API Server Hostname
2928
--config string config file (default is $HOME/.cloudcli.yaml)
3029
--debug enable debug output to stderr
3130
--dryrun enable dry run mode, does not perform actions
@@ -37,4 +36,4 @@ cloudcli queue detail [flags]
3736

3837
* [cloudcli queue](cloudcli_queue.md) - Task queue management
3938

40-
###### Auto generated by spf13/cobra on 1-Nov-2020
39+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_queue_list.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ cloudcli queue list [flags]
2121
```
2222
--api-clientid string API Client ID
2323
--api-secret string API Secret
24-
--api-server string API Server Hostname
2524
--config string config file (default is $HOME/.cloudcli.yaml)
2625
--debug enable debug output to stderr
2726
--dryrun enable dry run mode, does not perform actions
@@ -33,4 +32,4 @@ cloudcli queue list [flags]
3332

3433
* [cloudcli queue](cloudcli_queue.md) - Task queue management
3534

36-
###### Auto generated by spf13/cobra on 1-Nov-2020
35+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Server management
1717
```
1818
--api-clientid string API Client ID
1919
--api-secret string API Secret
20-
--api-server string API Server Hostname
2120
--config string config file (default is $HOME/.cloudcli.yaml)
2221
--debug enable debug output to stderr
2322
--dryrun enable dry run mode, does not perform actions
@@ -34,6 +33,7 @@ Server management
3433
* [cloudcli server create](cloudcli_server_create.md) - Create a server
3534
* [cloudcli server description](cloudcli_server_description.md) - Get or set server description
3635
* [cloudcli server disk](cloudcli_server_disk.md) - List/manage server disks
36+
* [cloudcli server hdlib](cloudcli_server_hdlib.md) - List cloneable hard-disks / Clone to hard-disk library
3737
* [cloudcli server history](cloudcli_server_history.md) - List server actions history
3838
* [cloudcli server info](cloudcli_server_info.md) - Get server overview/information
3939
* [cloudcli server list](cloudcli_server_list.md) - List servers
@@ -51,4 +51,4 @@ Server management
5151
* [cloudcli server tags](cloudcli_server_tags.md) - List/manage server tags
5252
* [cloudcli server terminate](cloudcli_server_terminate.md) - Terminate server/s
5353

54-
###### Auto generated by spf13/cobra on 1-Nov-2020
54+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_server_attach.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ cloudcli server attach [flags]
2525
```
2626
--api-clientid string API Client ID
2727
--api-secret string API Secret
28-
--api-server string API Server Hostname
2928
--config string config file (default is $HOME/.cloudcli.yaml)
3029
--debug enable debug output to stderr
3130
--dryrun enable dry run mode, does not perform actions
@@ -37,4 +36,4 @@ cloudcli server attach [flags]
3736

3837
* [cloudcli server](cloudcli_server.md) - Server management
3938

40-
###### Auto generated by spf13/cobra on 1-Nov-2020
39+
###### Auto generated by spf13/cobra on 15-Aug-2021

docs/cloudcli_server_clone.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ cloudcli server clone [flags]
4949
```
5050
--api-clientid string API Client ID
5151
--api-secret string API Secret
52-
--api-server string API Server Hostname
5352
--config string config file (default is $HOME/.cloudcli.yaml)
5453
--debug enable debug output to stderr
5554
--dryrun enable dry run mode, does not perform actions
@@ -61,4 +60,4 @@ cloudcli server clone [flags]
6160

6261
* [cloudcli server](cloudcli_server.md) - Server management
6362

64-
###### Auto generated by spf13/cobra on 1-Nov-2020
63+
###### Auto generated by spf13/cobra on 15-Aug-2021

0 commit comments

Comments
 (0)