From bbea9bf21e09990bf459c397c01ea65652b5aebf Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Tue, 21 May 2024 13:36:27 +0200 Subject: [PATCH] ci: define SNMP base interface on runner In order to turn on/off through SNMP DuT under PoE switch, the SNMP key in some vendors don't directly use the interface number, but a number shifted a base number. Define this base number as BM_POE_BASE environment in the runner. Reviewed-by: Jose Maria Casanova Crespo Signed-off-by: Juan A. Suarez Romero Part-of: (cherry picked from commit 90f8be9bda9b3841c41f48414897d89ebbceb43b) --- .gitlab-ci/bare-metal/poe-off | 2 +- .gitlab-ci/bare-metal/poe-on | 2 +- .pick_status.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/bare-metal/poe-off b/.gitlab-ci/bare-metal/poe-off index 3332a7b0f3d..64517204f40 100755 --- a/.gitlab-ci/bare-metal/poe-off +++ b/.gitlab-ci/bare-metal/poe-off @@ -10,7 +10,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then exit 1 fi -SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((48 + BM_POE_INTERFACE))" +SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))" SNMP_OFF="i 2" flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF" diff --git a/.gitlab-ci/bare-metal/poe-on b/.gitlab-ci/bare-metal/poe-on index de41fc9b819..c5fde69791d 100755 --- a/.gitlab-ci/bare-metal/poe-on +++ b/.gitlab-ci/bare-metal/poe-on @@ -10,7 +10,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then exit 1 fi -SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((48 + BM_POE_INTERFACE))" +SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))" SNMP_ON="i 1" SNMP_OFF="i 2" diff --git a/.pick_status.json b/.pick_status.json index e188984c743..8a2660c6c46 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4274,7 +4274,7 @@ "description": "ci: define SNMP base interface on runner", "nominated": false, "nomination_type": 3, - "resolution": 4, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null