remotivelabs-cli 0.2.2__py3-none-any.whl → 0.3.0__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.

@@ -29,10 +29,20 @@ def _parse_token_type(token: str) -> TokenType:
29
29
 
30
30
 
31
31
  class TokenFileAccount(BaseModel):
32
+ """
33
+ TokenFileAccount represents the account information for a token file.
34
+ """
35
+
32
36
  email: EmailStr = DEFAULT_EMAIL
33
37
 
34
38
 
35
39
  class TokenFile(BaseModel):
40
+ """
41
+ TokenFile represents a token file for the CLI.
42
+
43
+ TODO: Should all setters return a new instance of the TokenFile?
44
+ """
45
+
36
46
  version: str = "1.0"
37
47
  type: TokenType
38
48
  name: str
@@ -43,14 +53,14 @@ class TokenFile(BaseModel):
43
53
 
44
54
  @field_validator("created", "expires", mode="before")
45
55
  @classmethod
46
- def validate_parse_date(cls, value: str | date) -> date:
56
+ def _validate_parse_date(cls, value: str | date) -> date:
47
57
  if isinstance(value, date):
48
58
  return value
49
59
  return parse_date(value)
50
60
 
51
61
  @model_validator(mode="before")
52
62
  @classmethod
53
- def init_with_defaults(cls, json_data: Any) -> Any:
63
+ def _validate_json_data(cls, json_data: Any) -> Any:
54
64
  """
55
65
  Try to migrate old formats and missing fields as best we can.
56
66
 
@@ -76,7 +86,7 @@ class TokenFile(BaseModel):
76
86
 
77
87
  def get_token_file_name(self) -> str:
78
88
  """
79
- Returns the name of the token file using the proper file name format.
89
+ Returns the name of the token_file following a predictable naming format.
80
90
  """
81
91
  email = _email_to_safe_filename(self.account.email) if self.account is not None else "unknown"
82
92
  if self.type == "authorized_user":
@@ -84,41 +94,23 @@ class TokenFile(BaseModel):
84
94
  return f"{SERVICE_ACCOUNT_TOKEN_FILE_PREFIX}{self.name}-{email}.json"
85
95
 
86
96
  def is_expired(self) -> bool:
87
- """
88
- Returns True if the token is expired, False otherwise.
89
- """
90
97
  return datetime.today().date() > self.expires
91
98
 
92
99
  def expires_in_days(self) -> int:
93
- """
94
- Returns the number of days until the token expires.
95
- """
96
100
  return (self.expires - datetime.today().date()).days
97
101
 
98
102
  @classmethod
99
103
  def from_json_str(cls, data: str) -> TokenFile:
100
- """
101
- Creates a TokenFile from a JSON string.
102
- """
103
104
  return cls.model_validate_json(data)
104
105
 
105
106
  @classmethod
106
107
  def from_dict(cls, data: dict[str, Any]) -> TokenFile:
107
- """
108
- Creates a TokenFile from a dictionary.
109
- """
110
108
  return cls.model_validate(data)
111
109
 
112
110
  def to_json_str(self) -> str:
113
- """
114
- Returns the JSON string representation of the TokenFile.
115
- """
116
111
  return self.model_dump_json()
117
112
 
118
113
  def to_dict(self) -> dict[str, Any]:
119
- """
120
- Returns the dictionary representation of the TokenFile.
121
- """
122
114
  return self.model_dump()
123
115
 
124
116
 
cli/topology/cmd.py CHANGED
@@ -8,7 +8,7 @@ import typer
8
8
  from rich.console import Console
9
9
 
10
10
  from cli.errors import ErrorPrinter
11
- from cli.settings import TokenNotFoundError, settings
11
+ from cli.settings import settings
12
12
  from cli.typer import typer_utils
13
13
  from cli.utils.rest_helper import RestHelper
14
14
 
@@ -64,9 +64,8 @@ def start_trial(
64
64
 
65
65
  """
66
66
  RestHelper.use_progress("Checking access tokens...", transient=True)
67
- try:
68
- _ = settings.get_active_token_file()
69
- except TokenNotFoundError:
67
+ active_token = settings.get_active_token_file()
68
+ if not active_token:
70
69
  if len(settings.list_personal_token_files()) == 0:
