2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-12 17:30:19 +00:00

Move code block for usage string processing

This commit is contained in:
Mark Gurevich
2018-01-16 14:46:36 -05:00
parent 8788b13235
commit 0d29e5d5e1
2 changed files with 41 additions and 11 deletions

View File

@ -51,6 +51,18 @@ OpenBMC specific:
\ **rspconfig**\ \ *noderange*\ \ **dump**\ [\ **-l | -**\ **-list**\ ] [\ **-g | -**\ **-generate**\ ] [\ **-c | -**\ **-clear**\ {\ *id*\ | \ **all**\ }] [\ **-d | -**\ **-download**\ {\ *id*\ | \ **all**\ }]
\ **rspconfig**\ \ *noderange*\ \ **powerrestorepolicy**\
\ **rspconfig**\ \ *noderange*\ \ **powerrestorepolicy={always_on|restore|always_off}**\
\ **rspconfig**\ \ *noderange*\ \ **powersupplyredundancy**\
\ **rspconfig**\ \ *noderange*\ \ **powersupplyredundancy={0|1}**\
\ **rspconfig**\ \ *noderange*\ \ **autoreboot**\
\ **rspconfig**\ \ *noderange*\ \ **autoreboot={0|1}**\
MPA specific:
=============
@ -432,6 +444,24 @@ OPTIONS
\ **powerrestorepolicy**\
Display or control BMC powerrestorepolicy attribute setting.
\ **powersupplyredundancy**\
Display or control BMC powersupplyredundancy attribute setting.
\ **autoreboot**\
Display or control BMC autoreboot attribute setting.
\ **dump**\
Manage OpenBMC system dumps. If no sub-option is provided, will generate, wait, and download the dump.

View File

@ -733,18 +733,18 @@ sub preprocess_request {
}
my $usage_string = xCAT::Usage->parseCommand($command, @exargs);
# Insert config api defined OpenBMC specific usage
my $iDataplex_tag = "iDataplex specific:";
my @usage_block = split($iDataplex_tag, $usage_string);
my $usage_before_iDataplex = @usage_block[0];
$usage_before_iDataplex =~ s/\s+$//; # Get rid of all training blanks
my $usage_after_iDataplex = @usage_block[1];
$usage_string = $usage_before_iDataplex . "\n" .
&build_config_api_usage($callback) . "\n" .
$iDataplex_tag . $usage_after_iDataplex;
if ($usage_string) {
# Insert config api defined OpenBMC specific usage
my $iDataplex_tag = "iDataplex specific:";
my @usage_block = split($iDataplex_tag, $usage_string);
my $usage_before_iDataplex = @usage_block[0];
$usage_before_iDataplex =~ s/\s+$//; # Get rid of all training blanks
my $usage_after_iDataplex = @usage_block[1];
$usage_string = $usage_before_iDataplex . "\n" .
&build_config_api_usage($callback) . " " .
$iDataplex_tag . $usage_after_iDataplex;
$callback->({ data => [$usage_string] });
$request = {};
return;