NETCONF Configuration Guide
User Manual Overview
Subtree Filtering
5 min
overview overview xml subtree filtering is a mechanism that allows an application to select particular xml subtrees to include in the \<rpc reply> for a \<get> or \<get config> operation a small set of filters for inclusion, simple content exact match, and selection is provided, which allows some useful, but also very limited, selection mechanisms the server does not need to utilize any data model specific semantics during processing, allowing for simple and centralized implementation strategies conceptually, a subtree filter is comprised of zero or more element subtrees, which represent the filter selection criteria at each containment level within a subtree, the set of sibling nodes is logically processed by the server to determine if its subtree and path of elements to the root are included in the filter output each node specified in a subtree filter represents an inclusive filter only associated nodes in underlying data model(s) within the specified datastore on the server are selected by the filter a node is selected if it matches the selection criteria and hierarchy of elements given in the filter data,except that the filter absolute path name is adjusted to start from the layer below \<filter> response messages contain only the subtrees selected by the filter any selection criteria that were present in the request, within a particular selected subtree, are also included in the response note that some elements expressed in the filter as leaf nodes will be expanded (i e , subtrees included) in the filter output specific data instances are not duplicated in the response in the event that the request contains multiple filter subtree expressions that select the same data supported situation supported situation this section descripted the subtree filtering supported on asternos asternos has implemented one simple subtree filter, which can only be used to get data via get/get config there are currently some limitations when using subtree filter, which will be detailed descripted in subsequent chapters container node container node when user use a subtree filter to filter container node data in get/get config,all nodes under container will be return by server if there are any sub nodes under this container, it will be included in rpc reply list node list node when user use a subtree filter to filter list node data in get/get config if the key to list is specified, the corresponding list data will be returned by server otherwise, all existing lists are returned leaf node leaf node single leaf node in subtree filter is not supported currently, that means when user use a subtree filter to filter leaf node data in get/get config, all sibling nodes will be returned in rpc reply by server leaf list node leaf list node when user use a subtree filter to filter leaf list node data in get/get config, no matter leaf is specified or not, all leaf list will be returned in rpc reply by server
