modifydeptgroupviafile
Use the modifydeptgroupviafile command to modify an existing department by using an input file. You can add and remove members by specifying the member type (deptgroup, appgroup) and identifiers or by using a member type with a -tagkey and -tagvalue pair.
- To select resources that match all of the specified tags, the -tagkey and -tagvalue parameters
must be specified in this format:
For example, to select the resources that have-tagkey udp1 udp2 -tagvalue value1 value2udp1set toUSandudp2set toWestspecify:-tagkey udp1 udp2 -tagvalue US West - To select resources that match at least one of the specified tags,
the -tagkey and -tagvalue parameters
must be specified in this format:
For example, to select resources that have-tagkey udp1 -tagvalue value1 -tagkey udp2 -tagvalue value2udp1set toUSorudp2set toWestspecify:-tagkey udp1 -tagvalue US -tagkey udp2 -tagvalue West
Syntax
Parameters and arguments
- -user user_name
- Specifies an IBM Spectrum Controlâ„¢ user ID.
- -pwd password
- Specifies the password for the IBM Spectrum Control user ID.
- -url url
- Specifies the Device server. The format of the URL is system:port_number, where system represents either the host name or IP address, and port_number represents the IBM Spectrum Control Device server port.
- -inputfile inputfilename
- Indicates the name of the input file that is used to parse the input file from the CLI program.
-id <deptgroupname> -add -id <deptgroupname> -remove Then,
the input file specifies the type and identifiers of the members for
the department. -memberid /Department/5044 /Department/5045-memberid /Department/5044,/Department/5045- -id DepartmentGroupID
- Indicates the unique ID of the department where the member is added or removed. Use the lsdeptgroup command, to view a list of the departments that are known to IBM Spectrum Control.
- -type deptgroup|appgroup
- Specifies that the entities are a department or application. The -memberid parameter
specifies the unique names of the departments or applications to be
added or removed from the department, which is specified by the-id parameter.
For example:
-type deptgroup -memberid /Department/5045, /Department/5046, /Department/5047....-type appgroup -memberid /Application/5050, /Application/5051, /Application/5052....When you are using the -tagkey and -tagvalue member pair:-type deptgroup -tagkey <tag_key> -tagvalue <tag_value> - -memberid MemberID of the type
- The unique ID of the member being added or removed. Use the lsdeptgroup command, to view a list of the departments that are known to IBM Spectrum Control. Use the lsappgroup command to view the list of applications.
- -tagkey udp1 or udp2 or udp3
- Specifies the -tagkey parameter that is used to add or remove department members, with an input file.
- -tagvalue tagvalue
- Specifies the -tagvalue parameter that is
used to add or remove department members, with an input file.When you are using the -tagkey and -tagvalue member pair:
-type deptgroup -tagkey <tag_key> -tagvalue <tag_value>
Example: Modifying department members by using an input file
tpctool
tpctool> modifydeptgroupviafile -inputfile testModifyDeptGroup04.txt
tpctool>If the command successfully completes, no message is displayed.
If some members are not found in the IBM Spectrum Control database, a warning message is displayed:
tpctool> modifydeptgroupviafile -inputfile testModifyDeptGroup04.txt
HWNDA0048W The following entities were not found: /Department/5041,
/Department/5044, /Department/7044,..
tpctool>Example: Adding and removing members from a department by using an input file
If you want to add and remove members
from the deptgroup1 department , specify two -deptgroupname stanzas,
one with the -add parameter and the other with
the -remove parameter, followed by any other
parameters. For example:
-id /Department/5041 -add
-type deptgroup -memberid /Department/6000, /Department/6001, /Department/6002
-type appgroup -memberid /Application/7000, /Application/7001, /Application/7002
-remove
-type deptgroup -memberid /Department/6000, /Department/6001, /Department/6002Example: Adding and removing members from multiple departments by using an input file
To include more than
one department, use multiple -id stanzas followed
by other parameters. The same parameter can be used again for each -id stanza.
For example:
-id /Department/5041 -add
-type appgroup -memberid /Application/7004, /Application/7005, /Application/7006,
/Application/7007, /Application/7008, /Application/7009
-id /Department/5044 -remove
-type appgroup -memberid /Application/7004, /Application/7005, /Application/7006,
/Application/7007, /Application/7008, /Application/7009
-id /Department/7044 -add
-type deptgroup -memberid /Department/6000, /Department/6001, /Department/6002,
/Department/6003, /Department/6004, /Department/6005
Example: Adding and removing members from an department by using an input file with tags
-id /Department/9003 -add
-type deptgroup -tagkey udp1 -tagvalue TPCDeptGroup
-type appgroup -tagkey udp1 -tagvalue TPCAppGroup