diff options
-rwxr-xr-x | src/conf_mode/interfaces-dummy.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-loopback.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-macsec.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-wirelessmodem.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/ssh.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/system_console.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/vrf.py | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py index a8093ffa5..1cf0dc546 100755 --- a/src/conf_mode/interfaces-dummy.py +++ b/src/conf_mode/interfaces-dummy.py @@ -40,7 +40,7 @@ def get_config(): ifname = os.environ['VYOS_TAGNODE_VALUE'] base = ['interfaces', 'dummy', ifname] - dummy = conf.get_config_dict(base, key_mangling=('-', '_')) + dummy = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # Check if interface has been removed if dummy == {}: dummy.update({'deleted' : ''}) diff --git a/src/conf_mode/interfaces-loopback.py b/src/conf_mode/interfaces-loopback.py index 7c3d8663d..2368f88a9 100755 --- a/src/conf_mode/interfaces-loopback.py +++ b/src/conf_mode/interfaces-loopback.py @@ -35,7 +35,7 @@ def get_config(): ifname = os.environ['VYOS_TAGNODE_VALUE'] base = ['interfaces', 'loopback', ifname] - loopback = conf.get_config_dict(base, key_mangling=('-', '_')) + loopback = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # Check if interface has been removed if loopback == {}: loopback.update({'deleted' : ''}) diff --git a/src/conf_mode/interfaces-macsec.py b/src/conf_mode/interfaces-macsec.py index 6f4e90169..829b9b9dd 100755 --- a/src/conf_mode/interfaces-macsec.py +++ b/src/conf_mode/interfaces-macsec.py @@ -53,7 +53,7 @@ def get_config(): ifname = os.environ['VYOS_TAGNODE_VALUE'] base = base + [ifname] - macsec = conf.get_config_dict(base, key_mangling=('-', '_')) + macsec = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # Check if interface has been removed if macsec == {}: tmp = { diff --git a/src/conf_mode/interfaces-wirelessmodem.py b/src/conf_mode/interfaces-wirelessmodem.py index 57f39760b..9d4fa73a1 100755 --- a/src/conf_mode/interfaces-wirelessmodem.py +++ b/src/conf_mode/interfaces-wirelessmodem.py @@ -62,7 +62,7 @@ def get_config(): ifname = os.environ['VYOS_TAGNODE_VALUE'] base = base + [ifname] - wwan = conf.get_config_dict(base, key_mangling=('-', '_')) + wwan = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # Check if interface has been removed if wwan == {}: wwan.update({'deleted' : ''}) diff --git a/src/conf_mode/ssh.py b/src/conf_mode/ssh.py index 1ca2c8b4c..ffb0b700d 100755 --- a/src/conf_mode/ssh.py +++ b/src/conf_mode/ssh.py @@ -37,7 +37,7 @@ def get_config(): if not conf.exists(base): return None - ssh = conf.get_config_dict(base, key_mangling=('-', '_')) + ssh = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True) # We have gathered the dict representation of the CLI, but there are default # options which we need to update into the dictionary retrived. default_values = defaults(base) diff --git a/src/conf_mode/system_console.py b/src/conf_mode/system_console.py index 034cbee63..6f83335f3 100755 --- a/src/conf_mode/system_console.py +++ b/src/conf_mode/system_console.py @@ -31,7 +31,7 @@ def get_config(): base = ['system', 'console'] # retrieve configuration at once - console = conf.get_config_dict(base) + console = conf.get_config_dict(base, get_first_key=True) # bail out early if no serial console is configured if 'device' not in console.keys(): diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py index e8f523e36..d3327b3c7 100755 --- a/src/conf_mode/vrf.py +++ b/src/conf_mode/vrf.py @@ -52,7 +52,7 @@ def vrf_interfaces(c, match): matched = [] old_level = c.get_level() c.set_level(['interfaces']) - section = c.get_config_dict([]) + section = c.get_config_dict([], get_first_key=True) for type in section: interfaces = section[type] for name in interfaces: |