rmrgmbr

Name

rmrgmbr - Removes one or more resources from their resource group.

Synopsis

rmrgmbr [-h] [-i] [-T] [-V] -g Resource_group

rmrgmbr [-h] [-i] -s [-T] [-V] [-g Resource_group] "selection string"

rmrgmbr [-h] [-i] -s [-T] [-V] [-g Resource_group] Resource_class:"selection_string" [Resource_class:"selection_string" [...]]

rmrgmbr [-h] [-i] [-T] [-V] [-g Resource_group] Resource_class:Resource_name [:Node][,Resource_name[:Node[,...]] [Resource_class:Resource_name [:Node][,Resource_name[:Node][,...]] [...]]

Description

The rmrgmbr command removes all the member resources of the specified resource group, only the specified member resources of the specified resource group, or the member resources that match the selection string. System Automation for Multiplatforms ensures that the associated relationship and equivalency are also updated, if possible. When the selection string is the only parameter, then it is applied directly to the IBM.ManagedResource class.

A resource name or selection string must be specified with the resource class to which it belongs. The user must input the resource class, resource name, and the node number or name if it is a fixed resource. The resource class and the resource name, the resource name and the node must be separated by a colon.

Options

-h
Writes the command's usage statement to standard output.
-i
Interactive. Prompt before removing relationships.
-g Resource_group
Specifies the unique name of the resource group from which the member resources are to be removed.
-s
Specifies that a selection string will be used instead of the resource name.
-T
Writes the command's trace messages to standard error. For your software-service organization's use only.
-V
Writes the command's verbose messages to standard output.

Parameters

Resource_class
Specifies the name of the resource class to which the member resource belongs. The resource and the resource class must be separated by the colon (:) delimiter.
Resource_class:Resource_name[:Node]
This specifies one or more member resources that are to be removed from the specified resource group. Resources belonging to different resource classes can also be specified using this syntax. However, member resources belonging to different classes must be separated by spaces. A member resource is identified by the resource's class (Resource_class), the resource's name (Resource_name), and optionally the node (Node) the resource is on. The Resource_class, Resource_Name and Node must be separated by a colon. Resource_class is the name of the resource class the member resource belongs to. Resource_name is the name of the actual member resource in its class. The Node may have to be included when trying to remove a fixed resource from the resource group. The Node and its resource must be separated by the colon (:) delimiter.

Multiple resources belonging to the same resource class can also be specified and are separated by a comma. In this case the first resource or Resource_name[:Node] of a resource class must be preceded by the Resource_class it belongs to and it must be separated by the colon (:) delimiter while the remaining resources are separated by a comma. Resource_class:Resource_name[:Node] The member resources must exist in the resource group for it to be removed.

Resource_class:"selection_string"
Selection string. The -s option determines this operand. Each selection string must be preceded by a resource class. Resource_class indicates the name of the resource class the selection_string will be applied to. The selection_string and it's Resource Class must be separated by the colon (:) delimiter. The specified selection string will be applied to its corresponding resource_class attributes to determine which member resources are to be removed from the resource_group. The selection string must be enclosed within double or single quotation marks. If the selection string contains double quotation marks, enclose the entire selection string in single quotation marks. For example:
-s 'Name == "testing"'
-s 'Name ?= "test"'
-s 'Name like "%"' ( For all resources)
Selection_string
Specifies the selection string. The -s option determines this parameter. When this is the only parameter, then the selection string is applied to the member resources. But, when the selection string is included with Resource_group, the selection string will be applied to the member resources that belong to the specified resource group. When each of the selection strings are preceded by a resource class, the specified selection string in this case will be applied to its corresponding Resource_class attributes, to determine which resources are to be removed from the Resource_group. The selection string must be enclosed within either double or single quotation marks. If the selection string contains double quotation marks, enclose the entire selection string in single quotation marks. For example:
-s 'Name == "testing"'
-s 'Name ?= "test"'
-s 'Name like "%"' (For all resources)

Exit Status

0
The command ran successfully.
1
Error occurred with RMC.
2
Error occurred with CLI script.
3
Incorrect flag on command line.
4
Incorrect parameter on command line.
5
Error occurred with RMC that was based on faulty command line input.
6
Resource specified was not found.

Security

This command requires root authority, or a user ID with appropriate permissions. For more information, see Setting up non-root user Ids for the command line interface.

Examples

  1. To remove a member resource testerA that belongs to resource class IBM.Application from a resource group resA, enter:
    rmrgmbr -g resA IBM.Application:testerA
  2. To remove member resources testerA, testerB, and testerC that belong to resource class IBM.Application, from resource group resA, enter:
    rmrgmbr -g resA IBM.Application:testerA,testerB,testerC
  3. To remove member resources testerA and testerB that belong to resource class IBM.Application and fixed resource en0 that belongs to class IBM.ServiceIP, enter:
    rmrgmbr IBM.Application:testerA,testerB IBM.ServiceIP:en0
  4. To remove selected member resources of the resource class IBM.Application from a resource group resA whose ResourceType is set, enter:
    rmrgmbr -s -g resA IBM.Application:"ResourceType==1"
  5. To remove all member resources of resource group resA by using a selection string, enter:
    rmrgmbr -s 'MemberOf == "resA"'

Files

/usr/sbin/rsct/bin/rmrgmbr
Location of the rmrgmbr command.

See Also

The addrgmbr, chrel, chrg, chrgmbr, lsrel, lsrg, mkrel, mkrg, rmrel, rmrg, commands.

The rmccli General Information file.