mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 11:42:05 +00:00
the error message of *def command is disordered when running internally
This commit is contained in:
parent
0ad575668d
commit
c7af2c30c8
@ -4555,17 +4555,19 @@ sub defmk_usage
|
||||
$rsp->{data}->[3] = " [-o object-names] [-z|--stanza ]";
|
||||
$rsp->{data}->[4] = " [-d | --dynamic] [-w attr==val [-w attr=~val] ...]";
|
||||
$rsp->{data}->[5] = " [-f | --force] [noderange] [attr=val [attr=val...]]";
|
||||
$rsp->{data}->[6] = "\nThe following data object types are supported by xCAT.\n";
|
||||
my $n = 6;
|
||||
$rsp->{data}->[6] = "\nThe following data object types are supported by xCAT:\n";
|
||||
my $n = 7;
|
||||
my $dataobj;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
{
|
||||
$rsp->{data}->[$n] = "$t";
|
||||
$n++;
|
||||
$dataobj = $dataobj . ' ' . $t;
|
||||
}
|
||||
$rsp->{data}->[$n] = "$dataobj\n";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "get a list of valid attribute names for each object type.\n";
|
||||
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
return 0;
|
||||
}
|
||||
@ -4596,17 +4598,19 @@ sub defch_usage
|
||||
$rsp->{data}->[3] = " chdef [-V | --verbose] [-t object-types] [-o object-names] [-d | --dynamic]";
|
||||
$rsp->{data}->[4] = " [-z | --stanza] [-m | --minus] [-p | --plus]";
|
||||
$rsp->{data}->[5] = " [-w attr==val [-w attr=~val] ... ] [noderange] [attr=val [attr=val...]]\n";
|
||||
$rsp->{data}->[6] = "\nThe following data object types are supported by xCAT.\n";
|
||||
$rsp->{data}->[6] = "\nThe following data object types are supported by xCAT:\n";
|
||||
my $n = 7;
|
||||
my $dataobj;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
{
|
||||
$rsp->{data}->[$n] = "$t";
|
||||
$n++;
|
||||
$dataobj = $dataobj . ' ' . $t;
|
||||
}
|
||||
$rsp->{data}->[$n] = "$dataobj\n";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "get a list of valid attribute names for each object type.\n";
|
||||
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
return 0;
|
||||
}
|
||||
@ -4638,17 +4642,19 @@ sub defls_usage
|
||||
$rsp->{data}->[4] = " lsdef [-V | --verbose] [-t object-types] [-o object-names]";
|
||||
$rsp->{data}->[5] = " [ -l | --long] [-s | --short] [-a | --all] [-z | --stanza ] [-S]";
|
||||
$rsp->{data}->[6] = " [-i attr-list] [-w attr==val [-w attr=~val] ...] [noderange]\n";
|
||||
$rsp->{data}->[7] = "\nThe following data object types are supported by xCAT.\n";
|
||||
my $n = 6;
|
||||
$rsp->{data}->[7] = "\nThe following data object types are supported by xCAT:\n";
|
||||
my $n = 8;
|
||||
my $dataobj;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
{
|
||||
$rsp->{data}->[$n] = "$t";
|
||||
$n++;
|
||||
$dataobj = $dataobj . ' ' . $t;
|
||||
}
|
||||
$rsp->{data}->[$n] = "$dataobj\n";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "get a list of valid attribute names for each object type.\n";
|
||||
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
return 0;
|
||||
}
|
||||
@ -4677,17 +4683,19 @@ sub defrm_usage
|
||||
$rsp->{data}->[1] = " rmdef [-h | --help ] [-t object-types]\n";
|
||||
$rsp->{data}->[2] = " rmdef [-V | --verbose] [-t object-types] [-a | --all] [-f | --force]";
|
||||
$rsp->{data}->[3] = " [-o object-names] [-C | --cleanup] [noderange]\n";
|
||||
$rsp->{data}->[4] = "\nThe following data object types are supported by xCAT.\n";
|
||||
$rsp->{data}->[4] = "\nThe following data object types are supported by xCAT:\n";
|
||||
my $n = 5;
|
||||
my $dataobj;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
{
|
||||
$rsp->{data}->[$n] = "$t";
|
||||
$n++;
|
||||
$dataobj = $dataobj . ' ' . $t;
|
||||
}
|
||||
$rsp->{data}->[$n] = "$dataobj\n";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
|
||||
$n++;
|
||||
$rsp->{data}->[$n] = "get a list of valid attribute names for each object type.\n";
|
||||
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
return 0;
|
||||
}
|
||||
|
@ -819,10 +819,10 @@ sub write_to_xcatdb {
|
||||
"bmcusername=$bmcuser", "bmcpassword=$bmcpass", "nodetype=$nodetype",
|
||||
"servicenode=$sn", "conserver=$conserver",
|
||||
"hwtype=$hwtype", "groups=all" ] },
|
||||
$request_command, 0, 1);
|
||||
$request_command, -1, 1);
|
||||
if ($::RUNCMD_RC != 0) {
|
||||
my $rsp = {};
|
||||
push @{ $rsp->{data} }, "create or modify node is failed.\n";
|
||||
push @{ $rsp->{data} }, "Failed to run chdef command for node=$node\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
|
||||
return 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user