Previous Topic: Add Group RulesNext Topic: Delete Groups


Remove Items from Groups

You can remove individual items from a group using the rules feature of the groups web service. You must first use the Manage Groups page in the CA Performance Center user interface to view current group membership. Then apply a new rule to the group that specifies the 'AllowDeletes' property. When you post the rule, it deletes items that are already in the group but that do not meet the criteria that the rule specifies.

Follow these steps:

  1. Set up a REST client with a connection to the CA Performance Center server.
  2. Use the following format for the URL in the REST client:
    http://CA Performance Center Server IP Address:8181/pc/center/webservice/groups/false/true
    

    Note: Specifying 'true' for the final property lets you delete items from the group.

  3. Select POST for the HTTP method.
  4. Provide a valid Username and Password in the request header for a user account that has global administrator access to CA Performance Center.
  5. Select 'application/xml' as the 'Body Content-type'.
  6. Add the following XML within the "Body" text section, replacing the values with the values that you want to use for the group rule:
    <GroupTree path="/All Groups/USA"> 
       <Group name="Austin" desc="The group for items in Austin, TX">
          <Rules allowDeletes="true" saveRules="true">
             <Rule add="device" name="Add Devices">
                <Match>
                   <Compare readOnly="true" using="MEMBER_OF">
                      <Property name="ItemID" type="device"/>
                         <Value reference="/All Groups">1</Value>
                   </Compare>
                   <Compare readOnly="false" using="EQUALS">
                      <Property name="subType" type="device"/>
                         <Value>server</Value>
                   </Compare>
                   <Compare readOnly="false" using="NOT_EQUALS">
                      <Property name="subType" type="device"/>
                         <Value>VM</Value>
                   </Compare>
                </Match>
             </Rule>
          </Rules>
       </Group>
    </GroupTree>
    

    This example creates a rule that adds devices with subtype 'server' but removes devices with subtype 'VM' (virtual machine) from the group named "Austin".

  7. Run the method.
  8. Use the Manage Groups page in the CA Performance Center user interface to verify group membership.