Skip to content

Commit

Permalink
* Fixed many bugs in scan-storcli related to disks not being in a dri…
Browse files Browse the repository at this point in the history
…ve group or virtual drive (as is the case with spares, though testing is still needed for hot-spare drives).

* Updated scan-storcli's 'storcli_physical_drive' to add two columns; 'storcli_physical_drive_enclosure_id,' and 'storcli_physical_drive_slot_number,', along with appropriate alert strings.

Signed-off-by: Digimer <[email protected]>
  • Loading branch information
Digimer committed Oct 25, 2016
1 parent 1bec6d1 commit 6ae9738
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 108 deletions.
10 changes: 5 additions & 5 deletions ScanCore/ScanCore
Original file line number Diff line number Diff line change
Expand Up @@ -6125,7 +6125,7 @@ sub translate_strings
sub translate_units
{
my ($an, $value, $units, $user_units) = @_;
$an->Log->entry({log_level => 2, title_key => "tools_log_0001", title_variables => { function => "translate_units" }, message_key => "an_variables_0003", message_variables => {
$an->Log->entry({log_level => 3, title_key => "tools_log_0001", title_variables => { function => "translate_units" }, message_key => "an_variables_0003", message_variables => {
name1 => "value", value1 => $value,
name2 => "units", value2 => $units,
name3 => "user_units", value3 => $user_units,
Expand Down Expand Up @@ -6265,7 +6265,7 @@ sub translate_units
$return = $value.$an->String->get({key => "tools_suffix_0073"});
}

$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "return", value1 => $return,
}, file => $THIS_FILE, line => __LINE__});
return($return)
Expand All @@ -6276,7 +6276,7 @@ sub translate_units
sub translate_sensor_value
{
my ($an, $ipmitool_value_sensor_value, $ipmitool_sensor_units, $units) = @_;
$an->Log->entry({log_level => 2, title_key => "tools_log_0001", title_variables => { function => "translate_sensor_value", }, message_key => "an_variables_0003", message_variables => {
$an->Log->entry({log_level => 3, title_key => "tools_log_0001", title_variables => { function => "translate_sensor_value", }, message_key => "an_variables_0003", message_variables => {
name1 => "ipmitool_value_sensor_value", value1 => $ipmitool_value_sensor_value,
name2 => "ipmitool_sensor_units", value2 => $ipmitool_sensor_units,
name3 => "units", value3 => $units,
Expand All @@ -6303,14 +6303,14 @@ sub translate_sensor_value
elsif ($say_units eq "W") { $say_units = $an->String->get({key => "tools_suffix_0017"}); } # watts
elsif ($say_units eq "V") { $say_units = $an->String->get({key => "tools_suffix_0018"}); } # vDC is always assumed, may need to update this later.
elsif ($say_units eq "RPM") { $say_units = $an->String->get({key => "tools_suffix_0021"}); } # rotations per minute.
$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "say_units", value1 => $say_units,
}, file => $THIS_FILE, line => __LINE__});

# Put them together
my $say_sensor_value = "$ipmitool_value_sensor_value $say_units";

$an->Log->entry({log_level => 2, message_key => "an_variables_0001", message_variables => {
$an->Log->entry({log_level => 3, message_key => "an_variables_0001", message_variables => {
name1 => "say_sensor_value", value1 => $say_sensor_value,
}, file => $THIS_FILE, line => __LINE__});
return($say_sensor_value);
Expand Down
Loading

0 comments on commit 6ae9738

Please sign in to comment.