summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-25 11:00:36 +0100
committerGitHub <noreply@github.com>2023-12-25 11:00:36 +0100
commit4cf15bd7587bf6df81bf5ad1083dd1b97d2c9fbc (patch)
tree4707cae8354a714773482b394a7669933ca98c6f /src/conf_mode
parentfb3a7e30bffc949584bbb0ad1f6632ef940605be (diff)
parenta9201e77110ce0695e2ba879304aef41b7ac9a0c (diff)
downloadvyos-1x-4cf15bd7587bf6df81bf5ad1083dd1b97d2c9fbc.tar.gz
vyos-1x-4cf15bd7587bf6df81bf5ad1083dd1b97d2c9fbc.zip
Merge pull request #2687 from c-po/lldp-snmp-t5855
snmp: T5855: migrate "set service lldp snmp enable" to "set service lldp snmp"
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/lldp.py5
-rwxr-xr-xsrc/conf_mode/snmp.py2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/conf_mode/lldp.py b/src/conf_mode/lldp.py
index c2e87d171..3c647a0e8 100755
--- a/src/conf_mode/lldp.py
+++ b/src/conf_mode/lldp.py
@@ -86,9 +86,9 @@ def verify(lldp):
raise ConfigError(f'Must define both longitude and latitude for "{interface}" location!')
# check options
- if 'snmp' in lldp and 'enable' in lldp['snmp']:
+ if 'snmp' in lldp:
if 'system_snmp_enabled' not in lldp:
- raise ConfigError('SNMP must be configured to enable LLDP SNMP')
+ raise ConfigError('SNMP must be configured to enable LLDP SNMP!')
def generate(lldp):
@@ -121,4 +121,3 @@ if __name__ == '__main__':
except ConfigError as e:
print(e)
exit(1)
-
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index f1d41f23d..6565ffd60 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -54,7 +54,7 @@ def get_config(config=None):
if not conf.exists(base):
snmp.update({'deleted' : ''})
- if conf.exists(['service', 'lldp', 'snmp', 'enable']):
+ if conf.exists(['service', 'lldp', 'snmp']):
snmp.update({'lldp_snmp' : ''})
if 'deleted' in snmp: