From 0cf20cb0a8193692de244a1e244a2a26eb0947fd Mon Sep 17 00:00:00 2001 From: rebiffe Date: Thu, 26 Jan 2023 13:48:59 +0000 Subject: [PATCH] Adding device_params= {"name": "huaweiyang"} workaround for huawei namespace issue on --- lncc.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lncc.py b/lncc.py index 9004c14..1df4c24 100755 --- a/lncc.py +++ b/lncc.py @@ -6,7 +6,7 @@ Emulates a real SDN Controller by pushing NETCONF operations, ... License ======= Software Name : Lightweight NETCONF Controller (LNCC) -Version: 0.3.0 +Version: 0.3.2 SPDX-FileCopyrightText: Copyright (c) 2022 Jean Rebiffé, Orange Innovation Networks SPDX-License-Identifier: BSD-3-Clause SPDX-FileType: SOURCE @@ -21,7 +21,7 @@ Software description: Emulates a real SDN Controller by pushing NETCONF operations, ... """ -__version__ = "0.3.1" +__version__ = "0.3.2" __author__ = "Jean Rebiffe, Orange Innovation Networks, 2022" import argparse @@ -349,6 +349,9 @@ class LnccCli(cmd2.Cmd): params["password"] = args.password if args.port: params["port"] = args.port + # Workaround for namespace issue on + if args.device_params == "huaweiyang": + params["device_params"] = {"name": "huaweiyang"} n_e = NetworkElement(args.name, params) self.nes[args.name] = n_e @@ -429,6 +432,8 @@ class LnccCli(cmd2.Cmd): _ne_add_parser.add_argument("--username") _ne_add_parser.add_argument("--password") _ne_add_parser.add_argument("--port") + # Workaround for namespace issue + _ne_add_parser.add_argument("--device_params", choices=["huaweiyang"]) _ne_add_parser.set_defaults(func=ne_add) _ne_delete_parser = _ne_subparsers.add_parser("delete") -- GitLab