Add rules to groups that determine the managed items to include. As items are discovered, they are automatically added to the groups whose rules apply to those items.
The same URL that is used to create groups is used to add group rules. The body of the XML in the POST is modified to include rules. The web service adds XML to the group definition to create the rules.
Follow these steps:
http://CA Performance Center Server IP Address:8181/pc/center/webservice/groups /idName/idValue/groupItemId
<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="DisplayName" type="device"/>
<Value>Cisco-3345</Value>
</Compare>
</Match>
</Rule>
</Rules>
</Group>
</GroupTree>
This example creates a rule that adds a device named 'Cisco-3345' to the group named "Austin".
For more information, see Groups Web Service Example Syntax.
We recommend using the Manage Groups page to create a few rules before you use the groups web service to create them. You can view the syntax for a rule that you have applied by taking the steps in Get Identifying Information for a Group. The XML that is returned includes group rules.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|