mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	Move code block for usage string processing
This commit is contained in:
		| @@ -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. | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user