<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GNMI - XRGRPC using replaceconfig on interface tree, deletes all o in Tools</title>
    <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4743095#M689</link>
    <description>&lt;P&gt;Yes the whole configuration, i was wonder if this was doing the same&amp;nbsp; - but your last post/update above seems this is different, and really cool if possible - but wonder if this is, as is this under the hood just using the built in replace config in XR commands - IDK guessing here? I have always done the diff compare, even on full replace - with napalm it was pretty fugly and ended up writing our own diff.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 08:16:45 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2022-12-21T08:16:45Z</dc:date>
    <item>
      <title>GNMI - XRGRPC using replaceconfig on interface tree, deletes all other</title>
      <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4742663#M686</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;Hi, we´re currently using the XRGRPC library to interface with our IOS XR equipment.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Currently we are configuring L2 pseudowires from our aggregation devices to our SE on PW-HE interfaces.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;While this currently works fine using the merge config, I want to move to the replace config instead.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;The main reason being that we have a git repository hosting the yang models and we want the network to reflect this at all times.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;currently we're deleting unwanted configuration and merging new values. However doing a simple replace for the configuration tree seems like a much simpler operation.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Initial testing with the config replace however seems to delete all other interfaces on the device as I suspect it sees the interface-configuration list as "touched" and therefor any element not in the list should be deleted/defaulted.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there anyway around this, so that only the specific interface is replaced and not all interfaces?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;example yaml:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;interface-configurations:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; interface-configuration:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;   - interface-name: TenGigE0/0/0/0.901250000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;     description: PW-40&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;     ethernet-service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;       rewrite:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;         rewrite-type: pop1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;       encapsulation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;         outer-tag-type: match-dot1q&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;         outer-range1-low: 125&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;     active: act&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;     interface-mode-non-physical: l2-transport&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;     mtus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;       mtu:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;         - mtu: 1504&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;           owner: sub_vlan&amp;nbsp;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;BR /&gt;-Anders&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Dec 2022 14:42:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4742663#M686</guid>
      <dc:creator>SA2</dc:creator>
      <dc:date>2022-12-20T14:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: GNMI - XRGRPC using replaceconfig on interface tree, deletes all o</title>
      <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4742742#M687</link>
      <description>&lt;P&gt;Ive not used this method, however i do not think this is any different to how NAPALM &lt;A href="https://napalm.readthedocs.io/en/latest/support/index.html#configuration-support-matrix" target="_self"&gt;(documentation)&amp;nbsp;&lt;/A&gt;would work in its two methods&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;replace&lt;/STRONG&gt;: completely removes the existing configuration and puts in a new one&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;merge&lt;/STRONG&gt;: add configuration statements to the current configuration&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:58:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4742742#M687</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-12-20T16:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: GNMI - XRGRPC using replaceconfig on interface tree, deletes all o</title>
      <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4743093#M688</link>
      <description>&lt;P&gt;While the replace config in napalm replaces the whole configuration, as I understand it,&amp;nbsp;&lt;BR /&gt;the replace config in gnmi should and indeed does only replace the configuration in the tree that is being modified.&lt;BR /&gt;&lt;BR /&gt;So when I do a replace config in the example above, all of the interfaces are deleted but none of the system or router configuration is deleted as those are on seperate trees.&lt;BR /&gt;What I'm trying to achieve is to be able to replace all configuration for a specific interface only.&lt;BR /&gt;Currently it seems like I've modified the Interfaces-config list of interfaces and therefor it replaces the interface list with a new list with only this interface, however I would like for this to happen one step further down the tree.&lt;BR /&gt;&lt;BR /&gt;I suppose I could fetch the current tree, and do the comparison locally, it just seemed like this was the intended purpose of the config replace method.&lt;BR /&gt;&lt;BR /&gt;Reading through this again I suspect replacing just one element int the list is not possible, its either the whole list or do an update on individual leaf values, or indeed do a merge.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md#344-modes-of-update-replace-versus-update" target="_blank"&gt;https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md#344-modes-of-update-replace-versus-update&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Anders&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 08:10:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4743093#M688</guid>
      <dc:creator>SA2</dc:creator>
      <dc:date>2022-12-21T08:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: GNMI - XRGRPC using replaceconfig on interface tree, deletes all o</title>
      <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4743095#M689</link>
      <description>&lt;P&gt;Yes the whole configuration, i was wonder if this was doing the same&amp;nbsp; - but your last post/update above seems this is different, and really cool if possible - but wonder if this is, as is this under the hood just using the built in replace config in XR commands - IDK guessing here? I have always done the diff compare, even on full replace - with napalm it was pretty fugly and ended up writing our own diff.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 08:16:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4743095#M689</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-12-21T08:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: GNMI - XRGRPC using replaceconfig on interface tree, deletes all o</title>
      <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4752893#M691</link>
      <description>&lt;P&gt;Including this as it might help someone else in the future.&lt;BR /&gt;&lt;BR /&gt;I´ve been experimenting a bit more and it seems to be working as per the standard, when using replace all none specified values should be deleted or set to their default values, therefor replacing a single element in a list (the interface list) has the unfortunate consequence of deleting all the others.&lt;BR /&gt;&lt;BR /&gt;However I also found out that in the gnmi spec the set request has support for doing multiple operations in a single transaction, with an honored order, so in a single set request I'm able to delete the specific interface and then do an update action to recreate it with only the specified config. That solves the issue for me.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 09:29:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4752893#M691</guid>
      <dc:creator>SA2</dc:creator>
      <dc:date>2023-01-11T09:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: GNMI - XRGRPC using replaceconfig on interface tree, deletes all o</title>
      <link>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4752939#M692</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;therefor replacing a single element in a list (the interface list) has the unfortunate consequence of deleting all the others"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Wow... thats not thing you want to find out in production!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 11:40:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/gnmi-xrgrpc-using-replaceconfig-on-interface-tree-deletes-all/m-p/4752939#M692</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-01-11T11:40:47Z</dc:date>
    </item>
  </channel>
</rss>

