TargetGroup command group for the AdminTask object using wsadmin scripting (deprecated)
You can use the Jython scripting language to configure target groups with the wsadmin tool. Use the commands and parameters in the TargetGroup command group to create and manage target groups. Create target groups to submit jobs from the job manager to one or many targets. Commands in the TargetGroup command group provide function that replaces deprecated commands in the ManagedNodeGroup command group.
addMemberToTargetGroup
The addMemberToTargetGroup command adds a target to an existing target group.
Target object
None.
Required parameters
- -groupName
- Specifies the name of the target group of interest. (String, required)
- -targetNameList
- Specifies a list of target names to add to the target group of interest. (String [ ], required)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.addMemberToTargetGroup('-groupName myNewGroup -targetNameList "[target1 target2 target3]"')
- Using Jython list:
AdminTask.addMemberToTargetGroup(['-groupName', 'myNewGroup', '-targetNameList', '[target1 target2 target3]'])
Interactive mode example usage
- Using Jython:
AdminTask.addMemberToTargetGroup('-interactive')
createTargetGroup
The createTargetGroup command creates a new target group.
Target object
None.
Required parameters
- -groupName
- Specifies the name of the target group of interest. (String, required)
Optional parameters
- -description
- Specifies a description of the target group. (String, optional)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.createTargetGroup('-groupName myNewGroup')
- Using Jython list:
AdminTask.createTargetGroup(['-groupName', 'myNewGroup'])
Interactive mode example usage
- Using Jython:
AdminTask.createTargetGroup('-interactive')
deleteMemberFromTargetGroup
The deleteMemberFromTargetGroup command removes a target from a specific target group.
Target object
None.
Required parameters
- -groupName
- Specifies the name of the target group of interest. (String, required)
- -targetNameList
- Specifies a list of target Unique Uniform Identifiers (UUID) to delete from the target group of interest. (String [ ], required)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.deleteMemberFromTargetGroup('-groupName myNewGroup -targetNameList "[dmgr1 dmgr2]"')
- Using Jython list:
AdminTask.deleteMemberFromTargetGroup(['-groupName', 'myNewGroup', '-targetNameList', '[target1 target2]'])
Interactive mode example usage
- Using Jython:
AdminTask.deleteMemberFromTargetGroup('-interactive')
deleteTargetGroup
The deleteTargetGroup command deletes a target group from your configuration.
Target object
None.
Required parameters
- -groupNameList
- Specifies a list of target groups to delete. (String [ ], required)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.deleteTargetGroup('-groupNameList "[target1 target2 target3]"')
- Using Jython list:
AdminTask.deleteTargetGroup(['-groupNameList', '[target1 target2 target3]'])
Interactive mode example usage
- Using Jython:
AdminTask.deleteTargetGroup('-interactive')
getTargetGroupMembers
The getTargetGroupMembers command displays the targets that belong to a specific target group.
Target object
None.
Required parameters
- -groupName
- Specifies the name of the target group of interest. (String, required)
Return value
The command returns a list of target UUIDs that belong to the target group of interest.
Batch mode example usage
- Using Jython string:
AdminTask.getTargetGroupMembers('-groupName myNewGroup')
- Using Jython list:
AdminTask.getTargetGroupMembers(['-groupName', 'myNewGroup'])
Interactive mode example usage
- Using Jython:
AdminTask.getTargetGroupMembers('-interactive')
getTargetGroupInfo
The getTargetGroupInfo command displays configuration information for the target group of interest.
Target object
None.
Required parameters
- -groupName
- Specifies the name of one or more target groups of interest. (String [ ], required)
Return value
The command returns a list of attributes for each target group. Each list of attributes displays the name, size, and description of the target group, and whether all group members have an administrative agent.
Batch mode example usage
- Using Jython string:
AdminTask.getTargetGroupInfo('-groupName "[target1 target2 target3]"')
- Using Jython list:
AdminTask.getTargetGroupInfo(['-groupName', '[target1 target2 target3]'])
Interactive mode example usage
- Using Jython:
AdminTask.getTargetGroupInfo('-interactive')
queryTargetGroups
The queryTargetGroups command displays each target group in your configuration that meets specific query criteria.
Target object
None.
Required parameters
- -maxReturn
- Specifies the maximum size of the target group data to display.
Optional parameters
- -query
- Specifies the settings for which the command queries the target groups. You can query for
size
,description
,groupName
, andjobType
. (String, optional) - -validate
- Specifies whether to validate the query string. (Boolean, optional)
Return value
The command returns a list of target group names.
Batch mode example usage
- Using Jython string:
AdminTask.queryTargetGroups('-maxReturn 10 -query "size=2" -validate true')
- Using Jython list:
AdminTask.queryTargetGroups(['-maxReturn', '10', '-query', 'size=2', '-validate', 'true'])
Interactive mode example usage
- Using Jython:
AdminTask.queryTargetGroups('-interactive')
modifyTargetGroupInfo
The modifyTargetGroupInfo command modifies the description for a target group.
Target object
None.
Required parameters
- -groupName
- Specifies the name of the target group of interest. (String, required)
- -description
- Specifies a new description for the target group of interest. (String, required)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.modifyTargetGroupInfo('-groupName myNewGroup -description "New description of myNewGroup"')
- Using Jython list:
AdminTask.modifyTargetGroupInfo(['-groupName', 'myNewGroup', '-description', 'New description of myNewGroup'])
Interactive mode example usage
- Using Jython:
AdminTask.modifyTargetGroupInfo('-interactive')