2007-12-05 14:13:34 +00:00
=head1 NAME
2008-05-28 21:07:33 +00:00
2007-12-05 14:13:34 +00:00
B<chdef> - Change xCAT data object definitions.
2008-05-28 21:07:33 +00:00
2007-12-05 14:13:34 +00:00
=head1 SYNOPSIS
2008-05-28 21:07:33 +00:00
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>]
2008-06-13 11:48:09 +00:00
[B<-p>|B<--plus>] [B<-m>|B<--minus>] [B<-z>|B<--stanza>]
2008-05-28 21:07:33 +00:00
[B<-w> I<attr>=I<val>,[I<attr>=I<val...>]] [I<noderange>] [I<attr>=I<val> [I<attr>=I<val...>]]
2007-12-05 14:13:34 +00:00
=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
2008-05-28 21:07:33 +00:00
=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.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item B<-p|--plus>
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
This option will add the specified values to the existing value of the attribute. It will create a comma-separated list of values.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item B<-t> I<object-types>
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
A set of comma delimited object types. Use the help option to get a list of valid object types.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item B<-V|--verbose>
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
Verbose mode.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item B<-w> I<attr=val,[attr=val...]>
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
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.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item B<-z|--stanza>
2008-06-13 11:48:09 +00:00
Indicates that the file being piped to the command is in stanza format. See the xcatstanzafile man page for details on using xCAT stanza files.
2008-05-28 21:07:33 +00:00
=back
2007-12-05 14:13:34 +00:00
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
2008-05-28 21:07:33 +00:00
=over 3
=item 1.
To change a site definition.
chdef -t site -o clustersite rsh=/bin/rsh rcp=/bin/rcp installdir=/xcatinstall
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item 2.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
To change a basic node definition.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
chdef -t node -o node01 groups="all,aix"
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
(The group definitions are also created if they don't already exist.)
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item 3.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
To add another group to the "groups" attribute in the previous example.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
chdef -p -t node -o node01 groups="compute"
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item 4.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
To remove the "all" group from the "groups" attribute in the previous example.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
chdef -m -t node -o node01 groups="all"
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
=item 5.
2007-12-05 14:13:34 +00:00
2008-05-28 21:07:33 +00:00
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
2007-12-05 14:13:34 +00:00
=head1 FILES
2008-05-28 21:07:33 +00:00
2008-02-05 12:43:44 +00:00
$XCATROOT/bin/chdef
(The XCATROOT environment variable is set when xCAT is installed. The
default value is "/opt/xcat".)
2007-12-05 14:13:34 +00:00
=head1 NOTES
This command is part of the xCAT software product.
=head1 SEE ALSO
2008-05-28 21:07:33 +00:00
See the mkdef(1), lsdef(1), rmdef(1), and xcatstanzafile(5) commands.