diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-25 08:58:56 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-25 10:01:42 +0000 |
commit | 1902f252c4c270cf7981fecd486e293ec2182fd9 (patch) | |
tree | a764448c31a4b0a15ecb488331bca6c8c30d4b5e /src/conf_mode | |
parent | 4b3eca1e08603ed8c97d7b352e567e2e8570eac4 (diff) | |
download | vyos-1x-1902f252c4c270cf7981fecd486e293ec2182fd9.tar.gz vyos-1x-1902f252c4c270cf7981fecd486e293ec2182fd9.zip |
snmp: T5855: migrate "set service lldp snmp enable" to "set service lldp snmp"
(cherry picked from commit a9201e77110ce0695e2ba879304aef41b7ac9a0c)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/lldp.py | 5 | ||||
-rwxr-xr-x | src/conf_mode/snmp.py | 2 |
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 38b5d52f9..f65d0d6bc 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: |