Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit 52d9baf

Browse files
MarcelSuleimanJozefiel
authored andcommitted
- fix zone_id: translate zone name into zone id
- fix mount_parameters
1 parent bdfc9a0 commit 52d9baf

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

inventory/python/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# 1.0.0
2-
- Upgrade pydantic version to v2
2+
- Upgrade pydantic version to v2
3+
4+
# 1.0.2
5+
- Translate zone_name from the frontend to zone_id by using the _get_zone_id method when initializing the input
6+
- Correction of mount_parameters retyping

inventory/python/frinx_worker/inventory/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,10 +644,10 @@ def _get_zone_id(zone_name: str) -> str | None:
644644
def execute(self, worker_input: WorkerInput) -> TaskResult[WorkerOutput]:
645645

646646
self.add_device.input.name = worker_input.device_name
647-
self.add_device.input.zone_id = worker_input.zone_id
647+
self.add_device.input.zone_id = self._get_zone_id(worker_input.zone_id)
648648
self.add_device.input.service_state = worker_input.service_state
649649
self.add_device.input.device_size = worker_input.device_size
650-
self.add_device.input.mount_parameters = str(worker_input.mount_parameters).replace("'", '\\"')
650+
self.add_device.input.mount_parameters = str(worker_input.mount_parameters).replace("'", '\"')
651651

652652
if worker_input.label_ids:
653653
self.add_device.input.label_ids = worker_input.label_ids

inventory/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ packages = [{ include = "frinx_worker" }]
1919
name = "frinx-inventory-worker"
2020
description = "Conductor worker for Frinx Device Inventory"
2121
authors = ["Jozef Volak <[email protected]>"]
22-
version = "1.0.1"
22+
version = "1.0.2"
2323
readme = ["README.md", "CHANGELOG.md", "RELEASE.md"]
2424
keywords = ["frinx-machine", "device inventory", "worker"]
2525
license = "Apache 2.0"

0 commit comments

Comments
 (0)