mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-13 09:50:19 +00:00
OpenBMC rinv sorted output
This commit is contained in:
@ -876,6 +876,7 @@ sub rinv_response {
|
||||
my $grep_string = $status_info{RINV_RESPONSE}{argv};
|
||||
my $src;
|
||||
my $content_info;
|
||||
my @sorted_output;
|
||||
|
||||
foreach my $key_url (keys %{$response_info->{data}}) {
|
||||
my %content = %{ ${ $response_info->{data} }{$key_url} };
|
||||
@ -893,19 +894,23 @@ sub rinv_response {
|
||||
}
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "mprom")) {
|
||||
# wait for interface
|
||||
xCAT::SvrUtils::sendmsg("No information can be obtained for $grep_string", $callback, $node);
|
||||
last;
|
||||
}
|
||||
|
||||
if (($grep_string eq "vpd" or $grep_string eq "deviceid")) {
|
||||
# wait for interface
|
||||
xCAT::SvrUtils::sendmsg("No information can be obtained for $grep_string", $callback, $node);
|
||||
last;
|
||||
}
|
||||
|
||||
if ($grep_string eq "uuid") {
|
||||
# wait for interface
|
||||
xCAT::SvrUtils::sendmsg("No information can be obtained for $grep_string", $callback, $node);
|
||||
last;
|
||||
}
|
||||
|
||||
if ($grep_string eq "guid") {
|
||||
# wait for interface
|
||||
xCAT::SvrUtils::sendmsg("No information can be obtained for $grep_string", $callback, $node);
|
||||
last;
|
||||
}
|
||||
|
||||
if ($grep_string eq "mac" and $key_url =~ /\/ethernet/) {
|
||||
@ -923,10 +928,16 @@ sub rinv_response {
|
||||
|
||||
foreach my $key (keys %content) {
|
||||
$content_info = uc ($src) . " " . $key . " : " . $content{$key};
|
||||
xCAT::SvrUtils::sendmsg("$content_info", $callback, $node);
|
||||
push (@sorted_output, $node . ": ". $content_info); #Save output in array
|
||||
}
|
||||
}
|
||||
}
|
||||
# If sorted array has any contents, sort it and print it
|
||||
if (scalar @sorted_output > 0) {
|
||||
@sorted_output = sort @sorted_output; #Sort all output
|
||||
my $result = join "\n", @sorted_output; #Join into a single string for easier display
|
||||
xCAT::SvrUtils::sendmsg("$result", $callback);
|
||||
}
|
||||
|
||||
if ($next_status{ $node_info{$node}{cur_status} }) {
|
||||
$node_info{$node}{cur_status} = $next_status{ $node_info{$node}{cur_status} };
|
||||
|
Reference in New Issue
Block a user