diff --git a/docs/source/guides/admin-guides/references/man1/rpower.1.rst b/docs/source/guides/admin-guides/references/man1/rpower.1.rst index 414471bd5..243d10b19 100644 --- a/docs/source/guides/admin-guides/references/man1/rpower.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rpower.1.rst @@ -45,7 +45,7 @@ OpenPOWER OpenBMC: ================== -\ **rpower**\ \ *noderange*\ [\ **off | on | reset | boot | stat | state | status**\ ] +\ **rpower**\ \ *noderange*\ [\ **off | on | softoff | reset | boot | stat | state | status**\ ] PPC (with IVM or HMC) specific: diff --git a/xCAT-client/pods/man1/rpower.1.pod b/xCAT-client/pods/man1/rpower.1.pod index 0e38e78c8..9112ff250 100644 --- a/xCAT-client/pods/man1/rpower.1.pod +++ b/xCAT-client/pods/man1/rpower.1.pod @@ -22,7 +22,7 @@ B I [B|B|B|B] =head2 OpenPOWER OpenBMC: -B I [B|B|B|B|B|B|B] +B I [B|B|B|B|B|B|B|B] =head2 PPC (with IVM or HMC) specific: diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 773bffc36..ad78d6abf 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -168,6 +168,11 @@ my %status_info = ( RPOWER_OFF_RESPONSE => { process => \&rpower_response, }, + RPOWER_SOFTOFF_REQUEST => { + method => "PUT", + init_url => "$openbmc_project_url/state/host0/attr/RequestedHostTransition", + data => "xyz.openbmc_project.State.Host.Transition.Off", + }, RPOWER_RESET_REQUEST => { method => "PUT", init_url => "$openbmc_project_url/state/host0/attr/RequestedHostTransition", @@ -441,7 +446,7 @@ sub parse_args { } if ($command eq "rpower") { - unless ($subcommand =~ /^on$|^off$|^reset$|^boot$|^status$|^stat$|^state$/) { + unless ($subcommand =~ /^on$|^off$|^softoff$|^reset$|^boot$|^status$|^stat$|^state$/) { return ([ 1, "Unsupported command: $command $subcommand" ]); } } elsif ($command eq "rinv") { @@ -570,6 +575,9 @@ sub parse_command_status { } elsif ($subcommand eq "off") { $next_status{LOGIN_RESPONSE} = "RPOWER_OFF_REQUEST"; $next_status{RPOWER_OFF_REQUEST} = "RPOWER_OFF_RESPONSE"; + } elsif ($subcommand eq "softoff") { + $next_status{LOGIN_RESPONSE} = "RPOWER_SOFTOFF_REQUEST"; + $next_status{RPOWER_SOFTOFF_REQUEST} = "RPOWER_OFF_RESPONSE"; } elsif ($subcommand eq "reset") { $next_status{LOGIN_RESPONSE} = "RPOWER_RESET_REQUEST"; $next_status{RPOWER_RESET_REQUEST} = "RPOWER_RESET_RESPONSE";