wizata-dsapi 2.2.0.dev13__tar.gz → 2.2.0.dev15__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.
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/PKG-INFO +1 -1
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/__init__.py +1 -1
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/edge_device.py +30 -1
- wizata_dsapi-2.2.0.dev15/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/wizata_dsapi_client.py +38 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.2.0.dev13/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/LICENSE.txt +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/README.rst +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/setup.cfg +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/setup.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/connection.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/connection_types.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/deployment.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/inventory.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/product.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -58,7 +58,7 @@ from .streamlit_utils import (get_streamlit_token, get_streamlit_domain, get_str
|
|
|
58
58
|
from .search import FilterOperator, SearchQuery, SortOption, GroupSearchQuery, GroupOption, GroupSummary, GroupSummaryType
|
|
59
59
|
from .notification import NotificationScope, DeviceToken, AlertRule, AlertActive, MonitoredDatapoint, \
|
|
60
60
|
MonitoredPipeline, NotificationPreference, RecipientList, Recipient, RecipientType
|
|
61
|
-
from .edge_device import EdgeDevice, EdgeDeviceStatus, EdgeDeviceType
|
|
61
|
+
from .edge_device import EdgeDevice, EdgeDeviceStatus, EdgeDeviceType, EdgeDeviceProvisioning
|
|
62
62
|
from .edge_module import EdgeModule, EdgeModuleType, WIZATA_MODULES
|
|
63
63
|
from .edge_config import EdgeConsumer, EdgeWriter, EdgeTrigger
|
|
64
64
|
from .connection import Connection, ConnectionMapping, ConnectionDirection, TransformKind, \
|
|
@@ -23,6 +23,14 @@ class EdgeDeviceType(Enum):
|
|
|
23
23
|
CUSTOM = "Custom"
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
class EdgeDeviceProvisioning(Enum):
|
|
27
|
+
"""
|
|
28
|
+
How an edge device is installed (DEV-6015).
|
|
29
|
+
"""
|
|
30
|
+
AZURE_IOT_EDGE = "azure-iot-edge"
|
|
31
|
+
MANUAL = "manual"
|
|
32
|
+
|
|
33
|
+
|
|
26
34
|
class EdgeDevice(ApiDto):
|
|
27
35
|
"""
|
|
28
36
|
Edge device registered on the platform.
|
|
@@ -35,6 +43,9 @@ class EdgeDevice(ApiDto):
|
|
|
35
43
|
:ivar EdgeDeviceStatus status: current status of the device.
|
|
36
44
|
:ivar int status_code: numeric status code.
|
|
37
45
|
:ivar EdgeDeviceType device_type: type of the edge device.
|
|
46
|
+
:ivar EdgeDeviceProvisioning provisioning: how the device is installed.
|
|
47
|
+
:ivar int created_at: creation time, epoch ms (the PostgreSQL registry, DEV-6015).
|
|
48
|
+
:ivar int updated_at: last update time, epoch ms.
|
|
38
49
|
:ivar str connection_state: IoT Hub connection state ('Connected' or 'Disconnected'), enriched from IoT Hub.
|
|
39
50
|
:ivar str last_activity_time: last device activity timestamp from IoT Hub.
|
|
40
51
|
"""
|
|
@@ -59,7 +70,10 @@ class EdgeDevice(ApiDto):
|
|
|
59
70
|
status_code: int = None,
|
|
60
71
|
device_type: EdgeDeviceType = None,
|
|
61
72
|
connection_state: str = None,
|
|
62
|
-
last_activity_time: str = None
|
|
73
|
+
last_activity_time: str = None,
|
|
74
|
+
provisioning: EdgeDeviceProvisioning = None,
|
|
75
|
+
created_at: int = None,
|
|
76
|
+
updated_at: int = None):
|
|
63
77
|
if edge_device_id is None:
|
|
64
78
|
self.edge_device_id = uuid.uuid4()
|
|
65
79
|
else:
|
|
@@ -73,6 +87,9 @@ class EdgeDevice(ApiDto):
|
|
|
73
87
|
self.device_type = device_type
|
|
74
88
|
self.connection_state = connection_state
|
|
75
89
|
self.last_activity_time = last_activity_time
|
|
90
|
+
self.provisioning = provisioning
|
|
91
|
+
self.created_at = created_at
|
|
92
|
+
self.updated_at = updated_at
|
|
76
93
|
|
|
77
94
|
def api_id(self) -> str:
|
|
78
95
|
return str(self.edge_device_id).upper()
|
|
@@ -107,6 +124,12 @@ class EdgeDevice(ApiDto):
|
|
|
107
124
|
self.connection_state = obj["connectionState"]
|
|
108
125
|
if "lastActivityTime" in obj and obj["lastActivityTime"] is not None:
|
|
109
126
|
self.last_activity_time = obj["lastActivityTime"]
|
|
127
|
+
if "provisioning" in obj and obj["provisioning"] is not None:
|
|
128
|
+
self.provisioning = EdgeDeviceProvisioning(obj["provisioning"])
|
|
129
|
+
if "createdAt" in obj and obj["createdAt"] is not None:
|
|
130
|
+
self.created_at = int(obj["createdAt"])
|
|
131
|
+
if "updatedAt" in obj and obj["updatedAt"] is not None:
|
|
132
|
+
self.updated_at = int(obj["updatedAt"])
|
|
110
133
|
|
|
111
134
|
def to_json(self, target: str = None):
|
|
112
135
|
obj = {
|
|
@@ -130,4 +153,10 @@ class EdgeDevice(ApiDto):
|
|
|
130
153
|
obj["connectionState"] = self.connection_state
|
|
131
154
|
if self.last_activity_time is not None:
|
|
132
155
|
obj["lastActivityTime"] = self.last_activity_time
|
|
156
|
+
if self.provisioning is not None:
|
|
157
|
+
obj["provisioning"] = self.provisioning.value
|
|
158
|
+
if self.created_at is not None:
|
|
159
|
+
obj["createdAt"] = self.created_at
|
|
160
|
+
if self.updated_at is not None:
|
|
161
|
+
obj["updatedAt"] = self.updated_at
|
|
133
162
|
return obj
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.0.dev15"
|
|
@@ -56,6 +56,7 @@ import ast
|
|
|
56
56
|
from .deployment import Deployment, DeploymentStatus
|
|
57
57
|
from .product import ProductKind, Product, ProductComponent
|
|
58
58
|
from .inventory import InventoryBalance, InventoryStorage, InventoryStock
|
|
59
|
+
from .connection import EdgeDeviceKey
|
|
59
60
|
from .api_config import _registry
|
|
60
61
|
|
|
61
62
|
from .streamlit_utils import get_streamlit_token, get_streamlit_domain
|
|
@@ -2989,6 +2990,43 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
2989
2990
|
self._planner_request("DELETE", f"planner/inventory/balances/{self._balance_id(balance)}/",
|
|
2990
2991
|
expected=(204,))
|
|
2991
2992
|
|
|
2993
|
+
# ------------------------------------------------------------ edge device keys
|
|
2994
|
+
|
|
2995
|
+
@staticmethod
|
|
2996
|
+
def _edge_device_keys_route(edge_device_id) -> str:
|
|
2997
|
+
if not edge_device_id:
|
|
2998
|
+
raise ValueError("please provide the edge device id")
|
|
2999
|
+
return f"edgedevices/{urllib.parse.quote(str(edge_device_id), safe='')}/keys"
|
|
3000
|
+
|
|
3001
|
+
def register_edge_device_key(self, edge_device_id: str, public_key: str) -> EdgeDeviceKey:
|
|
3002
|
+
"""
|
|
3003
|
+
Register the public half of the key pair an edge generated for itself (DEV-6013).
|
|
3004
|
+
Connection secrets are sealed for the edge's active key, and only that edge can
|
|
3005
|
+
open them: the private half never leaves the device.
|
|
3006
|
+
|
|
3007
|
+
Registering the same key again is a no-op, so an edge can register on every start.
|
|
3008
|
+
A different key retires the current one, and every secret sealed for that one must
|
|
3009
|
+
be entered again.
|
|
3010
|
+
|
|
3011
|
+
:param edge_device_id: the device id the edge runs as, not its UUID.
|
|
3012
|
+
:param public_key: PEM of the edge's X25519 public key.
|
|
3013
|
+
:return: the edge's active key.
|
|
3014
|
+
"""
|
|
3015
|
+
response = self._process_request(method="POST",
|
|
3016
|
+
route=self._edge_device_keys_route(edge_device_id),
|
|
3017
|
+
data=json.dumps({"publicKey": public_key}))
|
|
3018
|
+
return EdgeDeviceKey.from_dict(response.json())
|
|
3019
|
+
|
|
3020
|
+
def get_edge_device_keys(self, edge_device_id: str) -> list:
|
|
3021
|
+
"""
|
|
3022
|
+
:param edge_device_id: the device id the edge runs as, not its UUID.
|
|
3023
|
+
:return: every EdgeDeviceKey the edge registered, newest first. With no active
|
|
3024
|
+
one, the edge has not registered yet and no secret can be entered for it.
|
|
3025
|
+
"""
|
|
3026
|
+
return self._process_request(method="GET",
|
|
3027
|
+
route=self._edge_device_keys_route(edge_device_id),
|
|
3028
|
+
dto_class=EdgeDeviceKey, result_type="list")
|
|
3029
|
+
|
|
2992
3030
|
|
|
2993
3031
|
def api() -> WizataDSAPIClient:
|
|
2994
3032
|
"""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0.dev13"
|
|
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
|
{wizata_dsapi-2.2.0.dev13 → wizata_dsapi-2.2.0.dev15}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|