linode-cli 5.65.0__tar.gz → 5.66.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {linode_cli-5.65.0/linode_cli.egg-info → linode_cli-5.66.0}/PKG-INFO +2 -2
- {linode_cli-5.65.0 → linode_cli-5.66.0}/README.md +1 -1
- {linode_cli-5.65.0 → linode_cli-5.66.0/linode_cli.egg-info}/PKG-INFO +2 -2
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/arg_helpers.py +1 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/baked/request.py +4 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/baked/response.py +4 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/cli.py +1 -1
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/completion.py +3 -4
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/configuration/auth.py +5 -9
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/configuration/helpers.py +2 -4
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/data-3 +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/__init__.py +1 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/config.py +14 -3
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/version.py +1 -1
- {linode_cli-5.65.0 → linode_cli-5.66.0}/LICENSE +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/MANIFEST.in +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linode_cli.egg-info/SOURCES.txt +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linode_cli.egg-info/dependency_links.txt +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linode_cli.egg-info/entry_points.txt +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linode_cli.egg-info/requires.txt +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linode_cli.egg-info/top_level.txt +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/__init__.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/__main__.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/api_request.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/baked/__init__.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/baked/operation.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/baked/parsing.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/baked/util.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/configuration/__init__.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/configuration/config.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/exit_codes.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/help_formatter.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/help_pages.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/helpers.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/oauth-landing-page.html +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/output/__init__.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/output/helpers.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/output/output_handler.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/overrides.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/__init__.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/firewall-editor.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/get-kubeconfig.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/image-upload.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/metadata.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/buckets.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/helpers.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/list.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/objects.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/obj/website.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/plugins.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/region-table.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/linodecli/plugins/ssh.py +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/pyproject.toml +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/setup.cfg +0 -0
- {linode_cli-5.65.0 → linode_cli-5.66.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linode-cli
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.66.0
|
|
4
4
|
Summary: The official command-line interface for interacting with the Linode API.
|
|
5
5
|
Author-email: "Akamai Technologies Inc." <developers@linode.com>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -54,7 +54,7 @@ Visit the [Wiki](../../wiki/Installation) for more information.
|
|
|
54
54
|
|
|
55
55
|
## Contributing
|
|
56
56
|
|
|
57
|
-
This CLI is generated from the [OpenAPI specification for Linode's API](https://github.com/linode/linode-api-
|
|
57
|
+
This CLI is generated from the [OpenAPI specification for Linode's API](https://github.com/linode/linode-api-openapi). As
|
|
58
58
|
such, many changes are made directly to the spec.
|
|
59
59
|
|
|
60
60
|
Please follow the [Contributing Guidelines](https://github.com/linode/linode-cli/blob/main/CONTRIBUTING.md) when making a contribution.
|
|
@@ -21,7 +21,7 @@ Visit the [Wiki](../../wiki/Installation) for more information.
|
|
|
21
21
|
|
|
22
22
|
## Contributing
|
|
23
23
|
|
|
24
|
-
This CLI is generated from the [OpenAPI specification for Linode's API](https://github.com/linode/linode-api-
|
|
24
|
+
This CLI is generated from the [OpenAPI specification for Linode's API](https://github.com/linode/linode-api-openapi). As
|
|
25
25
|
such, many changes are made directly to the spec.
|
|
26
26
|
|
|
27
27
|
Please follow the [Contributing Guidelines](https://github.com/linode/linode-cli/blob/main/CONTRIBUTING.md) when making a contribution.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linode-cli
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.66.0
|
|
4
4
|
Summary: The official command-line interface for interacting with the Linode API.
|
|
5
5
|
Author-email: "Akamai Technologies Inc." <developers@linode.com>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -54,7 +54,7 @@ Visit the [Wiki](../../wiki/Installation) for more information.
|
|
|
54
54
|
|
|
55
55
|
## Contributing
|
|
56
56
|
|
|
57
|
-
This CLI is generated from the [OpenAPI specification for Linode's API](https://github.com/linode/linode-api-
|
|
57
|
+
This CLI is generated from the [OpenAPI specification for Linode's API](https://github.com/linode/linode-api-openapi). As
|
|
58
58
|
such, many changes are made directly to the spec.
|
|
59
59
|
|
|
60
60
|
Please follow the [Contributing Guidelines](https://github.com/linode/linode-cli/blob/main/CONTRIBUTING.md) when making a contribution.
|
|
@@ -160,6 +160,10 @@ def _parse_request_model(
|
|
|
160
160
|
for k, v in properties.items():
|
|
161
161
|
k = escape_arg_segment(k)
|
|
162
162
|
|
|
163
|
+
# Skip attributes with x-linode-cli-skip extension
|
|
164
|
+
if v.extensions.get("linode-cli-skip"):
|
|
165
|
+
continue
|
|
166
|
+
|
|
163
167
|
# Handle nested objects which aren't read-only and have properties
|
|
164
168
|
if (
|
|
165
169
|
v.type == "object"
|
|
@@ -193,6 +193,10 @@ def _parse_response_model(schema, prefix=None, nested_list_depth=0):
|
|
|
193
193
|
for k, v in properties.items():
|
|
194
194
|
pref = prefix + "." + k if prefix else k
|
|
195
195
|
|
|
196
|
+
# Skip attributes with x-linode-cli-skip extension
|
|
197
|
+
if v.extensions.get("linode-cli-skip"):
|
|
198
|
+
continue
|
|
199
|
+
|
|
196
200
|
if (
|
|
197
201
|
v.type == "object"
|
|
198
202
|
and v.properties is None
|
|
@@ -286,7 +286,7 @@ class CLI: # pylint: disable=too-many-instance-attributes
|
|
|
286
286
|
"""
|
|
287
287
|
return (
|
|
288
288
|
f"linode-cli/{self.version} "
|
|
289
|
-
f"linode-api-
|
|
289
|
+
f"linode-api-openapi/{self.spec_version} "
|
|
290
290
|
f"python/{version_info[0]}.{version_info[1]}.{version_info[2]}"
|
|
291
291
|
)
|
|
292
292
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
Contains any code relevant to generating/updating shell completions for linode-cli
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
from string import Template
|
|
6
7
|
|
|
7
8
|
from openapi3 import OpenAPI
|
|
@@ -93,12 +94,10 @@ complete -F _linode_cli linode
|
|
|
93
94
|
complete -F _linode_cli lin"""
|
|
94
95
|
)
|
|
95
96
|
|
|
96
|
-
command_template = Template(
|
|
97
|
-
"""$command)
|
|
97
|
+
command_template = Template("""$command)
|
|
98
98
|
COMPREPLY=( $(compgen -W "$actions --help" -- ${cur}) )
|
|
99
99
|
return 0
|
|
100
|
-
;;"""
|
|
101
|
-
)
|
|
100
|
+
;;""")
|
|
102
101
|
|
|
103
102
|
command_blocks = [
|
|
104
103
|
command_template.safe_substitute(
|
|
@@ -214,13 +214,11 @@ def _get_token_terminal(base_url: str) -> Tuple[str, str]:
|
|
|
214
214
|
:returns: A tuple containing the user's username and token.
|
|
215
215
|
:rtype: Tuple[str, str]
|
|
216
216
|
"""
|
|
217
|
-
print(
|
|
218
|
-
f"""
|
|
217
|
+
print(f"""
|
|
219
218
|
First, we need a Personal Access Token. To get one, please visit
|
|
220
219
|
{TOKEN_GENERATION_URL} and click
|
|
221
220
|
"Create a Personal Access Token". The CLI needs access to everything
|
|
222
|
-
on your account to work correctly."""
|
|
223
|
-
)
|
|
221
|
+
on your account to work correctly.""")
|
|
224
222
|
|
|
225
223
|
while True:
|
|
226
224
|
token = input("Personal Access Token: ")
|
|
@@ -329,15 +327,13 @@ def _handle_oauth_callback() -> str:
|
|
|
329
327
|
# figure out the URL to direct the user to and print out the prompt
|
|
330
328
|
# pylint: disable-next=line-too-long
|
|
331
329
|
url = f"https://login.linode.com/oauth/authorize?client_id={OAUTH_CLIENT_ID}&response_type=token&scopes=*&redirect_uri=http://localhost:{serv.server_address[1]}"
|
|
332
|
-
print(
|
|
333
|
-
f"""A browser should open directing you to this URL to authenticate:
|
|
330
|
+
print(f"""A browser should open directing you to this URL to authenticate:
|
|
334
331
|
|
|
335
332
|
{url}
|
|
336
333
|
|
|
337
334
|
If you are not automatically directed there, please copy/paste the link into your browser
|
|
338
335
|
to continue..
|
|
339
|
-
"""
|
|
340
|
-
)
|
|
336
|
+
""")
|
|
341
337
|
|
|
342
338
|
webbrowser.open(url)
|
|
343
339
|
|
|
@@ -348,7 +344,7 @@ to continue..
|
|
|
348
344
|
except KeyboardInterrupt:
|
|
349
345
|
print(
|
|
350
346
|
"\nGiving up. If you couldn't get web authentication to work, please "
|
|
351
|
-
"try
|
|
347
|
+
"try using a token by invoking with `linode-cli configure --token`, "
|
|
352
348
|
"and open an issue at https://github.com/linode/linode-cli",
|
|
353
349
|
file=sys.stderr,
|
|
354
350
|
)
|
|
@@ -97,11 +97,9 @@ def _check_browsers() -> bool:
|
|
|
97
97
|
|
|
98
98
|
# pylint: disable-next=protected-access
|
|
99
99
|
if not KNOWN_GOOD_BROWSERS.intersection(webbrowser._tryorder):
|
|
100
|
-
print(
|
|
101
|
-
"""
|
|
100
|
+
print("""
|
|
102
101
|
This tool defaults to web-based authentication,
|
|
103
|
-
however no known-working browsers were found."""
|
|
104
|
-
)
|
|
102
|
+
however no known-working browsers were found.""")
|
|
105
103
|
while True:
|
|
106
104
|
r = input("Try it anyway? [y/N]: ")
|
|
107
105
|
if r.lower() in "yn ":
|
|
Binary file
|
|
@@ -2,13 +2,24 @@
|
|
|
2
2
|
The config of the object storage plugin.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import os
|
|
6
|
+
import re
|
|
5
7
|
import shutil
|
|
6
8
|
|
|
7
9
|
ENV_ACCESS_KEY_NAME = "LINODE_CLI_OBJ_ACCESS_KEY"
|
|
8
10
|
ENV_SECRET_KEY_NAME = "LINODE_CLI_OBJ_SECRET_KEY"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
API_HOST = os.getenv("LINODE_CLI_API_HOST", "")
|
|
13
|
+
|
|
14
|
+
OBJ_DOMAIN = "linodeobjects.com"
|
|
15
|
+
|
|
16
|
+
if API_HOST:
|
|
17
|
+
match = re.match(r"api\.([^.]+)\.linode\.com", API_HOST)
|
|
18
|
+
if match:
|
|
19
|
+
OBJ_DOMAIN = f"{match.group(1)}.linodeobjects.com"
|
|
20
|
+
|
|
21
|
+
BASE_URL_TEMPLATE = f"https://{{}}.{OBJ_DOMAIN}"
|
|
22
|
+
BASE_WEBSITE_TEMPLATE = f"{{bucket}}.website-{{cluster}}.{OBJ_DOMAIN}"
|
|
12
23
|
|
|
13
24
|
# for all date output
|
|
14
25
|
DATE_FORMAT = "%Y-%m-%d %H:%M"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|