Skip to content

Commit

Permalink
Fix credentials
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Boguščiak <[email protected]>
  • Loading branch information
jbogusciak committed Jun 10, 2024
1 parent c313cec commit 213afbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uniconfig/python/frinx_worker/uniconfig/connection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ def execute(self, worker_input: WorkerInput) -> TaskResult[WorkerOutput]:

def _prepare_input(self, worker_input: WorkerInput) -> None:
if worker_input.connection_type == "cli":
worker_input.install_params["credentials"] = Credentials(
worker_input.install_params["cli-topology:credentials"] = Credentials(
cli_topology_username=worker_input.install_params.pop("cli-topology:username"),
cli_topology_password=worker_input.install_params.pop("cli-topology:password")
)
elif worker_input.connection_type == "netconf":
worker_input.install_params["credentials"] = CredentialsModel1(
worker_input.install_params["netconf-node-topology:credentials"] = CredentialsModel1(
netconf_node_topology_username=worker_input.install_params.pop("netconf-node-topology:username"),
netconf_node_topology_password=worker_input.install_params.pop("netconf-node-topology:password")
)
elif worker_input.connection_type == "gnmi":
worker_input.install_params["credentials"] = GnmiTopologyCredentials(
worker_input.install_params["gnmi-topology:credentials"] = GnmiTopologyCredentials(
gnmi_topology_username=worker_input.install_params.pop("gnmi-topology:username"),
gnmi_topology_password=worker_input.install_params.pop("gnmi-topology:password")
)
Expand Down

0 comments on commit 213afbc

Please sign in to comment.