xcat-core/xCAT-client-2.0/pods/man1/chdef.1.pod

133 lines
3.2 KiB
Plaintext
Raw Normal View History

=head1 NAME
B<chdef> - Change xCAT data object definitions.
=head1 SYNOPSIS
B<chdef> [B<-h>|B<--help>] [B<-t> I<object-types>]
B<chdef> [B<-V>|B<--verbose>] [B<-t> I<object-types>] [B<-o> I<object-names>]
[B<-p>|B<--plus>] [B<-m>|B<--minus>] [B<-z>|B<--stanza>] [B<-x>|B<--xml>]
[B<-w> I<attr>=I<val>,[I<attr>=I<val...>]] [I<noderange>] [I<attr>=I<val> [I<attr>=I<val...>]]
=head1 DESCRIPTION
This command is used to change xCAT object definitions which are stored in the xCAT database. The default is to replace any existing attribute value with the one specified on the command line. The command will also create a new definition if one doesn't exist.
=head1 OPTIONS
=over 10
=item I<attr=val [attr=val ...]>
Specifies one or more "attribute equals value" pairs, separated by spaces. Attr=val pairs must be specified last on the command line. Use the help option to get a list of valid attributes for each object type.
=item B<-h|--help>
Display usage message.
=item B<-m|--minus>
If the value of the attribute is a list then this option may be used to remove one or more items from the list.
=item I<noderange>
A set of comma delimited node names and/or group names. (must be the first parameter) See the "noderange" man page for details on supported formats.
=item B<-o> I<object-names>
A set of comma delimited object names.
=item B<-p|--plus>
This option will add the specified values to the existing value of the attribute. It will create a comma-separated list of values.
=item B<-t> I<object-types>
A set of comma delimited object types. Use the help option to get a list of valid object types.
=item B<-V|--verbose>
Verbose mode.
=item B<-w> I<attr=val,[attr=val...]>
A comma-separated list of attributes and values that can be used to select objects. Use the help option to get a list of validattributes for each object type.
=item B<-x|--xml>
Indicates that the file being piped to the command is in XML format.
=item B<-z|--stanza>
Indicates that the file being piped to the command is in stanza format.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
=over 3
=item 1.
To change a site definition.
chdef -t site -o clustersite rsh=/bin/rsh rcp=/bin/rcp installdir=/xcatinstall
=item 2.
To change a basic node definition.
chdef -t node -o node01 groups="all,aix"
(The group definitions are also created if they don't already exist.)
=item 3.
To add another group to the "groups" attribute in the previous example.
chdef -p -t node -o node01 groups="compute"
=item 4.
To remove the "all" group from the "groups" attribute in the previous example.
chdef -m -t node -o node01 groups="all"
=item 5.
To replace the current "groups" attribute value of "node01".
chdef -t node -o node01 groups="linux"
=item 6.
To add "node01" to the "memberslist" attribute of a group definition called "LinuxNodes".
chdef -p -t group -o LinuxNodes memberlist="node01"
=back
=head1 FILES
$XCATROOT/bin/chdef
(The XCATROOT environment variable is set when xCAT is installed. The
default value is "/opt/xcat".)
=head1 NOTES
This command is part of the xCAT software product.
=head1 SEE ALSO
See the mkdef(1), lsdef(1), rmdef(1), and xcatstanzafile(5) commands.