71
70
  console.print(
72
71
  "You must first sign in to RemotiveCloud, please use [bold]remotive cloud auth login[/bold] to sign-in"
@@ -74,7 +73,7 @@ def start_trial(
74
73
  )
75
74
  else:
76
75
  console.print(
77
- "You have not active account, please run [bold]remotive cloud auth activate[/bold] to choose an account"
76
+ "You have not actived your account, please run [bold]remotive cloud auth activate[/bold] to choose an account"
78
77
  "or [bold]remotive cloud auth login[/bold] to sign-in"
79
78
  )
80
79
  return
@@ -84,7 +83,8 @@ def start_trial(
84
83
  ErrorPrinter.print_generic_message("Your current active credentials are not valid")
85
84
  raise typer.Exit(1)
86
85
 
87
- if organization is None and settings.get_cli_config().get_active_default_organisation() is None:
86
+ active_account = settings.get_active_account()
87
+ if active_account and not organization and not active_account.default_organization:
88
88
  ErrorPrinter.print_hint("You have not specified any organization and no default organization is set")
89
89
  raise typer.Exit(1)
90
90
 
cli/utils/rest_helper.py CHANGED
@@ -16,7 +16,8 @@ from rich.console import Console
16
16
  from rich.progress import Progress, SpinnerColumn, TextColumn, wrap_file
17
17
 
18
18
  from cli.errors import ErrorPrinter
19
- from cli.settings import TokenNotFoundError, settings
19
+ from cli.settings import settings
20
+ from cli.utils import versions
20
21
 
21
22
  err_console = Console(stderr=True)
22
23
 
@@ -45,14 +46,7 @@ class RestHelper:
45
46
  if "cloud-dev" in __base_url:
46
47
  __license_server_base_url = "https://license.cloud-dev.remotivelabs.com"
47
48
 
48
- # if 'REMOTIVE_CLOUD_AUTH_TOKEN' not in os.environ:
49
- # print('export REMOTIVE_CLOUD_AUTH_TOKEN=auth must be set')
50
- # exit(0)
51
-
52
- # token = os.environ["REMOTIVE_CLOUD_AUTH_TOKEN"]
53
- # headers = {"Authorization": "Bearer " + token}
54
-
55
- __headers: Dict[str, str] = {"User-Agent": f"remotivelabs-cli/{version('remotivelabs-cli')}"}
49
+ __headers: Dict[str, str] = {"User-Agent": f"remotivelabs-cli/{versions.cli_version()} ({versions.platform_info()})"}
56
50
  __org: str = ""
57
51
 
58
52
  __token: str = ""
@@ -90,26 +84,24 @@ class RestHelper:
90
84
 
91
85
  @staticmethod
92
86
  def ensure_auth_token(quiet: bool = False, access_token: Optional[str] = None) -> None:
87
+ # TODO: remove this? We already set the default organization as env in remotive.py
93
88
  if "REMOTIVE_CLOUD_ORGANIZATION" not in os.environ:
94
- org = settings.get_cli_config().get_active_default_organisation()
95
- if org is not None:
96
- os.environ["REMOTIVE_CLOUD_ORGANIZATION"] = org
97
-
98
- token = None
99
-
100
- if access_token is None:
101
- if "REMOTIVE_CLOUD_ACCESS_TOKEN" in os.environ:
102
- token = os.environ["REMOTIVE_CLOUD_ACCESS_TOKEN"]
103
- else:
104
- try:
105
- token = settings.get_active_token()
106
- except TokenNotFoundError:
107
- if quiet:
108
- return
109
- ErrorPrinter.print_hint("you are not logged in, please login using [green]remotive cloud auth login[/green]")
110
- sys.exit(1)
111
-
112
- RestHelper.__headers["Authorization"] = f"Bearer {token.strip() if token is not None else access_token}"
89
+ active_account = settings.get_active_account()
90
+ if active_account:
91
+ org = active_account.default_organization
92
+ if org:
93
+ os.environ["REMOTIVE_CLOUD_ORGANIZATION"] = org
94
+
95
+ token = access_token
96
+ if not token:
97
+ token = os.environ.get("REMOTIVE_CLOUD_ACCESS_TOKEN", settings.get_active_token())
98
+ if not token:
99
+ if quiet:
100
+ return
101
+ ErrorPrinter.print_hint("you are not logged in, please login using [green]remotive cloud auth login[/green]")
102
+ sys.exit(1)
103
+
104
+ RestHelper.__headers["Authorization"] = f"Bearer {token.strip()}"
113
105
 
114
106
  @staticmethod
115
107
  def handle_get( # noqa: PLR0913
@@ -3,9 +3,10 @@ from __future__ import annotations
3
3
  import datetime
4
4
  import json
5
5
  import os
6
+ import platform
6
7
  import urllib.request
7
- from datetime import timedelta
8
8
  from importlib import metadata as importlib_metadata
9
+ from importlib.metadata import version as python_project_version
9
10
 
10
11
  from packaging.version import InvalidVersion, Version
11
12
 
@@ -13,6 +14,26 @@ from cli.errors import ErrorPrinter
13
14
  from cli.settings import Settings
14
15
 
15
16
 
17
+ def cli_version() -> str:
18
+ return python_project_version("remotivelabs-cli")
19
+
20
+
21
+ def python_version() -> str:
22
+ return platform.python_version()
23
+
24
+
25
+ def host_os() -> str:
26
+ return platform.system().lower() # 'linux', 'darwin', 'windows'
27
+
28
+
29
+ def host_env() -> str:
30
+ return "docker" if os.environ.get("RUNS_IN_DOCKER") else "native"
31
+
32
+
33
+ def platform_info() -> str:
34
+ return f"python {python_version()}; {host_os()}; {host_env()}"
35
+
36
+
16
37
  def _pypi_latest(
17
38
  project: str, *, include_prereleases: bool, timeout: float = 2.5, user_agent: str | None = None
18
39
  ) -> tuple[str | None, str | None]:
@@ -59,32 +80,22 @@ def _installed_version(distribution_name: str, fallback: str | None = None) -> s
59
80
  return fallback
60
81
 
61
82
 
62
- def check_for_update(project: str, current_version: str, settings: Settings) -> None:
83
+ def check_for_update(settings: Settings) -> None:
63
84
  # Make it possible to disable update check, i.e in CI
64
85
  if os.environ.get("PYTHON_DISABLE_UPDATE_CHECK"):
65
86
  return
66
87
 
88
+ # Check if we are allowed to perform an update check
89
+ if not settings.should_perform_update_check():
90
+ return
91
+
67
92
  # Determine current version
68
- cur = current_version or _installed_version(project)
93
+ project = "remotivelabs-cli"
94
+ cur = cli_version() or _installed_version(project)
69
95
  if not cur:
70
96
  return # unknown version → skip silently
71
97
 
72
- state = settings.read_state_file()
73
-
74
- if not state.last_update_check_time:
75
- if os.environ.get("RUNS_IN_DOCKER"):
76
- # To prevent that we always check update in docker due to ephemeral disks we write an "old" check if the state
77
- # is missing. If no disk is mounted we will never get the update check but if its mounted properly we will get
78
- # it on the second attempt. This is good enough
79
- state.last_update_check_time = (datetime.datetime.now() - timedelta(hours=10)).isoformat()
80
- settings.write_state_file(state)
81
- return
82
-
83
- elif not state.should_perform_update_check():
84
- return
85
-
86
98
  # We end up here if last_update_check_time is None or should_perform_update_check is true
87
-
88
99
  include_prereleases = Version(cur).is_prerelease or Version(cur).is_devrelease
89
100
 
90
101
  latest, proj_url = _pypi_latest(
@@ -96,8 +107,7 @@ def check_for_update(project: str, current_version: str, settings: Settings) ->
96
107
  cur,
97
108
  latest,
98
109
  )
99
- state.last_update_check_time = datetime.datetime.now().isoformat()
100
- settings.write_state_file(state)
110
+ settings.set_last_update_check_time(datetime.datetime.now().isoformat())
101
111
 
102
112
 
103
113
  def _print_update_info(cur: str, latest: str) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: remotivelabs-cli
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: CLI for operating RemotiveCloud and RemotiveBroker
5
5
  Author: Johan Rask
6
6
  Author-email: johan.rask@remotivelabs.com
@@ -12,7 +12,6 @@ Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Dist: click (<8.2.0)
15
- Requires-Dist: dacite (>=1.9.2,<2.0.0)
16
15
  Requires-Dist: email-validator (>=2.2.0,<3.0.0)
17
16
  Requires-Dist: grpc-stubs (>=1.53.0.5)
18
17
  Requires-Dist: mypy-protobuf (>=3.0.0)
@@ -21,7 +20,8 @@ Requires-Dist: pydantic (>=2.11.7,<3.0.0)
21
20
  Requires-Dist: pyjwt (>=2.6,<3.0)
22
21
  Requires-Dist: python-can (>=4.3.1)
23
22
  Requires-Dist: python-socketio (>=4.6.1)
24
- Requires-Dist: remotivelabs-broker (>=0.1.17,<0.2.0)
23
+ Requires-Dist: remotivelabs-broker (>=0.9.1,<0.10.0)
24
+ Requires-Dist: requests (>=2.32.4,<3.0.0)
25
25
  Requires-Dist: rich (>=13.7.0,<13.8.0)
26
26
  Requires-Dist: trogon (>=0.5.0)
27
27
  Requires-Dist: typer (==0.12.5)
@@ -5,28 +5,32 @@ cli/broker/brokers.py,sha256=lfO0oAuOwLiJkuNIusXCnOGrxEKGvQjy75LMY9jP5-Y,3234
5
5
  cli/broker/export.py,sha256=rr6OGZmkbqVUljy-gluC2CeRDKbI_p41EhleT3lcgXQ,4481
6
6
  cli/broker/files.py,sha256=JMpyBYfqVX_ppIChDcUuWvCDIQHC8YI6IsljyIL0NZ8,4212
7
7
  cli/broker/lib/__about__.py,sha256=xnZ5V6ZcHW9dhWLWdMzVjYJbEnMKpeXm0_S_mbNzypE,141
8
- cli/broker/lib/broker.py,sha256=Qu6OuKt0P4aFPRSbmcdXUly9iQrnDgUcHTjVJzahTCQ,25006
8
+ cli/broker/lib/broker.py,sha256=W7wp21nvXWm96y5LvSVmRIi3wiNtOFA8Bx-al8CVEIQ,26420
9
+ cli/broker/lib/client.py,sha256=2Nwrd_PY1gqQNqkWc9QTJVFDMAZebAzVnCFUTqiArwE,8540
10
+ cli/broker/lib/helper.py,sha256=ECwygqZHFkRhV-h4EVOUOkOVgXnmsuJP4OnIJtarh7c,9316
11
+ cli/broker/lib/signalcreator.py,sha256=CDInuSAmNrOlEya_br8CGZR1VNAXY7CXkF9s3mQUpHk,8201
9
12
  cli/broker/license_flows.py,sha256=du5SSAdzr2VZeORWoAgbYrfi-mpnDUQfIVpfAJK6CSM,7216
10
13
  cli/broker/licenses.py,sha256=jIuLB2qBGflzSjm952CBnErpzs7iIkmEgx9L8GDAPNc,4021
11
14
  cli/broker/playback.py,sha256=fO-ZvzmB3ZzanmD1L09PeKkabx35uKsELMM-h-5brSE,4023
12
15
  cli/broker/record.py,sha256=rVjvyWRSWNFtthZZkZeZZGvZdmhDB_qmYcrCocCJxY4,1445
13
16
  cli/broker/scripting.py,sha256=LFLdaBNxe2sfpcxhDmRlAbEorjL3SJZNK-zEdLQ9ySU,3854
14
17
  cli/broker/signals.py,sha256=MFj_bOLIxHY1v3XPkKk6n8U3JLaY8nrXHahRQaVse6s,8207
15
- cli/cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ cli/cloud/__init__.py,sha256=xFaDg2zho_glvDBDB0_8HRNICVwHeYFEz-yMhzTcCjI,987
16
19
  cli/cloud/auth/__init__.py,sha256=MtQ01-n8CgZb9Y_SvxwZUgj44Yo0dFAU3_XwhQiUYtw,54
17
- cli/cloud/auth/cmd.py,sha256=gLmfjIN9Vrytk9BwGH1cq4WeeryOfwTTnQ4yuZrbRcs,2757
18
- cli/cloud/auth/login.py,sha256=dX6M5ysE0n9Zg3gVT7hJbChxTsmuba-Z-1Or6DCFYis,11511
19
- cli/cloud/auth_tokens.py,sha256=K_HSBto2XfbD-Hxhb0SAFhxSDZdSXo961UcvdVWNkZI,12831
20
+ cli/cloud/auth/cmd.py,sha256=buLqfd9JGg8ziR749nNhaeXfMZTstIsrYvAib7kBQrU,3872
21
+ cli/cloud/auth/login.py,sha256=cS860pSMuw8aN6PAmtMxLDSkFEaFRjghTodLQNUHB2A,11466
22
+ cli/cloud/auth_tokens.py,sha256=K94lC6QLAuiADZYk0k-4iYabz9AGl_rNFj02xlKeNZs,5148
20
23
  cli/cloud/brokers.py,sha256=QTA9bmaK06LKEccF6IBgWBonC4VFrKwFQBsACX_IzYw,3896
21
- cli/cloud/cloud_cli.py,sha256=q-oiaLcKC-BRamXfIFGn-BskRmJ3utA7-tI39lSs3Cs,1309
22
24
  cli/cloud/configs.py,sha256=uv46nUoGXOr99smQHahv_ageDv6bGYfUnlRlxcS5D9A,5125
23
- cli/cloud/organisations.py,sha256=iEmGMEzOIvuWomoJZ0WBa3Rmrkrup5UH7wjPMoElSn4,4092
25
+ cli/cloud/licenses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ cli/cloud/licenses/cmd.py,sha256=zq-Cc5OdftDyUR4dDqGnCmeNF62XR_kYC3mYXEKFZCw,477
27
+ cli/cloud/organisations.py,sha256=IYpcWwczuWfgY1WqM9d6duXu7F7KMw4v8koeo_ERhkA,3950
24
28
  cli/cloud/projects.py,sha256=ecn5Y8UKhgYnHSJQACUk1GNZt9EF8ug4B-6MCr8rZqM,1487
25
29
  cli/cloud/recordings.py,sha256=In2fKX668CPsEVBAy7zkU92lEnmu3UcnqiVrqsvLNDQ,24961
26
30
  cli/cloud/recordings_playback.py,sha256=XZoVyujufMQFN2v_Nwsf8tOqn61yLEpAf2z_u5uhXik,11532
27
31
  cli/cloud/resumable_upload.py,sha256=8lEIdncJZoTZzNsQVHH3gm_GunxEmN5JbmWX7awy3p4,3713
28
32
  cli/cloud/sample_recordings.py,sha256=RmuT-a2iMwGj3LXVcPkV5l66uFcf7nyWyJciUjnYkk4,721
29
- cli/cloud/service_account_tokens.py,sha256=lZHrja2hIyeXGTNGsxaZ_NlS_iXcyWR_h62H4OYeTMk,2783
33
+ cli/cloud/service_account_tokens.py,sha256=9ffBUM1qXsRaJgOviwINxJl2ndKYKuBr_SXGrcOW3mA,2788
30
34
  cli/cloud/service_accounts.py,sha256=AiktZW5QTbT6sAPJi4ubETOqbBDAIt4LOE-TZmIiIkk,2586
31
35
  cli/cloud/storage/__init__.py,sha256=ijl9WwU5D4oASbwrFKJurYsBUyzwZCOhcdTQYj-ZSeM,159
32
36
  cli/cloud/storage/cmd.py,sha256=UOPpzZeqtqAD2qAbFRGHnbpliq6T_8phKQSxU0EeaqI,2970
@@ -35,33 +39,33 @@ cli/cloud/storage/uri_or_path.py,sha256=DLlyr0RAV-DRlL2C36U-jvUqwiLIlkw7c3mJ7SSG
35
39
  cli/cloud/uri.py,sha256=QZCus--KJQlVwGCOzZqiglvj8VvSRKxfVvN33Pilgyg,3616
36
40
  cli/connect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
41
  cli/connect/connect.py,sha256=SH2DNTTVLu2dNpk6xIah1-KJZAqrK_7Skt8RKp8Mjh8,4231
38
- cli/connect/protopie/protopie.py,sha256=ElmrGaV0ivb85wo0gLzCAXZhmSmIDASaCVlF1iQblLI,6532
42
+ cli/connect/protopie/protopie.py,sha256=hd0WBZG7LZXMq4rHU03C-LJ_ZfG6CDkXEgYAJEP78XA,6529
39
43
  cli/errors.py,sha256=djODw6sdMJXzOsuAUOP3N13nfmm1sIP3Pe6tllGdozM,1657
40
- cli/remotive.py,sha256=xfeekzG6tojXsWZdiGN5ceKCCd8xVNf8v9EUAY2Gnjc,4033
41
- cli/settings/__init__.py,sha256=t1qkaGrJ4xx8WMHlmBTbQ1VdJL4YOcz8VFfRkGa2_jQ,711
42
- cli/settings/config_file.py,sha256=6sdHUtZSUIgubwpfwEEn7GarTK1M_iQhtRJZzFDdP5o,2784
43
- cli/settings/core.py,sha256=IJ62CzPrrvwO46zmvsjKIn6VD4oR9VG5IX29ctd2RO4,11611
44
+ cli/remotive.py,sha256=kYefDVWw9oiEZtTNor-Dz2qhdMXCaoctu_SE0drpg80,3877
45
+ cli/settings/__init__.py,sha256=JsMr0E_hsM6IRHYeJUrlLBGyKnPdR4cDJd08-TjX274,665
46
+ cli/settings/config_file.py,sha256=QwsrVGB7JTqFNXlLkbWVcRSveW0HsKzU6Jl8mHqjdO8,3586
47
+ cli/settings/core.py,sha256=POnA5bwPNXA5EF9YRjEAZ36GS8A6I-O1vWzLbEDQDXY,10965
44
48
  cli/settings/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
49
  cli/settings/migration/migrate_all_token_files.py,sha256=xoVvAqn_tGskEW148uf3xZx1mpJKUnERMTcBo0nkCnI,3010
46
- cli/settings/migration/migrate_config_file.py,sha256=hw4EpRwJz1zUNxfCOk0PvMuZjAlaGy4m_rDbMsHZO_w,2047
50
+ cli/settings/migration/migrate_config_file.py,sha256=S8kyn3ZXbkej2TRLPcVDcYpvk2iW6kGo38OIutEZayo,2217
47
51
  cli/settings/migration/migrate_legacy_dirs.py,sha256=N0t2io3bT_ub8BcVPw1CeQ4eeexRUiu3jXq3DL018OE,1819
48
52
  cli/settings/migration/migrate_token_file.py,sha256=Fp7Z_lNqSdoWY05TYwFW2QH8q9QhmB2TYSok6hV1Mic,1530
49
- cli/settings/migration/migration_tools.py,sha256=P72tuw6-aS_Kd0qn-0ZecplsYxMTu0LTXM5sMSNTVEM,1378
50
- cli/settings/state_file.py,sha256=ujTOJgCts-gpM-66EhRYXwO803HAFcmia2Pf_nYGldc,837
51
- cli/settings/token_file.py,sha256=Po3Vwu5cdT5ZgLO3_ZLEX13_57coqHz1PPu2SQ-202o,4177
53
+ cli/settings/migration/migration_tools.py,sha256=BK9zCzBulzQaZuiNkzLgH2SFRmLCYTopv0TXlo_QuK0,1318
54
+ cli/settings/state_file.py,sha256=rN6JNZP9ULZsuossk3M7jPhoIUgogAAcQGs4SJ-rI-4,2162
55
+ cli/settings/token_file.py,sha256=9GZh44eaXtn30EA06mzQ-69yBT06ig03doqfUHisAw0,3921
52
56
  cli/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
57
  cli/tools/can/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
58
  cli/tools/can/can.py,sha256=TtP5w8vb0QG4ObNhkWIDpRMdNelirFffoc_lFZy8ePM,2260
55
59
  cli/tools/tools.py,sha256=jhLfrFDqkmWV3eBAzNwBf6WgDGrz7sOhgVCia36Twn8,232
56
- cli/topology/cmd.py,sha256=SQ5wi7KDoh4iR2Ed7gyfGLNj6UE0K6UkksmBMSD2XAk,3981
60
+ cli/topology/cmd.py,sha256=M5WB6wR37MbcVk4I5iyW04XFX9YIYXVYVLTejtEYFGw,3997
57
61
  cli/typer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
62
  cli/typer/typer_utils.py,sha256=TaJuK1EtE9Gv3DfmoyHPTNKmhiAimuQCHKxQjnUZ7bs,737
59
63
  cli/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
- cli/utils/rest_helper.py,sha256=De-1Z75p-zjA4hZrylVxWn2wqdPB2gvyvA-ixm_dRFo,14141
64
+ cli/utils/rest_helper.py,sha256=9MLIMiU3RR9dfZZFpCLxJnw4VXnl1Ga62k5knplDsjg,13881
61
65
  cli/utils/time.py,sha256=TEKcNZ-pQoJ7cZ6hQmVD0sTRwRm2rBy51-MuDNdO4S4,296
62
- cli/utils/version_check.py,sha256=sAkTzNRlgGn4Hto_56J0KHLe-3zK7he7gbUTjrtY1lc,3940
63
- remotivelabs_cli-0.2.2.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
64
- remotivelabs_cli-0.2.2.dist-info/METADATA,sha256=Dyz6ht0Psz5TCHsxJXxsKIWckmwKEPVsO3amT4GkDng,1518
65
- remotivelabs_cli-0.2.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
66
- remotivelabs_cli-0.2.2.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
67
- remotivelabs_cli-0.2.2.dist-info/RECORD,,
66
+ cli/utils/versions.py,sha256=U0nq7M2wrUU9m4IL2_Rg1iST3PKN-leN_Huoe6jP4EQ,3846
67
+ remotivelabs_cli-0.3.0.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
68
+ remotivelabs_cli-0.3.0.dist-info/METADATA,sha256=mSh5ZaTWDlSWLDqquw5vXxz0gLNuSurXgqfgn3LtcV0,1521
69
+ remotivelabs_cli-0.3.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
70
+ remotivelabs_cli-0.3.0.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
71
+ remotivelabs_cli-0.3.0.dist-info/RECORD,,
cli/cloud/cloud_cli.py DELETED
@@ -1,29 +0,0 @@
1
- import typer
2
-
3
- from cli.cloud import auth, brokers, configs, organisations, projects, recordings, sample_recordings, service_accounts, storage
4
- from cli.typer import typer_utils
5
- from cli.utils.rest_helper import RestHelper
6
-
7
- app = typer_utils.create_typer()
8
-
9
-
10
- @app.command(help="List licenses for an organization")
11
- def licenses(
12
- organization: str = typer.Option(..., help="Organization ID", envvar="REMOTIVE_CLOUD_ORGANIZATION"),
13
- filter_option: str = typer.Option("all", help="all, valid, expired"),
14
- ) -> None:
15
- RestHelper.handle_get(f"/api/bu/{organization}/licenses", {"filter": filter_option})
16
-
17
-
18
- app.add_typer(organisations.app, name="organizations", help="Manage organizations")
19
- app.add_typer(projects.app, name="projects", help="Manage projects")
20
- app.add_typer(auth.app, name="auth")
21
- app.add_typer(brokers.app, name="brokers", help="Manage cloud broker lifecycle")
22
- app.add_typer(recordings.app, name="recordings", help="Manage recordings")
23
- app.add_typer(configs.app, name="signal-databases", help="Manage signal databases")
24
- app.add_typer(storage.app, name="storage")
25
- app.add_typer(service_accounts.app, name="service-accounts", help="Manage project service account keys")
26
- app.add_typer(sample_recordings.app, name="samples", help="Manage sample recordings")
27
-
28
- if __name__ == "__main__":
29
- app()