From 1c625cb1328b048089d12c48c172ac63b994073d Mon Sep 17 00:00:00 2001 From: UrBnW <40244829+UrBnW@users.noreply.github.com> Date: Sun, 29 Nov 2020 18:49:18 +0100 Subject: [PATCH] enh(idrac) Add systemModelName to status output --- hardware/server/dell/idrac/snmp/mode/globalstatus.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hardware/server/dell/idrac/snmp/mode/globalstatus.pm b/hardware/server/dell/idrac/snmp/mode/globalstatus.pm index 6ee8fae4f..670edb596 100644 --- a/hardware/server/dell/idrac/snmp/mode/globalstatus.pm +++ b/hardware/server/dell/idrac/snmp/mode/globalstatus.pm @@ -102,7 +102,7 @@ sub new { sub prefix_global_output { my ($self, %options) = @_; - return "Card '" . $self->{global}->{display} . "' : "; + return "'" . $self->{global}->{display} . "' : "; } sub check_options { @@ -129,11 +129,12 @@ sub manage_selection { my $oid_racShortName = '.1.3.6.1.4.1.674.10892.5.1.1.2.0'; my $oid_racVersion = '.1.3.6.1.4.1.674.10892.5.1.1.5.0'; + my $oid_systemModelName = '.1.3.6.1.4.1.674.10892.5.1.3.12.0'; my $oid_drsGlobalSystemStatus = '.1.3.6.1.4.1.674.10892.2.2.1.0'; my $oid_globalSystemStatus = '.1.3.6.1.4.1.674.10892.5.2.1.0'; my $oid_globalStorageStatus = '.1.3.6.1.4.1.674.10892.5.2.3.0'; my $result = $options{snmp}->get_leef(oids => [ - $oid_racShortName, $oid_racVersion, $oid_drsGlobalSystemStatus, $oid_globalSystemStatus, $oid_globalStorageStatus + $oid_racShortName, $oid_racVersion, $oid_systemModelName, $oid_drsGlobalSystemStatus, $oid_globalSystemStatus, $oid_globalStorageStatus ], nothing_quit => 1); my ($global_status, $storage_status); @@ -149,6 +150,8 @@ sub manage_selection { if (defined($result->{$oid_racShortName})); $display .= '.' . $result->{$oid_racVersion} if (defined($result->{$oid_racVersion})); + $display .= '@' . $result->{$oid_systemModelName} + if (defined($result->{$oid_systemModelName})); $self->{global} = { display => $display, status => $global_status,