remotivelabs-cli 0.3.4__py3-none-any.whl → 0.3.5__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/broker/signals.py CHANGED
@@ -198,7 +198,7 @@ def namespaces(
198
198
 
199
199
  @app.command()
200
200
  def frame_distribution(
201
- url: str = typer.Option(..., help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
201
+ url: str = typer.Option(DEFAULT_GRPC_URL, help="Broker URL", envvar="REMOTIVE_BROKER_URL"),
202
202
  api_key: str = typer.Option(None, help="Cloud Broker API-KEY or access token", envvar="REMOTIVE_BROKER_API_KEY"),
203
203
  namespace: str = typer.Option(..., help="Namespace"),
204
204
  ) -> None:
cli/settings/core.py CHANGED
@@ -22,6 +22,10 @@ CONFIG_DIR_PATH = Path.home() / ".config" / "remotive"
22
22
  CLI_CONFIG_FILE_NAME = "config.json"
23
23
  CLI_INTERNAL_STATE_FILE_NAME = "app-state.json"
24
24
 
25
+ TOKEN_ENV = "REMOTIVE_CLOUD_AUTH_TOKEN"
26
+ # Deprecated in favour of name used in topology-cli
27
+ DEPR_TOKEN_ENV = "REMOTIVE_CLOUD_ACCESS_TOKEN"
28
+
25
29
 
26
30
  class InvalidSettingsFilePathError(Exception):
27
31
  """Raised when trying to access an invalid settings file or file path"""
@@ -91,8 +95,15 @@ class Settings:
91
95
 
92
96
  def get_active_token(self) -> str | None:
93
97
  """
94
- Get the token secret for the current active account
98
+ Get the token secret for the current active account or token specified by env variable
95
99
  """
100
+
101
+ token = os.environ[DEPR_TOKEN_ENV] if DEPR_TOKEN_ENV in os.environ else None
102
+ if not token:
103
+ token = os.environ[TOKEN_ENV] if TOKEN_ENV in os.environ else None
104
+ if token:
105
+ return token
106
+
96
107
  token_file = self.get_active_token_file()
97
108
  return token_file.token if token_file else None
98
109
 
cli/utils/rest_helper.py CHANGED
@@ -85,6 +85,7 @@ class RestHelper:
85
85
  TODO: remove setting org, as we already set the default organization as env in remotive.py?
86
86
  TODO: don't sys.exit, raise error instead
87
87
  """
88
+
88
89
  if "REMOTIVE_CLOUD_ORGANIZATION" not in os.environ:
89
90
  active_account = settings.get_active_account()
90
91
  if active_account:
@@ -94,7 +95,8 @@ class RestHelper:
94
95
 
95
96
  token = access_token
96
97
  if not token:
97
- token = os.environ.get("REMOTIVE_CLOUD_ACCESS_TOKEN", settings.get_active_token())
98
+ token = settings.get_active_token()
99
+
98
100
  if not token:
99
101
  if quiet:
100
102
  return
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: remotivelabs-cli
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: CLI for operating RemotiveCloud and RemotiveBroker
5
5
  Author: Johan Rask
6
6
  Author-email: johan.rask@remotivelabs.com
@@ -15,7 +15,7 @@ cli/broker/licenses.py,sha256=jIuLB2qBGflzSjm952CBnErpzs7iIkmEgx9L8GDAPNc,4021
15
15
  cli/broker/playback.py,sha256=1N8jTTgd2rw3VRbpyzP3I-06ritceeYxc_uEKst-8j8,4110
16
16
  cli/broker/record.py,sha256=FjpeCbd1pUcDcpgF7QGLuBpecv4x4BFOGwELO8De3go,1440
17
17
  cli/broker/scripting.py,sha256=lD8GuoVa8Ku4E2BUAq-USfMqG4utZMRgr61jePogykM,3747
18
- cli/broker/signals.py,sha256=1xldsY3SVcVp-EEsrd6_uoBjrTRMSEONHpOA6SmWxJ4,8245
18
+ cli/broker/signals.py,sha256=ldZerF4DngjDHsPjI5s90SjBhFhCqUaGgmF9baEz574,8258
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
@@ -44,7 +44,7 @@ cli/connect/protopie/protopie.py,sha256=0S-GCNiWpTvXzJEsFSht9HoziSzu_6hXZMvTp4xA
44
44
  cli/remotive.py,sha256=EwgjtTjR5EmGo39PFpbF74v2nm3K2E9A1kon89R2KiE,3854
45
45
  cli/settings/__init__.py,sha256=JsMr0E_hsM6IRHYeJUrlLBGyKnPdR4cDJd08-TjX274,665
46
46
  cli/settings/config_file.py,sha256=QwsrVGB7JTqFNXlLkbWVcRSveW0HsKzU6Jl8mHqjdO8,3586
47
- cli/settings/core.py,sha256=_UNs3B0t1AhuwciMNWsHFWZMV9kTEkoSlmow8QlkeXw,10999
47
+ cli/settings/core.py,sha256=9VpnjRxMhJ6MooX3N_qWqR3cD6yjLjn7sMvbySUuAR4,11405
48
48
  cli/settings/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
49
  cli/settings/migration/migrate_all_token_files.py,sha256=xoVvAqn_tGskEW148uf3xZx1mpJKUnERMTcBo0nkCnI,3010
50
50
  cli/settings/migration/migrate_config_file.py,sha256=S8kyn3ZXbkej2TRLPcVDcYpvk2iW6kGo38OIutEZayo,2217
@@ -64,11 +64,11 @@ 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
66
  cli/utils/console.py,sha256=JF39S9oS1lehFexjdLQKp17oINNvFZJLg_M2SDCjkvA,1754
67
- cli/utils/rest_helper.py,sha256=ZHc7TMNVa07kJWDQ_OEoeaGhzYu8BinSXJJX8R_wX_8,14135
67
+ cli/utils/rest_helper.py,sha256=fGfA2PE5AL86xs03Q9xXUyAmgBMfjSQjV1I2n_UQWqs,14090
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.4.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
71
- remotivelabs_cli-0.3.4.dist-info/METADATA,sha256=ROqIXVSgE__Tey6UbKorZorckyXtHcvSRc21IeMQqEE,1521
72
- remotivelabs_cli-0.3.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
73
- remotivelabs_cli-0.3.4.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
74
- remotivelabs_cli-0.3.4.dist-info/RECORD,,
70
+ remotivelabs_cli-0.3.5.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
71
+ remotivelabs_cli-0.3.5.dist-info/METADATA,sha256=9lhOIqBbAc_vIRppm-Q1W67JW4DcwcyMQUcGs7aRoHQ,1521
72
+ remotivelabs_cli-0.3.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
73
+ remotivelabs_cli-0.3.5.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
74
+ remotivelabs_cli-0.3.5.dist-info/RECORD,,