Skip to content

Commit 7cc7888

Browse files
committed
feat: add ENAPTER3_CONNECTION
1 parent 916e3fa commit 7cc7888

45 files changed

Lines changed: 80 additions & 34 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

internal/app/enaptercli/cmd_base.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func (c *cmdBase) Flags() []cli.Flag {
4444
Name: "connection",
4545
Usage: "Name of the connection to use",
4646
Aliases: []string{"c"},
47+
EnvVars: []string{"ENAPTER3_CONNECTION"},
4748
Destination: &c.connName,
4849
},
4950
&cli.StringFlag{
@@ -148,6 +149,7 @@ ENVIRONMENT VARIABLES:
148149
ENAPTER3_API_TOKEN Enapter API access token
149150
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
150151
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
152+
ENAPTER3_CONNECTION Name of the connection to use
151153
152154
`
153155

internal/app/enaptercli/testdata/helps/enapter

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ ENVIRONMENT VARIABLES:
2222
ENAPTER3_API_TOKEN Enapter API access token
2323
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
2424
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
25+
ENAPTER3_CONNECTION Name of the connection to use
2526

internal/app/enaptercli/testdata/helps/enapter blueprint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ ENVIRONMENT VARIABLES:
1818
ENAPTER3_API_TOKEN Enapter API access token
1919
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
2020
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
21+
ENAPTER3_CONNECTION Name of the connection to use
2122

internal/app/enaptercli/testdata/helps/enapter blueprint download

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USAGE:
55
enaptercli.test blueprint download [command options]
66

77
OPTIONS:
8-
--connection value, -c value Name of the connection to use
8+
--connection value, -c value Name of the connection to use [$ENAPTER3_CONNECTION]
99
--api-allow-insecure Allow insecure connections to the Enapter API (default: false) [$ENAPTER3_API_ALLOW_INSECURE]
1010
--verbose Log extra details about the operation (default: false)
1111
--blueprint-id value, -b value Blueprint name or ID to download
@@ -16,4 +16,5 @@ ENVIRONMENT VARIABLES:
1616
ENAPTER3_API_TOKEN Enapter API access token
1717
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
1818
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
19+
ENAPTER3_CONNECTION Name of the connection to use
1920

internal/app/enaptercli/testdata/helps/enapter blueprint get

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USAGE:
55
enaptercli.test blueprint get [command options]
66

77
OPTIONS:
8-
--connection value, -c value Name of the connection to use
8+
--connection value, -c value Name of the connection to use [$ENAPTER3_CONNECTION]
99
--api-allow-insecure Allow insecure connections to the Enapter API (default: false) [$ENAPTER3_API_ALLOW_INSECURE]
1010
--verbose Log extra details about the operation (default: false)
1111
--blueprint-id value, -b value blueprint name or ID to retrieve
@@ -15,4 +15,5 @@ ENVIRONMENT VARIABLES:
1515
ENAPTER3_API_TOKEN Enapter API access token
1616
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
1717
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
18+
ENAPTER3_CONNECTION Name of the connection to use
1819

internal/app/enaptercli/testdata/helps/enapter blueprint profiles

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ ENVIRONMENT VARIABLES:
1616
ENAPTER3_API_TOKEN Enapter API access token
1717
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
1818
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
19+
ENAPTER3_CONNECTION Name of the connection to use
1920

internal/app/enaptercli/testdata/helps/enapter blueprint profiles download

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USAGE:
55
enaptercli.test blueprint profiles download [command options]
66

77
OPTIONS:
8-
--connection value, -c value Name of the connection to use
8+
--connection value, -c value Name of the connection to use [$ENAPTER3_CONNECTION]
99
--api-allow-insecure Allow insecure connections to the Enapter API (default: false) [$ENAPTER3_API_ALLOW_INSECURE]
1010
--verbose Log extra details about the operation (default: false)
1111
--output value, -o value File name to save the downloaded profiles
@@ -15,4 +15,5 @@ ENVIRONMENT VARIABLES:
1515
ENAPTER3_API_TOKEN Enapter API access token
1616
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
1717
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
18+
ENAPTER3_CONNECTION Name of the connection to use
1819

internal/app/enaptercli/testdata/helps/enapter blueprint profiles upload

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USAGE:
55
enaptercli.test blueprint profiles upload [command options]
66

77
OPTIONS:
8-
--connection value, -c value Name of the connection to use
8+
--connection value, -c value Name of the connection to use [$ENAPTER3_CONNECTION]
99
--api-allow-insecure Allow insecure connections to the Enapter API (default: false) [$ENAPTER3_API_ALLOW_INSECURE]
1010
--verbose Log extra details about the operation (default: false)
1111
--path value, -p value Profiles zip file path
@@ -15,4 +15,5 @@ ENVIRONMENT VARIABLES:
1515
ENAPTER3_API_TOKEN Enapter API access token
1616
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
1717
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
18+
ENAPTER3_CONNECTION Name of the connection to use
1819

internal/app/enaptercli/testdata/helps/enapter blueprint upload

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USAGE:
55
enaptercli.test blueprint upload [command options]
66

77
OPTIONS:
8-
--connection value, -c value Name of the connection to use
8+
--connection value, -c value Name of the connection to use [$ENAPTER3_CONNECTION]
99
--api-allow-insecure Allow insecure connections to the Enapter API (default: false) [$ENAPTER3_API_ALLOW_INSECURE]
1010
--verbose Log extra details about the operation (default: false)
1111
--path value, -p value Blueprint path (zip file or directory)
@@ -15,4 +15,5 @@ ENVIRONMENT VARIABLES:
1515
ENAPTER3_API_TOKEN Enapter API access token
1616
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
1717
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
18+
ENAPTER3_CONNECTION Name of the connection to use
1819

internal/app/enaptercli/testdata/helps/enapter device

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ ENVIRONMENT VARIABLES:
2626
ENAPTER3_API_TOKEN Enapter API access token
2727
ENAPTER3_API_URL Enapter API base URL (default: https://api.enapter.com)
2828
ENAPTER3_API_ALLOW_INSECURE Allow insecure connections to the Enapter API (default: false)
29+
ENAPTER3_CONNECTION Name of the connection to use
2930

0 commit comments

Comments
 (0)