RemoteRF 2.13.14__tar.gz → 2.13.16__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.
- {remoterf-2.13.14/src/remoterf.egg-info → remoterf-2.13.16}/PKG-INFO +1 -1
- {remoterf-2.13.14 → remoterf-2.13.16}/pyproject.toml +1 -1
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/messages.py +1 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/http.py +2 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/integrations.py +24 -10
- {remoterf-2.13.14 → remoterf-2.13.16/src/remoterf.egg-info}/PKG-INFO +1 -1
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_integrations_helper.py +37 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_messages.py +13 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/LICENSE +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/README.md +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/setup.cfg +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/setup.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/_remoterf_alias.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/admin.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/agent_cli.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/agent_docs.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/api.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/deployment_capabilities.proto +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/deployment_capabilities_pb2.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/deployment_capabilities_pb2_grpc.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/grpc.proto +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/grpc_pb2.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/grpc_pb2_grpc.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/v2_codec.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/tos_notice.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/utils/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/utils/ansi_codes.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/utils/api_token.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/utils/banner.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/utils/list_string.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/utils/process_arg.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/config/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/config/cert_fetcher.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/config/config.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/acc_login.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/app.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/availability.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/banner_note.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/direct_path.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/dynamic_v2_transport.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/grpc_acc.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/grpc_client.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/secure_channel.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/core/v2_errors.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/data/agent_guide.md +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/data/mcp_tools.json +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/backend.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/direct.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/homes.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/lanpass.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/deployment/state.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/_virtual.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/adalm_pluto/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/adalm_pluto/adalm_pluto_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/adalm_pluto_mimo/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/adalm_pluto_mimo/adalm_pluto_mimo_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/bluetooth/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/bluetooth/bluetooth_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/dynamic_device.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/dynamic_v2.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/gps/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/gps/gps_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/hackrf/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/hackrf/hackrf_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/krakensdr/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/krakensdr/krakensdr_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/rfbeam_kmd7/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/rfbeam_kmd7/rfbeam_kmd7_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/rtl_sdr/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/rtl_sdr/rtl_sdr_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/rtlsdr/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/schema_review.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/sim_sdr/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/sim_sdr/sim_sdr_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/krakensdr.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/rfbeam_kmd7.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/ti_mmwave.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/uhd.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/uhd_dsp.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/uhd_v2.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/support/wifi.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/ti_awr6843/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/ti_awr6843/ti_awr6843_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/ti_mmwave/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/ti_mmwave/ti_mmwave_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/usrp/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/usrp/usrp_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/usrp/usrp_remote.pyi +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/wifi/__init__.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/wifi/wifi_remote.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/mcp_server.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/ops.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/remoterf_cli.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/version.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf.egg-info/SOURCES.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf.egg-info/dependency_links.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf.egg-info/entry_points.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf.egg-info/requires.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf.egg-info/top_level.txt +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_agent_cli.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_agent_docs.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_api.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_banner.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_batch.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_bundled_drivers.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_ca_pin.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_cli_login_fresh.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_config_address.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_deployment_accounts.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_device_routes.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_devices_api.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_direct_path_fixed.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_direct_path_global.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_direct_path_partner.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_direct_path_race.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_direct_path_relay.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_dynamic_device_codegen.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_dynamic_v2.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_federated_devices.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_fetch_idl_fallback.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_finish_prompt.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_gate_i_direct_path.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_grpc_client_target.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_homes.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_integration_schema.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_lan_fallback.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_mcp_server.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_native_account_credentials.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_native_devices.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_native_drivers.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_old_import_name.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_ops.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_partner_dynamic_v2.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_pluto_virtual.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_process_arg.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_relay_paging.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_remote_admin.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_remoterf_cli.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_restart_ride_through.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_rx_readahead.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_schema_review.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_ti_mmwave.py +0 -0
- {remoterf-2.13.14 → remoterf-2.13.16}/tests/test_upgrade_rescue.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: remoterf
|
|
3
|
-
Version: 2.13.
|
|
3
|
+
Version: 2.13.16
|
|
4
4
|
Summary: A python API to remotely access signal centric hardware. Client-side only! Courtesy of Wireless Lab @ UCLA & Prof. Ian Roberts.
|
|
5
5
|
Author-email: Ethan Ge <84103791+ethange1@users.noreply.github.com>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "remoterf"
|
|
7
|
-
version = "2.13.
|
|
7
|
+
version = "2.13.16"
|
|
8
8
|
description = "A python API to remotely access signal centric hardware. Client-side only! Courtesy of Wireless Lab @ UCLA & Prof. Ian Roberts."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "GPL-3.0-or-later"
|
|
@@ -81,6 +81,7 @@ _TEXT = {
|
|
|
81
81
|
"invalid_refresh_token": "Your saved login has expired; log in again.",
|
|
82
82
|
"refresh_token_reused": "Your saved login was used somewhere else; log in again.",
|
|
83
83
|
"rate_limited": ("Too many requests; try again in {retry_after} s.", "Too many requests; wait a minute and try again."),
|
|
84
|
+
"region_blocked": "RemoteRF isn't available in your region.",
|
|
84
85
|
"invalid_email": "That email address isn't valid.",
|
|
85
86
|
"invalid_username": "That username isn't allowed; pick another.",
|
|
86
87
|
"invalid_password": "Password must be 6-128 characters.",
|
|
@@ -108,6 +108,8 @@ class JsonTransport:
|
|
|
108
108
|
)
|
|
109
109
|
if 300 <= response.status_code < 400:
|
|
110
110
|
raise AccountBackendError("Account redirects are not allowed")
|
|
111
|
+
if response.status_code == 451:
|
|
112
|
+
raise AccountBackendError("region_blocked")
|
|
111
113
|
if response.status_code >= 500 and not bytes(raw).lstrip().startswith(b"{"):
|
|
112
114
|
# The proxy answered for an app that is down (502/503): it never saw the request.
|
|
113
115
|
raise AccountBackendError("Account service unavailable", unreachable=True,
|
|
@@ -28,8 +28,8 @@ _DONE = {"SUCCEEDED", "ERROR", "CANCELLED"}
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class IntegrationError(RuntimeError):
|
|
31
|
-
def __init__(self, code):
|
|
32
|
-
super().__init__(code)
|
|
31
|
+
def __init__(self, code, message=None):
|
|
32
|
+
super().__init__(f"{code}: {message}" if message else code)
|
|
33
33
|
self.code = code
|
|
34
34
|
|
|
35
35
|
|
|
@@ -57,7 +57,7 @@ class App:
|
|
|
57
57
|
@property
|
|
58
58
|
def actions(self):
|
|
59
59
|
if self._actions is None:
|
|
60
|
-
described = self.
|
|
60
|
+
described = self._rpc("integration_describe", {"integration_id": self._id})
|
|
61
61
|
self.__dict__["_actions"] = tuple(described["integration"]["actions"])
|
|
62
62
|
return self._actions
|
|
63
63
|
|
|
@@ -65,17 +65,31 @@ class App:
|
|
|
65
65
|
def operation_id(self):
|
|
66
66
|
return self._op
|
|
67
67
|
|
|
68
|
+
def _rpc(self, method, request):
|
|
69
|
+
"""A server refusal carries details.integration_code; raise it as IntegrationError."""
|
|
70
|
+
try:
|
|
71
|
+
return getattr(self._radio, method)(request)
|
|
72
|
+
except Exception as exc:
|
|
73
|
+
details = getattr(exc, "details", None)
|
|
74
|
+
code = details.get("integration_code") if isinstance(details, dict) else None
|
|
75
|
+
if code:
|
|
76
|
+
raise IntegrationError(code, str(exc)) from exc
|
|
77
|
+
raise
|
|
78
|
+
|
|
68
79
|
def _send(self, method, request):
|
|
69
80
|
# Same request (and key) on retry: the server attaches to the recorded outcome.
|
|
81
|
+
# Only transport failures are retried; a refusal would just be refused again.
|
|
70
82
|
try:
|
|
71
|
-
return
|
|
83
|
+
return self._rpc(method, request)
|
|
84
|
+
except IntegrationError:
|
|
85
|
+
raise
|
|
72
86
|
except Exception:
|
|
73
|
-
return
|
|
87
|
+
return self._rpc(method, request)
|
|
74
88
|
|
|
75
89
|
def _poll(self, request, done, timeout_s):
|
|
76
90
|
deadline = time.monotonic() + timeout_s
|
|
77
91
|
while True:
|
|
78
|
-
snapshot = self.
|
|
92
|
+
snapshot = self._rpc("integration_status", request)
|
|
79
93
|
if done(snapshot):
|
|
80
94
|
return snapshot
|
|
81
95
|
if time.monotonic() >= deadline:
|
|
@@ -84,7 +98,7 @@ class App:
|
|
|
84
98
|
|
|
85
99
|
def start(self, timeout_s=120.0, wait=True):
|
|
86
100
|
if self._start is None:
|
|
87
|
-
generation = self.
|
|
101
|
+
generation = self._rpc("integration_list", {})["generation"]
|
|
88
102
|
self.__dict__["_start"] = {"integration_id": self._id, "profile": self._profile,
|
|
89
103
|
"configuration": dict(self._config),
|
|
90
104
|
"request_key": uuid.uuid4().hex, "generation": generation}
|
|
@@ -99,7 +113,7 @@ class App:
|
|
|
99
113
|
return snapshot
|
|
100
114
|
|
|
101
115
|
def status(self):
|
|
102
|
-
return self.
|
|
116
|
+
return self._rpc("integration_status", {"operation_id": self._require()})
|
|
103
117
|
|
|
104
118
|
def _require(self):
|
|
105
119
|
if self._op is None:
|
|
@@ -136,7 +150,7 @@ class App:
|
|
|
136
150
|
def fetch(self, name):
|
|
137
151
|
operation_id, data = self._require(), bytearray()
|
|
138
152
|
while True:
|
|
139
|
-
chunk = self.
|
|
153
|
+
chunk = self._rpc("integration_fetch", {"operation_id": operation_id, "artifact": name,
|
|
140
154
|
"offset": len(data), "limit": MAX_FETCH_BYTES})
|
|
141
155
|
raw = base64.b64decode(chunk["data"])
|
|
142
156
|
data += raw
|
|
@@ -148,7 +162,7 @@ class App:
|
|
|
148
162
|
def stop(self, timeout_s=120.0):
|
|
149
163
|
if self._op is None:
|
|
150
164
|
return None
|
|
151
|
-
self.
|
|
165
|
+
self._rpc("integration_stop", {"operation_id": self._op})
|
|
152
166
|
return self._poll({"operation_id": self._op}, lambda s: s["released"], timeout_s)
|
|
153
167
|
|
|
154
168
|
def __enter__(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: remoterf
|
|
3
|
-
Version: 2.13.
|
|
3
|
+
Version: 2.13.16
|
|
4
4
|
Summary: A python API to remotely access signal centric hardware. Client-side only! Courtesy of Wireless Lab @ UCLA & Prof. Ian Roberts.
|
|
5
5
|
Author-email: Ethan Ge <84103791+ethange1@users.noreply.github.com>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -140,3 +140,40 @@ def test_oai_subclasses_and_aliases():
|
|
|
140
140
|
ue.attach(wait=False)
|
|
141
141
|
assert ue._start["integration_id"] == "org.remoterf.oai" and ue._start["profile"] == "ue"
|
|
142
142
|
ue.detach()
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class Refused(Exception):
|
|
146
|
+
"""Shape of RemoteRFProtocolError for a server-side integration refusal."""
|
|
147
|
+
|
|
148
|
+
def __init__(self, code):
|
|
149
|
+
super().__init__("application integrations are disabled")
|
|
150
|
+
self.details = {"integration_code": code}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def test_server_refusal_becomes_integration_error_without_retry():
|
|
154
|
+
radio = FakeRadio()
|
|
155
|
+
|
|
156
|
+
def refuse(request):
|
|
157
|
+
radio._record("integration_start", request)
|
|
158
|
+
raise Refused("integration_disabled")
|
|
159
|
+
|
|
160
|
+
radio.integration_start = refuse
|
|
161
|
+
with pytest.raises(IntegrationError) as caught:
|
|
162
|
+
OaiGnb(radio).start_cell(timeout_s=1)
|
|
163
|
+
assert caught.value.code == "integration_disabled"
|
|
164
|
+
assert "application integrations are disabled" in str(caught.value)
|
|
165
|
+
assert [m for m, _ in radio.requests].count("integration_start") == 1
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def test_refusal_on_status_poll_is_mapped_too():
|
|
169
|
+
radio = FakeRadio()
|
|
170
|
+
app = App(radio, "org.example.fake", "test")
|
|
171
|
+
app.start(timeout_s=1)
|
|
172
|
+
|
|
173
|
+
def refuse(request):
|
|
174
|
+
raise Refused("unknown_operation")
|
|
175
|
+
|
|
176
|
+
radio.integration_status = refuse
|
|
177
|
+
with pytest.raises(IntegrationError) as caught:
|
|
178
|
+
app.status()
|
|
179
|
+
assert caught.value.code == "unknown_operation"
|
|
@@ -347,3 +347,16 @@ def test_no_user_facing_template_interpolates_an_id():
|
|
|
347
347
|
found += [f"{path.name}:{n.lineno} {ast.unparse(n.value)}" for n in ast.walk(tree)
|
|
348
348
|
if isinstance(n, ast.FormattedValue) and n not in legacy and is_id.match(ast.unparse(n.value))]
|
|
349
349
|
assert found == []
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
def test_http_451_reads_as_region_blocked():
|
|
353
|
+
import httpx
|
|
354
|
+
from remoterf.deployment.http import JsonTransport
|
|
355
|
+
for body in (b"", b'{"error":{"code":"region_blocked"}}'):
|
|
356
|
+
transport = JsonTransport(
|
|
357
|
+
"https://home.example",
|
|
358
|
+
client=httpx.Client(transport=httpx.MockTransport(lambda _r, b=body: httpx.Response(451, content=b))),
|
|
359
|
+
)
|
|
360
|
+
with pytest.raises(AccountBackendError) as info:
|
|
361
|
+
transport.permissions("/v2/deployment/permissions", access="token")
|
|
362
|
+
assert explain(info.value) == "RemoteRF isn't available in your region."
|
|
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
|
{remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/deployment_capabilities.proto
RENAMED
|
File without changes
|
{remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/deployment_capabilities_pb2.py
RENAMED
|
File without changes
|
{remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/common/grpc/deployment_capabilities_pb2_grpc.py
RENAMED
|
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
|
{remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/adalm_pluto/adalm_pluto_remote.py
RENAMED
|
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
|
{remoterf-2.13.14 → remoterf-2.13.16}/src/remoterf/drivers/rfbeam_kmd7/rfbeam_kmd7_remote.py
RENAMED
|
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
|
|
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
|