diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 6f1b8f448..08c9abc5d 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -217,15 +217,15 @@ my %status_info = ( RSETBOOT_SET_REQUEST => { method => "PUT", - init_url => "$openbmc_project_url/control/boot/bootsource/attr/Sources", - data => "xyz.openbmc_project.Control.Boot.Sources.", + init_url => "$openbmc_project_url/control/host0/boot_source/attr/BootSource", + data => "xyz.openbmc_project.Control.Boot.Source.Sources.", }, RSETBOOT_SET_RESPONSE => { process => \&rsetboot_response, }, RSETBOOT_STATUS_REQUEST => { method => "GET", - init_url => "$openbmc_project_url/control/boot/bootsource", + init_url => "$openbmc_project_url/control/host0/boot_source", }, RSETBOOT_STATUS_RESPONSE => { process => \&rsetboot_response, @@ -1361,11 +1361,19 @@ sub rsetboot_response { my $response_info = decode_json $response->content; - if ($node_info{$node}{cur_status} eq "RSETBOOT_GET_RESPONSE") { - xCAT::SvrUtils::sendmsg("Hard Drive", $callback, $node) if ($response_info->{'data'}->{BootSource} =~ /Disk$/); - xCAT::SvrUtils::sendmsg("Network", $callback, $node) if ($response_info->{'data'}->{BootSource} =~ /Network$/); - xCAT::SvrUtils::sendmsg("CD/DVD", $callback, $node) if ($response_info->{'data'}->{BootSource} =~ /ExternalMedia$/); - xCAT::SvrUtils::sendmsg("boot override inactive", $callback, $node) if ($response_info->{'data'}->{BootSource} =~ /Default$/); + if ($node_info{$node}{cur_status} eq "RSETBOOT_STATUS_RESPONSE") { + if ($response_info->{'data'}->{BootSource} =~ /Disk$/) { + xCAT::SvrUtils::sendmsg("Hard Drive", $callback, $node); + } elsif ($response_info->{'data'}->{BootSource} =~ /Network$/) { + xCAT::SvrUtils::sendmsg("Network", $callback, $node); + } elsif ($response_info->{'data'}->{BootSource} =~ /ExternalMedia$/) { + xCAT::SvrUtils::sendmsg("CD/DVD", $callback, $node); + } elsif ($response_info->{'data'}->{BootSource} =~ /Default$/) { + xCAT::SvrUtils::sendmsg("Default", $callback, $node); + } else { + my $error_msg = "Can not get valid rsetboot status, the data is " . $response_info->{'data'}->{BootSource}; + xCAT::SvrUtils::sendmsg("$error_msg", $callback, $node); + } } if ($next_status{ $node_info{$node}{cur_status} }) {