mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-13 01:40:26 +00:00
[xCAT-server]: Make string assignmets consistent in DBobjectdefs.pm
This commit is contained in:
@ -528,8 +528,7 @@ sub processArgs
|
||||
{
|
||||
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-x\' (XML format) option is not yet implemented.";
|
||||
$rsp->{data}->[0] = "The \'-x\' (XML format) option is not yet implemented.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 2;
|
||||
}
|
||||
@ -791,8 +790,7 @@ sub processArgs
|
||||
if ($gotattrs)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot combine multiple types with \'att=val\' pairs on the command line.";
|
||||
$rsp->{data}->[0] = "Cannot combine multiple types with \'att=val\' pairs on the command line.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
}
|
||||
@ -818,8 +816,7 @@ sub processArgs
|
||||
if (!grep(/^$t$/, @xdeftypes))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\nType \'$t\' is not a valid xCAT object type.";
|
||||
$rsp->{data}->[0] = "\nType \'$t\' is not a valid xCAT object type.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
}
|
||||
@ -1028,8 +1025,7 @@ sub processArgs
|
||||
if (($::command eq 'rmdef') || ($::command eq 'chdef'))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"No object names were provided.";
|
||||
$rsp->{data}->[0] = "No object names were provided.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 2;
|
||||
}
|
||||
@ -1058,8 +1054,7 @@ sub processArgs
|
||||
unless (@tmplist)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not get objects of type \'$t\'.";
|
||||
$rsp->{data}->[0] = "Could not get objects of type \'$t\'.";
|
||||
#$rsp->{data}->[1] = "Skipping to the next type.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
@ -1083,8 +1078,7 @@ sub processArgs
|
||||
{
|
||||
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot use \'-a\' with \'-o\', a noderange or file input.";
|
||||
$rsp->{data}->[0] = "Cannot use \'-a\' with \'-o\', a noderange or file input.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
}
|
||||
@ -1124,8 +1118,7 @@ sub processArgs
|
||||
if ((scalar(@::clobjnames) == 0) && (scalar(@::fileobjnames) == 0))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"No object names were provided.";
|
||||
$rsp->{data}->[0] = "No object names were provided.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
}
|
||||
@ -1181,8 +1174,7 @@ sub processArgs
|
||||
if ($::opt_i && ($::command ne 'lsdef'))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-i\' option is only valid for the lsdef command.";
|
||||
$rsp->{data}->[0] = "The \'-i\' option is only valid for the lsdef command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 3;
|
||||
}
|
||||
@ -1267,8 +1259,7 @@ sub defmk
|
||||
|
||||
# error
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-p\' and \'-m\' options are not valid for the mkdef command.";
|
||||
$rsp->{data}->[0] = "The \'-p\' and \'-m\' options are not valid for the mkdef command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
&defmk_usage;
|
||||
return 1;
|
||||
@ -1277,8 +1268,7 @@ sub defmk
|
||||
if ($::opt_t && ($::opt_a || $::opt_z || $::opt_x))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot combine \'-t\' and \'-a\', \'-z\', or \'-x\' options.";
|
||||
$rsp->{data}->[0] = "Cannot combine \'-t\' and \'-a\', \'-z\', or \'-x\' options.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
&defmk_usage;
|
||||
return 1;
|
||||
@ -1358,8 +1348,7 @@ sub defmk
|
||||
if (!grep(/^$attr$/, @list) && ($::objtype ne 'site') && ($::objtype ne 'monitoring'))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\'$attr\' is not a valid attribute name for an object type of \'$::objtype\'.";
|
||||
$rsp->{data}->[0] = "\'$attr\' is not a valid attribute name for an object type of \'$::objtype\'.";
|
||||
$rsp->{data}->[1] = "Skipping to the next attribute.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
@ -1476,8 +1465,7 @@ sub defmk
|
||||
{
|
||||
$error = 1;
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not remove the definition for \'$obj\'.";
|
||||
$rsp->{data}->[0] = "Could not remove the definition for \'$obj\'.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
@ -1486,12 +1474,9 @@ sub defmk
|
||||
|
||||
# won't remove the old one unless the force option is used
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\nA definition for \'$obj\' already exists.";
|
||||
$rsp->{data}->[1] =
|
||||
"To remove the old definition and replace it with \na new definition use the force \'-f\' option.";
|
||||
$rsp->{data}->[2] =
|
||||
"To change the existing definition use the \'chdef\' command.";
|
||||
$rsp->{data}->[0] = "\nA definition for \'$obj\' already exists.";
|
||||
$rsp->{data}->[1] = "To remove the old definition and replace it with \na new definition use the force \'-f\' option.";
|
||||
$rsp->{data}->[2] = "To change the existing definition use the \'chdef\' command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
delete $::FINALATTRS{$obj};
|
||||
@ -1546,8 +1531,7 @@ sub defmk
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'where\' attributes and values were not provided for dynamic group \'$obj\'.";
|
||||
$rsp->{data}->[0] = "The \'where\' attributes and values were not provided for dynamic group \'$obj\'.";
|
||||
$rsp->{data}->[1] = "Skipping to the next group.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
next;
|
||||
@ -1561,8 +1545,7 @@ sub defmk
|
||||
if ($::opt_w && $::FINALATTRS{$obj}{members})
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot use a list of members together with the \'-w\' option.";
|
||||
$rsp->{data}->[0] = "Cannot use a list of members together with the \'-w\' option.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -1616,8 +1599,7 @@ sub defmk
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot determine a member list for group \'$obj\'.";
|
||||
$rsp->{data}->[0] = "Cannot determine a member list for group \'$obj\'.";
|
||||
xCAT::MsgUtils->message("W", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
@ -1701,8 +1683,7 @@ sub defmk
|
||||
if (($type eq "node") && (!defined($::FINALATTRS{$obj}{groups}) || !$::FINALATTRS{$obj}{groups}))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Attribute \'groups\' is not specified for node \'$obj\', skipping to the next node.";
|
||||
$rsp->{data}->[0] = "Attribute \'groups\' is not specified for node \'$obj\', skipping to the next node.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
next;
|
||||
@ -1737,8 +1718,7 @@ sub defmk
|
||||
if ($error)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"One or more errors occured when attempting to create or modify xCAT \nobject definitions.";
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -1749,8 +1729,7 @@ sub defmk
|
||||
|
||||
# give results
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The database was updated for the following objects:";
|
||||
$rsp->{data}->[0] = "The database was updated for the following objects:";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
|
||||
my $n = 1;
|
||||
@ -1765,8 +1744,7 @@ sub defmk
|
||||
{
|
||||
my $rsp;
|
||||
my $nodenum = scalar(keys %::FINALATTRS);
|
||||
$rsp->{data}->[0] =
|
||||
"$nodenum object definitions have been created or modified.";
|
||||
$rsp->{data}->[0] = "$nodenum object definitions have been created or modified.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
return 0;
|
||||
@ -1848,8 +1826,7 @@ sub defch
|
||||
|
||||
if (scalar (@::clobjnames) > 1) {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-n\' option (changing object name) can only work on one object.";
|
||||
$rsp->{data}->[0] = "The \'-n\' option (changing object name) can only work on one object.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
&defch_usage;
|
||||
return 1;
|
||||
@ -1860,8 +1837,7 @@ sub defch
|
||||
my @validnode = xCAT::DBobjUtils->getObjectsOfType($::clobjtypes[0]);
|
||||
if (! grep /^$::clobjnames[0]$/, @validnode) {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The $::clobjnames[0] is not a valid object.";
|
||||
$rsp->{data}->[0] = "The $::clobjnames[0] is not a valid object.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -1916,8 +1892,7 @@ sub defch
|
||||
|
||||
# error
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-f\' option is not valid for the chdef command.";
|
||||
$rsp->{data}->[0] = "The \'-f\' option is not valid for the chdef command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
&defch_usage;
|
||||
return 1;
|
||||
@ -1926,8 +1901,7 @@ sub defch
|
||||
if ($::opt_t && ($::opt_a || $::opt_z || $::opt_x))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot combine \'-t\' and \'-a\', \'-z\', or \'-x\' options.";
|
||||
$rsp->{data}->[0] = "Cannot combine \'-t\' and \'-a\', \'-z\', or \'-x\' options.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
&defch_usage;
|
||||
return 1;
|
||||
@ -2002,8 +1976,7 @@ sub defch
|
||||
if (!defined($list{$attr}) && ($::objtype ne 'site') && ($::objtype ne 'monitoring'))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\'$attr\' is not a valid attribute name for an object type of \'$::objtype\'.";
|
||||
$rsp->{data}->[0] = "\'$attr\' is not a valid attribute name for an object type of \'$::objtype\'.";
|
||||
$rsp->{data}->[1] = "Skipping to the next attribute.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
@ -2104,8 +2077,7 @@ sub defch
|
||||
|
||||
#error - cannot remove items from an object that does not exist.
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-m\' option is not valid since the \'$obj\' definition does not exist.";
|
||||
$rsp->{data}->[0] = "The \'-m\' option is not valid since the \'$obj\' definition does not exist.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
next;
|
||||
@ -2147,8 +2119,7 @@ sub defch
|
||||
if (!(%grphash))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not get xCAT object definitions.";
|
||||
$rsp->{data}->[0] = "Could not get xCAT object definitions.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
|
||||
@ -2203,8 +2174,7 @@ sub defch
|
||||
if ($::opt_w && $::FINALATTRS{$obj}{members})
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Cannot use a list of members together with the \'-w\' option.";
|
||||
$rsp->{data}->[0] = "Cannot use a list of members together with the \'-w\' option.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
next;
|
||||
@ -2297,8 +2267,7 @@ sub defch
|
||||
if (!$::FINALATTRS{$obj}{wherevals})
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'where\' attributes and values were not provided for dynamic group \'$obj\'.";
|
||||
$rsp->{data}->[0] = "The \'where\' attributes and values were not provided for dynamic group \'$obj\'.";
|
||||
$rsp->{data}->[1] = "Skipping to the next group.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
@ -2503,8 +2472,7 @@ sub defch
|
||||
if ($error)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"One or more errors occured when attempting to create or modify xCAT \nobject definitions.";
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to create or modify xCAT \nobject definitions.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -2517,8 +2485,7 @@ sub defch
|
||||
my $rsp;
|
||||
my $nodenum = scalar(keys %::FINALATTRS);
|
||||
if ($nodenum) {
|
||||
$rsp->{data}->[0] =
|
||||
"The database was updated for the following objects:";
|
||||
$rsp->{data}->[0] = "The database was updated for the following objects:";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
|
||||
my $n = 1;
|
||||
@ -2528,8 +2495,7 @@ sub defch
|
||||
$n++;
|
||||
}
|
||||
} else {
|
||||
$rsp->{data}->[0] =
|
||||
"No database was updated";
|
||||
$rsp->{data}->[0] = "No database was updated";
|
||||
}
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
@ -2538,11 +2504,9 @@ sub defch
|
||||
my $rsp;
|
||||
my $nodenum = scalar(keys %::FINALATTRS);
|
||||
if ($nodenum) {
|
||||
$rsp->{data}->[0] =
|
||||
"$nodenum object definitions have been created or modified.";
|
||||
$rsp->{data}->[0] = "$nodenum object definitions have been created or modified.";
|
||||
} else {
|
||||
$rsp->{data}->[0] =
|
||||
"No object definitions have been created or modified.";
|
||||
$rsp->{data}->[0] = "No object definitions have been created or modified.";
|
||||
}
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
if (scalar(keys %newobjects) > 0)
|
||||
@ -2656,8 +2620,7 @@ sub setFINALattrs
|
||||
{
|
||||
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\'$attr\' is not a valid attribute name for an object type of \'$::objtype\'.";
|
||||
$rsp->{data}->[0] = "\'$attr\' is not a valid attribute name for an object type of \'$::objtype\'.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
next;
|
||||
@ -2955,8 +2918,7 @@ sub defls
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not get objects of type \'$t\'.";
|
||||
$rsp->{data}->[0] = "Could not get objects of type \'$t\'.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
@ -3184,8 +3146,7 @@ sub defls
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Missing attributes for node $obj, check the node attributes \'os\', \'arch\',\'profile\' and \'provmethod\'.";
|
||||
$rsp->{data}->[0] = "Missing attributes for node $obj, check the node attributes \'os\', \'arch\',\'profile\' and \'provmethod\'.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -3351,8 +3312,7 @@ sub defls
|
||||
if ($numobjects == 0)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not find any object definitions to display.";
|
||||
$rsp->{data}->[0] = "Could not find any object definitions to display.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
return 0;
|
||||
}
|
||||
@ -3363,8 +3323,7 @@ sub defls
|
||||
my $listtab = xCAT::Table->new( 'nodelist' );
|
||||
if (!$listtab) {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not open nodelist table.";
|
||||
$rsp->{data}->[0] = "Could not open nodelist table.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -3397,8 +3356,7 @@ sub defls
|
||||
unless (@allobjoftype)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not find any objects of type \'$type\'.";
|
||||
$rsp->{data}->[0] = "Could not find any objects of type \'$type\'.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -3423,8 +3381,7 @@ sub defls
|
||||
}
|
||||
} else {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\'$attr\' is not a valid attribute name for an object type of \'$type\'.";
|
||||
$rsp->{data}->[0] = "\'$attr\' is not a valid attribute name for an object type of \'$type\'.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -3471,8 +3428,7 @@ sub defls
|
||||
if (!grep(/^$obj$/, @allobjoftype))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not find an object named \'$obj\' of type \'$type\'.";
|
||||
$rsp->{data}->[0] = "Could not find an object named \'$obj\' of type \'$type\'.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -3707,8 +3663,7 @@ sub defls
|
||||
# }
|
||||
#}else {
|
||||
# my $rsp;
|
||||
# $rsp->{data}->[0] =
|
||||
# "Could not open nodelist table.";
|
||||
# $rsp->{data}->[0] = "Could not open nodelist table.";
|
||||
# xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
#}
|
||||
|
||||
@ -3778,8 +3733,7 @@ sub defrm
|
||||
if ($::opt_a && !$::opt_f)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"You must use the \'-f\' option when using the \'-a\' option.";
|
||||
$rsp->{data}->[0] = "You must use the \'-f\' option when using the \'-a\' option.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
&defrm_usage;
|
||||
return 1;
|
||||
@ -3825,8 +3779,7 @@ sub defrm
|
||||
if ($::opt_w)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"The \'-w\' option is not supported for the rmdef command.";
|
||||
$rsp->{data}->[0] = "The \'-w\' option is not supported for the rmdef command.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
$error = 1;
|
||||
return 1;
|
||||
@ -3889,8 +3842,7 @@ sub defrm
|
||||
if (!(%grphash))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not get xCAT object definition for \'$obj\'.";
|
||||
$rsp->{data}->[0] = "Could not get xCAT object definition for \'$obj\'.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -3929,8 +3881,7 @@ sub defrm
|
||||
my $rsp;
|
||||
my @nodes = keys %nhash;
|
||||
my $m = join ',', @nodes;
|
||||
$rsp->{data}->[0] =
|
||||
"Could not get xCAT object definition for \'$m\'.";
|
||||
$rsp->{data}->[0] = "Could not get xCAT object definition for \'$m\'.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
next;
|
||||
}
|
||||
@ -4003,8 +3954,7 @@ sub defrm
|
||||
if ($error)
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"One or more errors occured when attempting to remove xCAT object definitions.";
|
||||
$rsp->{data}->[0] = "One or more errors occured when attempting to remove xCAT object definitions.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
return 1;
|
||||
}
|
||||
@ -4039,8 +3989,7 @@ sub defrm
|
||||
for my $tn (keys %objhash) {
|
||||
if ( $childrenhash{$tn} ) {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"You have removed a $typehash{$tn} node, please remove these nodes belongs to it manually: $childrenhash{$tn} .";
|
||||
$rsp->{data}->[0] = "You have removed a $typehash{$tn} node, please remove these nodes belongs to it manually: $childrenhash{$tn} .";
|
||||
xCAT::MsgUtils->message("W", $rsp, $::callback);
|
||||
}
|
||||
}
|
||||
@ -4048,8 +3997,7 @@ sub defrm
|
||||
else
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"No objects have been removed from the xCAT database.";
|
||||
$rsp->{data}->[0] = "No objects have been removed from the xCAT database.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $::callback);
|
||||
}
|
||||
return 0;
|
||||
@ -4079,17 +4027,12 @@ sub defrm
|
||||
sub defmk_usage
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\nUsage: mkdef - Create xCAT data object definitions.\n";
|
||||
$rsp->{data}->[0] = "\nUsage: mkdef - Create xCAT data object definitions.\n";
|
||||
$rsp->{data}->[1] = " mkdef [-h | --help ] [-t object-types]\n";
|
||||
$rsp->{data}->[2] =
|
||||
" mkdef [-V | --verbose] [-t object-types] [-o object-names] [-z|--stanza ]";
|
||||
$rsp->{data}->[3] =
|
||||
" [-d | --dynamic] [-w attr==val [-w attr=~val] ...]";
|
||||
$rsp->{data}->[4] =
|
||||
" [-f | --force] [noderange] [attr=val [attr=val...]]";
|
||||
$rsp->{data}->[5] =
|
||||
"\nThe following data object types are supported by xCAT.\n";
|
||||
$rsp->{data}->[2] = " mkdef [-V | --verbose] [-t object-types] [-o object-names] [-z|--stanza ]";
|
||||
$rsp->{data}->[3] = " [-d | --dynamic] [-w attr==val [-w attr=~val] ...]";
|
||||
$rsp->{data}->[4] = " [-f | --force] [noderange] [attr=val [attr=val...]]";
|
||||
$rsp->{data}->[5] = "\nThe following data object types are supported by xCAT.\n";
|
||||
my $n = 6;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
@ -4126,18 +4069,13 @@ sub defmk_usage
|
||||
sub defch_usage
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\nUsage: chdef - Change xCAT data object definitions.\n";
|
||||
$rsp->{data}->[0] = "\nUsage: chdef - Change xCAT data object definitions.\n";
|
||||
$rsp->{data}->[1] = " chdef [-h | --help ] [-t object-types]\n";
|
||||
$rsp->{data}->[2] = " chdef [-t object-types] [-o object-names] [-n new-name] [node]\n";
|
||||
$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}->[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";
|
||||
my $n = 7;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
@ -4176,14 +4114,10 @@ sub defls_usage
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "\nUsage: lsdef - List xCAT data object definitions.\n";
|
||||
$rsp->{data}->[1] = " lsdef [-h | --help ] [-t object-types]\n";
|
||||
$rsp->{data}->[2] =
|
||||
" lsdef [-V | --verbose] [-t object-types] [-o object-names]";
|
||||
$rsp->{data}->[3] =
|
||||
" [ -l | --long] [-s | --short] [-a | --all] [-z | --stanza ] [-S]";
|
||||
$rsp->{data}->[4] =
|
||||
" [-i attr-list] [-w attr==val [-w attr=~val] ...] [noderange]\n";
|
||||
$rsp->{data}->[5] =
|
||||
"\nThe following data object types are supported by xCAT.\n";
|
||||
$rsp->{data}->[2] = " lsdef [-V | --verbose] [-t object-types] [-o object-names]";
|
||||
$rsp->{data}->[3] = " [ -l | --long] [-s | --short] [-a | --all] [-z | --stanza ] [-S]";
|
||||
$rsp->{data}->[4] = " [-i attr-list] [-w attr==val [-w attr=~val] ...] [noderange]\n";
|
||||
$rsp->{data}->[5] = "\nThe following data object types are supported by xCAT.\n";
|
||||
my $n = 6;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
@ -4220,15 +4154,11 @@ sub defls_usage
|
||||
sub defrm_usage
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"\nUsage: rmdef - Remove xCAT data object definitions.\n";
|
||||
$rsp->{data}->[0] = "\nUsage: rmdef - Remove xCAT data object definitions.\n";
|
||||
$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] [-w attr=val,[attr=val...] [noderange]\n";
|
||||
$rsp->{data}->[4] =
|
||||
"\nThe following data object types are supported by xCAT.\n";
|
||||
$rsp->{data}->[2] = " rmdef [-V | --verbose] [-t object-types] [-a | --all] [-f | --force]";
|
||||
$rsp->{data}->[3] = " [-o object-names] [-w attr=val,[attr=val...] [noderange]\n";
|
||||
$rsp->{data}->[4] = "\nThe following data object types are supported by xCAT.\n";
|
||||
my $n = 5;
|
||||
|
||||
foreach my $t (sort(keys %{xCAT::Schema::defspec}))
|
||||
|
Reference in New Issue
Block a user