From 1ce8e672b57e03e144998cb0a56ad1622c667a1d Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Wed, 18 Jan 2023 15:09:32 +0000 Subject: T4857: Cleaning pr --- src/conf_mode/snmp.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/conf_mode') diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py index 5cd24db32..addfb9e26 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -166,6 +166,10 @@ def verify(snmp): if 'community' not in trap_config: raise ConfigError(f'Trap target "{trap}" requires a community to be set!') + if 'oid_enable' in snmp: + Warning(f'Custom oids are enabled and may lead to system instability and high resource consumption') + + verify_vrf(snmp) # bail out early if SNMP v3 is not configured -- cgit v1.2.3 From 67fa5f55ac79838768b4b0a5f6d2c4b3b4c8e762 Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Wed, 18 Jan 2023 16:17:17 +0000 Subject: T4857: change description in cli, and change word oid to uppercase OIDs in warning message --- interface-definitions/include/version/snmp-version.xml.i | 2 +- interface-definitions/snmp.xml.in | 8 ++++---- src/conf_mode/snmp.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/conf_mode') diff --git a/interface-definitions/include/version/snmp-version.xml.i b/interface-definitions/include/version/snmp-version.xml.i index 0416288f0..fa58672a5 100644 --- a/interface-definitions/include/version/snmp-version.xml.i +++ b/interface-definitions/include/version/snmp-version.xml.i @@ -1,3 +1,3 @@ - + diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in index bb6e91167..10dd828a5 100644 --- a/interface-definitions/snmp.xml.in +++ b/interface-definitions/snmp.xml.in @@ -129,19 +129,19 @@ ip-forward - Enable oid .1.3.6.1.2.1.4.24 + Enable ipForward: .1.3.6.1.2.1.4.24 ip-route-table - Enable oid .1.3.6.1.2.1.4.21 + Enable ipRouteTable: .1.3.6.1.2.1.4.21 ip-net-to-media-table - Enable oid .1.3.6.1.2.1.4.22 + Enable ipNetToMediaTable: .1.3.6.1.2.1.4.22 ip-net-to-physical-phys-address - Enable oid .1.3.6.1.2.1.4.35 + Enable ipNetToPhysicalPhysAddress: .1.3.6.1.2.1.4.35 (ip-forward|ip-route-table|ip-net-to-media-table|ip-net-to-physical-phys-address) diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py index addfb9e26..9651b358e 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -167,7 +167,7 @@ def verify(snmp): raise ConfigError(f'Trap target "{trap}" requires a community to be set!') if 'oid_enable' in snmp: - Warning(f'Custom oids are enabled and may lead to system instability and high resource consumption') + Warning(f'Custom OIDs are enabled and may lead to system instability and high resource consumption') verify_vrf(snmp) -- cgit v1.2.3