remotivelabs-cli 0.3.1__py3-none-any.whl → 0.3.3__py3-none-any.whl
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.
Potentially problematic release.
This version of remotivelabs-cli might be problematic. Click here for more details.
- cli/cloud/auth/login.py +3 -26
- cli/cloud/auth_tokens.py +4 -1
- cli/utils/console.py +3 -3
- {remotivelabs_cli-0.3.1.dist-info → remotivelabs_cli-0.3.3.dist-info}/METADATA +1 -1
- {remotivelabs_cli-0.3.1.dist-info → remotivelabs_cli-0.3.3.dist-info}/RECORD +8 -8
- {remotivelabs_cli-0.3.1.dist-info → remotivelabs_cli-0.3.3.dist-info}/LICENSE +0 -0
- {remotivelabs_cli-0.3.1.dist-info → remotivelabs_cli-0.3.3.dist-info}/WHEEL +0 -0
- {remotivelabs_cli-0.3.1.dist-info → remotivelabs_cli-0.3.3.dist-info}/entry_points.txt +0 -0
cli/cloud/auth/login.py
CHANGED
|
@@ -184,32 +184,9 @@ def login(headless: bool = False) -> bool: # noqa: C901, PLR0915
|
|
|
184
184
|
Initiate login
|
|
185
185
|
"""
|
|
186
186
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
active_token_file = settings.get_active_token_file()
|
|
192
|
-
if active_token_file:
|
|
193
|
-
# check if the active token is valid, if not, prompt user to select a new token
|
|
194
|
-
if not Rest.has_access("/api/whoami") or active_token_file.is_expired():
|
|
195
|
-
settings.clear_active_account()
|
|
196
|
-
newly_activated_token_file = _do_prompt_to_use_existing_credentials()
|
|
197
|
-
if newly_activated_token_file:
|
|
198
|
-
return True
|
|
199
|
-
|
|
200
|
-
# intentional fall through to login since we have no token
|
|
201
|
-
|
|
202
|
-
else:
|
|
203
|
-
# no active token, prompt user to select a new token
|
|
204
|
-
newly_activated_token_file = _do_prompt_to_use_existing_credentials()
|
|
205
|
-
if newly_activated_token_file:
|
|
206
|
-
return True
|
|
207
|
-
|
|
208
|
-
# intentional fall through to login since we have no token
|
|
209
|
-
|
|
210
|
-
#
|
|
211
|
-
# 2. Login in if no valid token found...
|
|
212
|
-
#
|
|
187
|
+
newly_activated_token_file = _do_prompt_to_use_existing_credentials()
|
|
188
|
+
if newly_activated_token_file:
|
|
189
|
+
return True
|
|
213
190
|
|
|
214
191
|
prepare_local_webserver()
|
|
215
192
|
|
cli/cloud/auth_tokens.py
CHANGED
|
@@ -19,7 +19,7 @@ def _prompt_choice( # noqa: C901
|
|
|
19
19
|
) -> Optional[TokenFile]:
|
|
20
20
|
accounts = settings.list_accounts()
|
|
21
21
|
|
|
22
|
-
table = Table("#", "Active", "Type", "Token", "Account", "Created", "Expires")
|
|
22
|
+
table = Table("#", "Active", "Type", "Token ID", "Account", "Created", "Expires")
|
|
23
23
|
|
|
24
24
|
included_tokens: list[TokenFile] = []
|
|
25
25
|
excluded_tokens: list[TokenFile] = []
|
|
@@ -56,6 +56,9 @@ def _prompt_choice( # noqa: C901
|
|
|
56
56
|
str(choice.expires),
|
|
57
57
|
)
|
|
58
58
|
print_unformatted(table)
|
|
59
|
+
print_unformatted(
|
|
60
|
+
":point_right: To get the access token for your activated account, use [bold]remotive cloud auth print-access-token[/bold]"
|
|
61
|
+
)
|
|
59
62
|
|
|
60
63
|
if skip_prompt:
|
|
61
64
|
return None
|
cli/utils/console.py
CHANGED
|
@@ -7,8 +7,8 @@ from typing import Any
|
|
|
7
7
|
import grpc
|
|
8
8
|
from rich.console import Console
|
|
9
9
|
|
|
10
|
-
console = Console()
|
|
11
|
-
err_console = Console(stderr=True)
|
|
10
|
+
console = Console(soft_wrap=True)
|
|
11
|
+
err_console = Console(stderr=True, soft_wrap=True)
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def print_grpc_error(error: grpc.RpcError) -> None:
|
|
@@ -48,7 +48,7 @@ def print_newline() -> None:
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
def print_url(url: str) -> None:
|
|
51
|
-
console.print(url, style="bold"
|
|
51
|
+
console.print(url, style="bold")
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
def print_unformatted(message: Any) -> None:
|
|
@@ -19,8 +19,8 @@ cli/broker/signals.py,sha256=1xldsY3SVcVp-EEsrd6_uoBjrTRMSEONHpOA6SmWxJ4,8245
|
|
|
19
19
|
cli/cloud/__init__.py,sha256=xFaDg2zho_glvDBDB0_8HRNICVwHeYFEz-yMhzTcCjI,987
|
|
20
20
|
cli/cloud/auth/__init__.py,sha256=MtQ01-n8CgZb9Y_SvxwZUgj44Yo0dFAU3_XwhQiUYtw,54
|
|
21
21
|
cli/cloud/auth/cmd.py,sha256=lv9D0Q7G1RgI2IO1vkz_VVBA_STCPmdJax3QkeiMwg4,3968
|
|
22
|
-
cli/cloud/auth/login.py,sha256=
|
|
23
|
-
cli/cloud/auth_tokens.py,sha256=
|
|
22
|
+
cli/cloud/auth/login.py,sha256=s_VdOunFLFWVl68sGTJgaJNksQquYGTfm5pJ6mBbEx0,10321
|
|
23
|
+
cli/cloud/auth_tokens.py,sha256=Tj6-fMkOGjT_XHU8m8nMQcIj55MaLwqfedv15yKsYp0,5225
|
|
24
24
|
cli/cloud/brokers.py,sha256=cXYKm_-CYJZH0muXAPwUMKIiqBiW6Y9WG5kmkQb3FuU,3849
|
|
25
25
|
cli/cloud/configs.py,sha256=atInBsh16woPmjC0dpnRTpbY4WRgseBOWe8VwpqwO_o,3745
|
|
26
26
|
cli/cloud/licenses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -63,12 +63,12 @@ cli/topology/start_trial.py,sha256=GNB2E-Ia18UpXQZ4fViGq5-pRq69vinDBLwzImsz2GY,3
|
|
|
63
63
|
cli/typer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
cli/typer/typer_utils.py,sha256=eUrVOEOKY_MnfiJMAxvEurP1Q79z9pq83mJjocP8lhI,686
|
|
65
65
|
cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
-
cli/utils/console.py,sha256
|
|
66
|
+
cli/utils/console.py,sha256=JF39S9oS1lehFexjdLQKp17oINNvFZJLg_M2SDCjkvA,1754
|
|
67
67
|
cli/utils/rest_helper.py,sha256=ZHc7TMNVa07kJWDQ_OEoeaGhzYu8BinSXJJX8R_wX_8,14135
|
|
68
68
|
cli/utils/time.py,sha256=TEKcNZ-pQoJ7cZ6hQmVD0sTRwRm2rBy51-MuDNdO4S4,296
|
|
69
69
|
cli/utils/versions.py,sha256=mHs_BCk0-wwPfCHIIQBlpFkgipSWkw9jUaZ-USH8ODY,3824
|
|
70
|
-
remotivelabs_cli-0.3.
|
|
71
|
-
remotivelabs_cli-0.3.
|
|
72
|
-
remotivelabs_cli-0.3.
|
|
73
|
-
remotivelabs_cli-0.3.
|
|
74
|
-
remotivelabs_cli-0.3.
|
|
70
|
+
remotivelabs_cli-0.3.3.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
|
|
71
|
+
remotivelabs_cli-0.3.3.dist-info/METADATA,sha256=0FN9scMQxaaw_VeK_-S0WwLtDhCRqaprK9IG67O9GMM,1521
|
|
72
|
+
remotivelabs_cli-0.3.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
73
|
+
remotivelabs_cli-0.3.3.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
|
|
74
|
+
remotivelabs_cli-0.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|