
245
</top>
</filter>
</get>
</rpc>
You can also specify an attribute name that is the same as a column name of the current table
at the row to implement full match. The system returns only configuration data that matches this
attribute name. The XML message equivalent to the above element-value-based full match is
as follows:
<rpc message-id ="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter type="subtree">
<top xmlns="http://www.h3c.com/netconf/data:1.0"xmlns:data="
http://www.h3c.com/netconf/data:1.0">
<Ifmgr>
<Interfaces>
<Interface data:AdminStatus="2"/>
</Interfaces>
</Ifmgr>
</top>
</filter>
</get>
</rpc>
The above examples show that both element-value-based full match and attribute-name-based
full match can retrieve the same configuration data for all interfaces in up state.
•
Regular expression match
To implement a complex data filtering with characters, you can add a
regExp
attribute for a
specific element.
# Copy the following text to the client to retrieve the descriptions of interfaces, of which all the
characters must be upper-case letters from A to Z:
<rpc message-id="1-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:h3c="http://www.h3c.com/netconf/base:1.0">
<get-config>
<source>
<running/>
</source>
<filter type="subtree">
<top xmlns="http://www.h3c.com/netconf/config:1.0">
<Ifmgr>
<Interfaces>
<Interface>
<Description h3c:regExp="[A-Z]*"/>
</Interface>
</Interfaces>
</Ifmgr>
</top>
</filter>
</get-config>
</rpc>
•
Conditional match