# Filter(x-path) capability in edit-config

**URL:** <https://dmap-community.ductus.global/t/filter-x-path-capability-in-edit-config/2090>\
**Category:** NETCONF\
**Created:** [September 28, 2018, 6:05am UTC](https://dmap-community.ductus.global/t/filter-x-path-capability-in-edit-config/2090 "2018-09-28T06:05:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Netconf4562](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@Netconf4562](https://dmap-community.ductus.global/u/Netconf4562)\
**Post date:** [September 28, 2018, 6:05am UTC](https://dmap-community.ductus.global/t/filter-x-path-capability-in-edit-config/2090/1 "2018-09-28T06:05:47Z")

</div>

Hi  
I want to select the devices using xpath and then perform the edit operations but netconf edit-config is not having any such xml tag. get-config has the facility to filter but edit-config is not.  
Does any one knows how to filter the device in edit-config.

Regards  
Guru

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [September 28, 2018, 7:27am UTC](https://dmap-community.ductus.global/t/filter-x-path-capability-in-edit-config/2090/2 "2018-09-28T07:27:46Z")

</div>

Hi,

You don’t ”select” which ”devices” you perform edit-config operations on. ConfD representation the device NETCONF interface. Perhaps you are thinking about a manager, such as NSO, that you want to perform a network wide NETCONF edit-config transaction through.

As always, the IETF RFCs , here NETCONF, is the primary documentation. The ConfD documentation complements that. For get and get-config operations see:  
See [https://tools.ietf.org/html/rfc6241#section-8.9.5.1](https://tools.ietf.org/html/rfc6241#section-8.9.5.1) for an example.

---

<div class="post-metadata">

**Author:** ![Netconf4562](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@Netconf4562](https://dmap-community.ductus.global/u/Netconf4562)\
**Post date:** [September 28, 2018, 9:05am UTC](https://dmap-community.ductus.global/t/filter-x-path-capability-in-edit-config/2090/3 "2018-09-28T09:05:37Z")

</div>

As i mentioned earlier get-config has the facility for xpath filter.  
But edit-config is not having that facility.  
[https://tools.ietf.org/html/rfc6241#page=37](https://tools.ietf.org/html/rfc6241#page=37).  
set the mtu to 1500 on an interface named “Ethernet 0/0”.

\< rpc message-id=“101” xmlns=“urn:ietf:params:xml:ns:netconf:base:1.0”\>  
\< edit-config\>  
\< target\>  
\< running/\>  
\< /target\>  
\< config\>  
\< top xmlns=“[http://example.com/schema/1.2/config](http://example.com/schema/1.2/config)”\>  
\< interface\>  
\< name\>Ethernet0/0\< /name\>  
\< mtu\>1500\</ mtu\>  
\< /interface\>  
\< /top\>  
\< /config\>  
\< /edit-config\>  
\< /rpc\>

name is acting as a filter.How to know which element is acting as a filter is not clear.

---

<div class="post-metadata">

**Author:** ![per](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@per](https://dmap-community.ductus.global/u/per)\
**Post date:** [September 28, 2018, 9:53am UTC](https://dmap-community.ductus.global/t/filter-x-path-capability-in-edit-config/2090/4 "2018-09-28T09:53:43Z")

</div>

I wouldn’t call it a “filter” - the XML hierarchy specifies a particular data instance, i.e. all keys in all lists must be included. Which elements that are keys (and how many there are of them in each list) depends on the data model, and RFC 6241 is a bit vague about that, since NETCONF was originally defined as independent of any particular data modeling language (it predates YANG). E.g it doesn’t talk about “lists” or “keys”, but the intro to the example does say:

```auto
   Example: The <edit-config> examples in this section utilize a simple
      data model, in which multiple instances of the <interface> element
      can be present, and an instance is distinguished by the <name>
      element within each <interface> element.

```
