wizata-dsapi 2.2.0.dev17__tar.gz → 2.2.0.dev18__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.dev17 → wizata_dsapi-2.2.0.dev18}/PKG-INFO +1 -1
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/edge_device.py +73 -17
- wizata_dsapi-2.2.0.dev18/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/wizata_dsapi_client.py +3 -1
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.2.0.dev17/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/LICENSE.txt +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/README.rst +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/setup.cfg +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/setup.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/connection.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/connection_types.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/deployment.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/inventory.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/product.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ class EdgeDeviceStatus(Enum):
|
|
|
9
9
|
"""
|
|
10
10
|
WAITING_FOR_REGISTRATION = "WaitingForRegistration"
|
|
11
11
|
REGISTERED = "Registered"
|
|
12
|
+
DEPLOYING = "Deploying"
|
|
12
13
|
DEPLOYED = "Deployed"
|
|
13
14
|
FAILED = "Failed"
|
|
14
15
|
OFFLINE = "Offline"
|
|
@@ -35,25 +36,40 @@ class EdgeDevice(ApiDto):
|
|
|
35
36
|
"""
|
|
36
37
|
Edge device registered on the platform.
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
The device id is its only identifier (DEV-6101): the name it runs as (its IoT Hub
|
|
40
|
+
device id), and what connections, keys and deployment targets refer to.
|
|
41
|
+
|
|
42
|
+
:ivar str device_id: the device identifier.
|
|
40
43
|
:ivar str name: display name of the edge device.
|
|
41
44
|
:ivar str twin_name: name of the associated twin.
|
|
42
45
|
:ivar uuid.UUID twin_id: technical id of the associated twin.
|
|
43
46
|
:ivar EdgeDeviceStatus status: current status of the device.
|
|
44
|
-
:ivar int status_code:
|
|
47
|
+
:ivar int status_code: last ``$edgeAgent`` ``lastDesiredStatus.code`` read (417, 200, 406...).
|
|
45
48
|
:ivar EdgeDeviceType device_type: type of the edge device.
|
|
46
49
|
:ivar EdgeDeviceProvisioning provisioning: how the device is installed.
|
|
47
50
|
:ivar int created_at: creation time, epoch ms (the PostgreSQL registry, DEV-6015).
|
|
48
51
|
:ivar int updated_at: last update time, epoch ms.
|
|
49
52
|
:ivar str connection_state: IoT Hub connection state ('Connected' or 'Disconnected'), enriched from IoT Hub.
|
|
50
53
|
:ivar str last_activity_time: last device activity timestamp from IoT Hub.
|
|
54
|
+
:ivar str applied_hash: digest of the manifest the platform last applied (DEV-6101).
|
|
55
|
+
:ivar int applied_version: ``$edgeAgent`` desired ``$version`` that apply produced.
|
|
56
|
+
:ivar int applied_at: when it was applied, epoch ms.
|
|
57
|
+
:ivar dict image_overrides: module -> image, winning over the release's images.
|
|
58
|
+
:ivar str runner_python_version: Python version of the edge's pipeline runner.
|
|
59
|
+
:ivar bool managed: the platform keeps this device's manifest ("deploy modules").
|
|
60
|
+
:ivar dict applied_modules: what was last applied: module -> {image, env names}.
|
|
61
|
+
:ivar str reconcile_error: why the last apply failed, until one succeeds.
|
|
51
62
|
"""
|
|
52
63
|
|
|
53
64
|
@classmethod
|
|
54
65
|
def route(cls):
|
|
55
66
|
return "edgedevices"
|
|
56
67
|
|
|
68
|
+
@classmethod
|
|
69
|
+
def get_id_type(cls) -> type:
|
|
70
|
+
"""The device id (a string) is the edge's only identifier (DEV-6101)."""
|
|
71
|
+
return str
|
|
72
|
+
|
|
57
73
|
@classmethod
|
|
58
74
|
def from_dict(cls, data):
|
|
59
75
|
obj = EdgeDevice()
|
|
@@ -61,7 +77,6 @@ class EdgeDevice(ApiDto):
|
|
|
61
77
|
return obj
|
|
62
78
|
|
|
63
79
|
def __init__(self,
|
|
64
|
-
edge_device_id: uuid.UUID = None,
|
|
65
80
|
device_id: str = None,
|
|
66
81
|
name: str = None,
|
|
67
82
|
twin_name: str = None,
|
|
@@ -73,11 +88,15 @@ class EdgeDevice(ApiDto):
|
|
|
73
88
|
last_activity_time: str = None,
|
|
74
89
|
provisioning: EdgeDeviceProvisioning = None,
|
|
75
90
|
created_at: int = None,
|
|
76
|
-
updated_at: int = None
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
updated_at: int = None,
|
|
92
|
+
applied_hash: str = None,
|
|
93
|
+
applied_version: int = None,
|
|
94
|
+
applied_at: int = None,
|
|
95
|
+
image_overrides: dict = None,
|
|
96
|
+
runner_python_version: str = None,
|
|
97
|
+
managed: bool = None,
|
|
98
|
+
applied_modules: dict = None,
|
|
99
|
+
reconcile_error: str = None):
|
|
81
100
|
self.device_id = device_id
|
|
82
101
|
self.name = name
|
|
83
102
|
self.twin_name = twin_name
|
|
@@ -90,22 +109,28 @@ class EdgeDevice(ApiDto):
|
|
|
90
109
|
self.provisioning = provisioning
|
|
91
110
|
self.created_at = created_at
|
|
92
111
|
self.updated_at = updated_at
|
|
112
|
+
self.applied_hash = applied_hash
|
|
113
|
+
self.applied_version = applied_version
|
|
114
|
+
self.applied_at = applied_at
|
|
115
|
+
self.image_overrides = image_overrides
|
|
116
|
+
self.runner_python_version = runner_python_version
|
|
117
|
+
self.managed = managed
|
|
118
|
+
self.applied_modules = applied_modules
|
|
119
|
+
self.reconcile_error = reconcile_error
|
|
93
120
|
|
|
94
121
|
def api_id(self) -> str:
|
|
95
|
-
return
|
|
122
|
+
return self.device_id
|
|
96
123
|
|
|
97
124
|
def api_key(self) -> str:
|
|
98
125
|
return self.device_id
|
|
99
126
|
|
|
100
127
|
def set_id(self, id_value):
|
|
101
|
-
self.
|
|
128
|
+
self.device_id = str(id_value)
|
|
102
129
|
|
|
103
130
|
def endpoint(self) -> str:
|
|
104
131
|
return "EdgeDevices"
|
|
105
132
|
|
|
106
133
|
def from_json(self, obj):
|
|
107
|
-
if "id" in obj and obj["id"] is not None:
|
|
108
|
-
self.edge_device_id = uuid.UUID(obj["id"])
|
|
109
134
|
if "deviceId" in obj and obj["deviceId"] is not None:
|
|
110
135
|
self.device_id = obj["deviceId"]
|
|
111
136
|
if "name" in obj and obj["name"] is not None:
|
|
@@ -130,11 +155,27 @@ class EdgeDevice(ApiDto):
|
|
|
130
155
|
self.created_at = int(obj["createdAt"])
|
|
131
156
|
if "updatedAt" in obj and obj["updatedAt"] is not None:
|
|
132
157
|
self.updated_at = int(obj["updatedAt"])
|
|
158
|
+
if "appliedHash" in obj and obj["appliedHash"] is not None:
|
|
159
|
+
self.applied_hash = obj["appliedHash"]
|
|
160
|
+
if "appliedVersion" in obj and obj["appliedVersion"] is not None:
|
|
161
|
+
self.applied_version = int(obj["appliedVersion"])
|
|
162
|
+
if "appliedAt" in obj and obj["appliedAt"] is not None:
|
|
163
|
+
self.applied_at = int(obj["appliedAt"])
|
|
164
|
+
if "imageOverrides" in obj and obj["imageOverrides"] is not None:
|
|
165
|
+
if not isinstance(obj["imageOverrides"], dict):
|
|
166
|
+
raise ValueError("imageOverrides must be an object: module -> image")
|
|
167
|
+
self.image_overrides = dict(obj["imageOverrides"])
|
|
168
|
+
if "runnerPythonVersion" in obj and obj["runnerPythonVersion"] is not None:
|
|
169
|
+
self.runner_python_version = str(obj["runnerPythonVersion"])
|
|
170
|
+
if "managed" in obj and obj["managed"] is not None:
|
|
171
|
+
self.managed = bool(obj["managed"])
|
|
172
|
+
if "appliedModules" in obj and obj["appliedModules"] is not None:
|
|
173
|
+
self.applied_modules = obj["appliedModules"]
|
|
174
|
+
if "reconcileError" in obj and obj["reconcileError"] is not None:
|
|
175
|
+
self.reconcile_error = obj["reconcileError"]
|
|
133
176
|
|
|
134
177
|
def to_json(self, target: str = None):
|
|
135
|
-
obj = {
|
|
136
|
-
"id": str(self.edge_device_id)
|
|
137
|
-
}
|
|
178
|
+
obj = {}
|
|
138
179
|
if self.device_id is not None:
|
|
139
180
|
obj["deviceId"] = self.device_id
|
|
140
181
|
if self.name is not None:
|
|
@@ -159,4 +200,19 @@ class EdgeDevice(ApiDto):
|
|
|
159
200
|
obj["createdAt"] = self.created_at
|
|
160
201
|
if self.updated_at is not None:
|
|
161
202
|
obj["updatedAt"] = self.updated_at
|
|
162
|
-
|
|
203
|
+
if self.applied_hash is not None:
|
|
204
|
+
obj["appliedHash"] = self.applied_hash
|
|
205
|
+
if self.applied_version is not None:
|
|
206
|
+
obj["appliedVersion"] = self.applied_version
|
|
207
|
+
if self.applied_at is not None:
|
|
208
|
+
obj["appliedAt"] = self.applied_at
|
|
209
|
+
if self.image_overrides is not None:
|
|
210
|
+
obj["imageOverrides"] = self.image_overrides
|
|
211
|
+
if self.runner_python_version is not None:
|
|
212
|
+
obj["runnerPythonVersion"] = self.runner_python_version
|
|
213
|
+
obj["managed"] = bool(self.managed)
|
|
214
|
+
if self.applied_modules is not None:
|
|
215
|
+
obj["appliedModules"] = self.applied_modules
|
|
216
|
+
if self.reconcile_error is not None:
|
|
217
|
+
obj["reconcileError"] = self.reconcile_error
|
|
218
|
+
return obj
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.0.dev18"
|
|
@@ -446,7 +446,7 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
446
446
|
return self._query(request=obj)
|
|
447
447
|
else:
|
|
448
448
|
dto_class = self._get_class(entity=type(obj), operation=operation)
|
|
449
|
-
if dto_class == PipelineImage:
|
|
449
|
+
if dto_class == PipelineImage or dto_class.get_id_type() == str:
|
|
450
450
|
id = obj.api_id()
|
|
451
451
|
else:
|
|
452
452
|
id = uuid.UUID(obj.api_id())
|
|
@@ -582,6 +582,8 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
582
582
|
if dto_class.get_id_type() == int:
|
|
583
583
|
obj.set_id(response.json()["id"])
|
|
584
584
|
return response.json()["id"]
|
|
585
|
+
elif dto_class.get_id_type() == str:
|
|
586
|
+
return obj.api_id()
|
|
585
587
|
else:
|
|
586
588
|
return uuid.UUID(obj.api_id())
|
|
587
589
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0.dev17"
|
|
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
|
{wizata_dsapi-2.2.0.dev17 → wizata_dsapi-2.2.0.dev18}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|