Display usage in preprocess_request() correctly
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1670 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
5d4c789754
commit
2afe1514f0
@ -869,13 +869,13 @@ sub preprocess_request {
|
||||
|
||||
my $usage_string=xCAT::Usage->parseCommand($command, @exargs);
|
||||
if ($usage_string) {
|
||||
$callback->({data=>$usage_string});
|
||||
$callback->({data=>[$usage_string]});
|
||||
$req = {};
|
||||
return;
|
||||
}
|
||||
if (!$noderange) {
|
||||
$usage_string=xCAT::Usage->getUsage($command);
|
||||
$callback->({data=>$usage_string});
|
||||
$callback->({data=>[$usage_string]});
|
||||
$req = {};
|
||||
return;
|
||||
}
|
||||
@ -887,7 +887,7 @@ sub preprocess_request {
|
||||
my $hcptab_name = ($package eq "fsp") ? "ppcdirect" : "ppchcp";
|
||||
my $hcptab = xCAT::Table->new( $hcptab_name );
|
||||
unless ($hcptab ) {
|
||||
$callback->({data=>"Cannot open $hcptab_name table"});
|
||||
$callback->({data=>["Cannot open $hcptab_name table"]});
|
||||
$req = {};
|
||||
return;
|
||||
}
|
||||
@ -907,7 +907,7 @@ sub preprocess_request {
|
||||
if (@missednodes > 0) {
|
||||
my $ppctab = xCAT::Table->new("ppc");
|
||||
unless ($ppctab) {
|
||||
$callback->({data=>"Cannot open ppc table"});
|
||||
$callback->({data=>["Cannot open ppc table"]});
|
||||
$req = {};
|
||||
return;
|
||||
}
|
||||
@ -915,7 +915,7 @@ sub preprocess_request {
|
||||
my $ent=$ppctab->getNodeAttribs($node,['hcp']);
|
||||
if (defined($ent->{hcp})) { push @{$hcp_hash{$ent->{hcp}}{nodes}}, $node;}
|
||||
else {
|
||||
$callback->({data=>"The node $node is neither a hcp nor an lapr"});
|
||||
$callback->({data=>["The node $node is neither a hcp nor an lpar"]});
|
||||
$req = {};
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user