Skip to content

Commit d5b59ed

Browse files
committed
Review changes
Signed-off-by: Jakub Boguščiak <[email protected]>
1 parent a868b51 commit d5b59ed

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

uniconfig/python/frinx_worker/uniconfig/connection_manager.py

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ def execute(self, worker_input: WorkerInput) -> TaskResult[WorkerOutput]:
7777
return handle_response(response, self.WorkerOutput)
7878

7979
def _prepare_input(self, worker_input: WorkerInput) -> DictAny:
80+
"""
81+
The input now contains multiple choice nodes (keepalive, credentials and other). Until UniConfig can parse
82+
choice nodes, this is a workaround to prepare the input for the installation request correctly.
83+
https://frinxhelpdesk.atlassian.net/browse/UNIC-1764
84+
:param worker_input: Worker input.
85+
:return: Request input data as dict.
86+
"""
8087
if worker_input.connection_type == "cli":
8188
return {
8289
"input": {

uniconfig/python/frinx_worker/uniconfig/device_discovery.py

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838

3939

4040
def _unwrap_data(discovery_input: Input) -> dict[str, Any]:
41+
"""
42+
Unwrapping is necessary because of the input now containing choice wrapper nodes which cannot be parsed by
43+
UniConfig yet. https://frinxhelpdesk.atlassian.net/browse/UNIC-1764
44+
:param discovery_input: Device Discovery input.
45+
:return: Unwrapped data as dict.
46+
"""
4147
tcp_port: list[dict[str, Any]] = []
4248
udp_port: list[dict[str, Any]] = []
4349
address: list[dict[str, Any]] = []

0 commit comments

Comments
 (0)