[Index]
The model instance filter (MIF) capability allows the administrator to provide criteria to define a subset of model instances to sync in. This causes the sync to only sync in those instances matching the criteria instead of all the instances.
A data sync can be set up with reference to:
Add a Model Instance Filter
Log in as a Provider level administrator and choose Administration Tools > Model Instance Filter to display the list view of existing filters at the corresponding administrator hierarchy.
Choose Add to open the Model Instance Filter form. Provide a Name for the filter.
Choose the device or model type from the Model Parent drop-down. The filter will be applied to it.
Choose the type of filter - the inclusion or exclusion of attributes: Include Matching Instances or Exclude Matching Instances.
Add one or more filters in the Model Filters group:
Filter criteria can be set up according to your purposes:
Click Save. The filter can be selected from the Model Instance Filter drop down when creating or modifying a Data Sync.
Note
If the filter is added at a hierarchy level below that of the the Data Sync, executing the Data Sync will fail, displaying a message "Model type list <ModelTypeList> not found at or above the current hierarchy.".
In order to identify the Attribute Name of the model that can be used for a filter, inspect the transaction log for a list request of the model from the device.
For example, in order to find the available Model Instance Filter attributes of device/cucm/UserProfileProvision, inspect the response from a list request from the device.
From the RESPONSE snippet below, it can be determined that the attributes available for filtering are:
</ns0:listUserProfileProvision> </soapenv:Body> </soapenv:Envelope> RESPONSE: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns:listUserProfileProvisionResponse xmlns:ns="http://www.cisco.com/AXL/API/11.5"> <return> <userProfileProvision uuid="{96FA39CD-8A29-4B26-A3F5-0FF683326134}"> <name>Standard (Factory Default) User Profile</name> <description>Standard (Factory Default) User Profile</description> <allowProvision>false</allowProvision> <limitProvision>10</limitProvision> </userProfileProvision>
Common Use of Model Instance Filters
While model instance filters can be used on any sync type, their common uses are:
Note
Model Instance filters do not work with Cisco UCM Change Notification sync types. If a model instance filter is needed for a UCM element, this model type should be excluded from the change notification sync and a separate sync should be set up for this.
Macro Functions in Model Instance Filters
Macro functions can be used in the Value field to define matching criteria. This is particularly useful for "contains" matching, for example, using fn.contains or fn.containsIgnoreCase.
The value read in from the device API call can be referenced using the input context and the field name from the API call (for example, input.telephoneNumber).
For example:
where macro.ZA-number:
(( fn.containsIgnoreCase +27,input.telephoneNumber == True)) \ <input.telephoneNumber> \ <THIS SHOULD NOT MATCH>.
This condition will sync every user with a telephone number that includes +27. For any other user, the transaction detail log would show: "THIS SHOULD NOT MATCH".
Macros cannot be used in the Value field in conjunction with the "in" Condition.
Data model containing rules for filtering of model instances.
Title | Description | Details | |||||||||||||||||||||||||||||||||||||||||||||||
Name * | The name that is given to the Model Instance Filter instance. |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Model Parent | The parent type of the model types to be filtered. |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Filter Type * | The nature of filtering of model instances - either by inclusion or by exclusion. |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Model Filters | A list of filters that are applicable to instances of particular model types. |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Model Type * | The type of the model that this filter applies to. |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Attribute Filters | A list of attributes and the conditions that must be applied to the attributes. The conditions will be applied in a logical AND manner |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Attribute Name * | The model attribute name for which the filter applies. |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Condition * | The nature of comparison to be made for the filter. Condition can be 'Equals', 'Not Equals', 'Greater Than', 'Less Than', 'In', or 'Not In' |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Value | A single value to which the condition is applied. Value is used when the condition is one of 'Equals', 'Not Equals', 'Greater Than', or 'Less Than' |
|
|||||||||||||||||||||||||||||||||||||||||||||||
Values | A list of multiple values to which the condition is applied. Values are used when the condition is either 'In' or 'Not In' |
|