summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-11-18 14:38:42 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-11-18 14:38:42 -0600
commit110edd19082ba995b2006e117bd73307bf4dad11 (patch)
tree94da462a988c3f61bf2d466cb21e509d32f3e874
parent78f487c75b7e92a4f0c6181c91804f0ec3d8fe48 (diff)
downloadnetconfapk-110edd19082ba995b2006e117bd73307bf4dad11.tar.gz
netconfapk-110edd19082ba995b2006e117bd73307bf4dad11.tar.bz2
netconfapk-110edd19082ba995b2006e117bd73307bf4dad11.tar.xz
netconfapk-110edd19082ba995b2006e117bd73307bf4dad11.zip
ifupdown-ng NMSA: Allow creating new ifaces with set_param
-rw-r--r--ncserver/module/nms_ifupdownng.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/ncserver/module/nms_ifupdownng.py b/ncserver/module/nms_ifupdownng.py
index 9d1d19b..55405d4 100644
--- a/ncserver/module/nms_ifupdownng.py
+++ b/ncserver/module/nms_ifupdownng.py
@@ -173,12 +173,9 @@ def set_param(iface: str, parameter: str, value):
"""Set the parameter for the specified interface."""
_load_config()
+ # Allow creation of new interfaces from NETCONF.
if iface not in _CONFIG.keys():
- LOGGER.warning(
- _("attempted to set parameter %s for non-existent interface %s"),
- parameter, iface
- )
- return
+ _CONFIG[iface] = list()
# implement this.
raise NotImplementedError