NodeGroupCommands using wsadmin.sh
Use the Jython or Jacl scripting languages to manage servers with the wsadmin tool. The commands in the NodeGroupCommands group can be used to manage node groups and node group members.
(ZOS) The location service daemon configuration is saved in the node group properties.
The NodeGroupCommands commands include:
- addNodeGroupMember
- createNodeGroup
- createNodeGroupProperty
- listNodeGroupProperties
- listNodeGroups
- listNodes
- modifyNodeGroup
- modifyNodeGroupProperty
- removeNodeGroup
- removeNodeGroupMember
- removeNodeGroupProperty
addNodeGroupMember
Add a member to a node group. Nodes can be members of more than one node group. The command does validity checking to ensure the following:
- Distributed and z/OS nodes are not combined in the same node group.
- z/OS platform from different sysplexs are not combined into the same node group.
Target object: The target object is the node group where the member will be created. This target object is required.
Parameters and return values
- -nodeName
- The name of the node to add to a node group. Required.
Examples
Batch mode example usage:
- Jacl:
$AdminTask addNodeGroupMember WBINodeGroup {-nodeName WBINode}
- Jython string:
AdminTask.addNodeGroupMember('WBINodeGroup', '[-nodeName WBINode]')
- Jython list:
AdminTask.addNodeGroupMember('WBINodeGroup', ['-nodeName', 'WBINode'])
Interactive mode example usage:
- Jacl:
$AdminTask addNodeGroupMember {-interactive}
- Jython string:
AdminTask.addNodeGroupMember ('[-interactive]')
- Jython list:
AdminTask.addNodeGroupMember (['-interactive'])
createNodeGroup
Create a new node group. A node group consists of a group of nodes that are referred to as node group members. Optionally, we can create a short name and a description for the new node group. Target object: The node group name to be created. This target object is required.Parameters and return values
- -shortName
- The short name of the node group. Optional.
- -description
- The description of the node group. Optional.
Examples
Batch mode example usage:
- Jacl:
$AdminTask createNodeGroup WBINodeGroup
- Jython string:
AdminTask.createNodeGroup('WBINodeGroup')
- Jython list:
AdminTask.createNodeGroup('WBINodeGroup')
Interactive mode example usage:
- Jacl:
$AdminTask createNodeGroup {-interactive}
- Jython string:
AdminTask.createNodeGroup ('[-interactive]')
- Jython list:
AdminTask.createNodeGroup (['-interactive'])
createNodeGroupProperty
Create custom properties for a node group.Target object: The name of the node group. This target object is required.
Parameters and return values
- -name
- The name of the custom property to create. Required.
- -value
- The value of the custom property. Optional.
- -description
- The description of the custom property. Optional.
Examples
Batch mode example usage:
- Jacl:
$AdminTask createNodeGroupProperty WBINodeGroup {-name Channel -value "channel1"}
- Jython string:
AdminTask.createNodeGroupProperty('WBINodeGroup', '[-name Channel -value channel1]')
- Jython list:
AdminTask.createNodeGroupProperty('WBINodeGroup', ['-name', 'Channel', '-value', 'channel1'])
Interactive mode example usage:
- Jacl:
$AdminTask createNodeGroupProperty {-interactive}
- Jython string:
AdminTask.createNodeGroupProperty ('[-interactive]')
- Jython list:
AdminTask.createNodeGroupProperty (['-interactive'])
listNodeGroupProperties
Display all of the custom properties of a node group.Target object: The target object is name of the node group. This target object is required.
Parameters and return values
- Parameters: None
- Returns: A list of all of the custom properties of a node group.
Examples
Batch mode example usage:
- Jacl:
$AdminTask listNodeGroupProperties WBINodeGroup
- Jython string:
AdminTask.listNodeGroupProperties('WBINodeGroup')
- Jython list:
AdminTask.listNodeGroupProperties('WBINodeGroup')
Interactive mode example usage:
- Jacl:
$AdminTask listNodeGroupProperties {-interactive}
- Jython string:
AdminTask.listNodeGroupProperties ('[-interactive]')
- Jython list:
AdminTask.listNodeGroupProperties (['-interactive'])
listNodeGroups
Return the list of node groups from the configuration repository. We can pass an optional node name to the command that returns the list of node groups where the node resides.Target object: The target object is name of the node. This target object is optional.
Parameters and return values
- Parameters: None
- Returns: A list of the node groups in the cell.
Examples
Batch mode example usage:
- Jacl:
$AdminTask listNodeGroups
$AdminTask listNodeGroups nodeName
- Jython string:
AdminTask.listNodeGroups
AdminTask.listNodeGroups('nodeName')
- Jython list:
AdminTask.listNodeGroups
AdminTask.listNodeGroups('nodeName')
Interactive mode example usage:
- Jacl:
$AdminTask listNodeGroups {-interactive}
- Jython string:
AdminTask.listNodeGroups ('[-interactive]')
- Jython list:
AdminTask.listNodeGroups (['-interactive'])
listNodes
Display all of the nodes in the cell or on a given node group.Target object: None
Parameters and return values
- Parameters:
- - nodeGroup
- The name of the node group. Optional.
- Returns: A list of all the nodes in the cell or on a given node group.
Examples
Batch mode example usage:
- Jacl:
$AdminTask listNodes {-nodeGroup node_group_name}
- Jython string:
AdminTask.listNodes('[-nodeGroup node_group_name]')
- Jython list:
AdminTask.listNodes(['-nodeGroup', 'node_group_name' 'node', 'group'])
Interactive mode example usage:
- Jacl:
$AdminTask listNodes {-interactive}
- Jython string:
AdminTask.listNodes ('[-interactive]')
- Jython list:
AdminTask.listNodes (['-interactive'])
modifyNodeGroup
Modify the configuration of a node group. The node group name cannot be changed. However, its short name and description are supported. Also, its node membership can be modified.Target object: The target object is the node group name. This target object is required.
Parameters and return values
- -shortName
- The short name of the node group. Optional.
- -description
- The description of the node group. Optional.
Examples
Batch mode example usage:
- Jacl:
$AdminTask modifyNodeGroup WBINodeGroup {-shortName WBIGroup -description "Default node group"}
- Jython string:
AdminTask.modifyNodeGroup WBINodeGroup ('[-shortName WBIGroup -description "WBI" node group]')
- Jython list:
AdminTask.modifyNodeGroup WBINodeGroup (['-shortName', 'WBIGroup', '-description', "WBI", 'node', 'group'])
Interactive mode example usage:
- Jacl:
$AdminTask modifyNodeGroup {-interactive}
- Jython string:
AdminTask.modifyNodeGroup ('[-interactive]')
- Jython list:
AdminTask.modifyNodeGroup (['-interactive'])
modifyNodeGroupProperty
Modify custom properties for a node groupTarget object: The name of the node group. This target object is required.
Parameters and return values
- -name
- The name of the custom property to modify. Required.
- -value
- The value of the custom property. Optional.
- -description
- The description of the custom property. Optional.
Examples
Batch mode example usage:
- Jacl:
$AdminTask modifyNodeGroupProperty WBINodeGroup {-name Channel -value "channel1"}
- Jython string:
AdminTask.modifyNodeGroupProperty('WBINodeGroup', '[-name Channel -value channel1]')
- Jython list:
AdminTask.modifyNodeGroupProperty('WBINodeGroup', ['-name', 'Channel', '-value', 'channel1'])
Interactive mode example usage:
- Jacl:
$AdminTask modifyNodeGroupProperty {-interactive}
- Jython string:
AdminTask.modifyNodeGroupProperty ('[-interactive]')
- Jython list:
AdminTask.modifyNodeGroupProperty (['-interactive'])
removeNodeGroup
Remove the configuration of a node group. We can remove a node group if it does not contain any members. Also, the default node group cannot be removed.Target object: The name of the node group to be removed. This target object is required.
Parameters and return values
- Parameters: None
- Returns: The node group object ID.
Examples
Batch mode example usage:
- Jacl:
$AdminTask removeNodeGroup WBINodeGroup
- Jython string:
AdminTask.removeNodeGroup('WBINodeGroup')
- Jython list:
AdminTask.removeNodeGroup('WBINodeGroup')
Interactive mode example usage:
- Jacl:
$AdminTask removeNodeGroup {-interactive}
- Jython string:
AdminTask.removeNodeGroup ('[-interactive]')
- Jython list:
AdminTask.removeNodeGroup (['-interactive'])
removeNodeGroupMember
Remove the configuration of a node group member.
- A node must always be a member of at least one node group.
- We cannot remove a node from a node group that is part of a cluster in that node group.
- For the z/OS platform, we cannot remove nodes from sysplex node groups.
Target object: The target object is the node group containing the member to be removed. This target object is required.
Parameters and return values
- -nodeName
- The name of the node to remove from a node group. This parameter is required.
Examples
Batch mode example usage:
- Jacl:
$AdminTask removeNodeGroupMember WBINodeGroup {-nodeName WBINode}
- Jython string:
AdminTask.removeNodeGroupMember('WBINodeGroup', '[-nodeName WBINode]')
- Jython list:
AdminTask.removeNodeGroupMember('WBINodeGroup', ['-nodeName', 'WBINode'])
Interactive mode example usage:
- Jacl:
$AdminTask removeNodeGroupMember {-interactive}
- Jython string:
AdminTask.removeNodeGroupMember ('[-interactive]')
- Jython list:
AdminTask.removeNodeGroupMember (['-interactive'])
removeNodeGroupProperty
Remove custom properties of a node group.Target object: The name of the node group. This target object is required.
Parameters and return values
- -name
- The name of the custom property to remove. Required.
Examples
Batch mode example usage:
- Jacl:
$AdminTask removeNodeGroupProperty WBINodeGroup {-name Channel}
- Jython string:
AdminTask.removeNodeGroupProperty('WBINodeGroup', '[-name Channel]')
- Jython list:
AdminTask.removeNodeGroupProperty('WBINodeGroup', ['-name', 'Channel'])
Interactive mode example usage:
- Jacl:
$AdminTask removeNodeGroupProperty {-interactive}
- Jython string:
AdminTask.removeNodeGroupProperty ('[-interactive]')
- Jython list:
AdminTask.removeNodeGroupProperty (['-interactive'])
wsadmin AdminTask Commands for the AdminTask object