<?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: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config in Tools</title>
    <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4140540#M1442</link>
    <description>&lt;P&gt;Have you tried change snippet like this:&lt;/P&gt;&lt;PRE&gt;config_snippet = """&lt;BR /&gt;&amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;&lt;BR /&gt;  &amp;lt;hostname&amp;gt;AAAROUTERAAA&amp;lt;/hostname&amp;gt;&lt;BR /&gt;&amp;lt;/native&amp;gt;&lt;BR /&gt;"""&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Aug 2020 16:21:19 GMT</pubDate>
    <dc:creator>yangorelik</dc:creator>
    <dc:date>2020-08-24T16:21:19Z</dc:date>
    <item>
      <title>Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4139840#M1441</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm just starting my Netconf/Yang journey.&amp;nbsp; I figured I'd start small - setting the hostname of a CSR1kv.&amp;nbsp; The following works fine on IOS-XE 16.12.4:&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/env python3&lt;BR /&gt;&lt;BR /&gt;from ncclient import manager&lt;BR /&gt;&lt;BR /&gt;config_snippet = """&lt;BR /&gt;&amp;lt;config&amp;gt;&lt;BR /&gt;   &amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;&lt;BR /&gt;      &amp;lt;hostname&amp;gt;AAAROUTERAAA&amp;lt;/hostname&amp;gt;&lt;BR /&gt;   &amp;lt;/native&amp;gt;&lt;BR /&gt;&amp;lt;/config&amp;gt;&lt;BR /&gt;"""&lt;BR /&gt;&lt;BR /&gt;with manager.connect(host="&amp;lt;private ip&amp;gt;", port=830, username="&amp;lt;netconf username&amp;gt;",&lt;BR /&gt;                     hostkey_verify=False, device_params={'name': 'csr'}) as m:&lt;BR /&gt;    result = m.edit_config(target='running', config=config_snippet)&lt;BR /&gt;    print(result.xml)&lt;/PRE&gt;&lt;P&gt;As expected, the above changes the router hostname.&amp;nbsp; (Auth is being done through SSH keys.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm spinning up the CSR1kv image using a short script.&amp;nbsp; All I change is the IOS image to a different version (the base config is loaded during the automated spin-up).&amp;nbsp; And yet on IOS-XE 17.3.1a when I run the script above I get the following error (reformatted for clarity):&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;error-info xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"&amp;gt;&lt;BR /&gt;  &amp;lt;bad-element&amp;gt;config&amp;lt;/bad-element&amp;gt;&lt;BR /&gt;&amp;lt;/error-info&amp;gt;&lt;/PRE&gt;&lt;P&gt;I've compared the output from "show netconf schema" on the two versions and they are identical (running 'diff' between the two returns nothing).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It feels like I'm missing something obvious.&lt;/P&gt;&lt;P&gt;There's not much in the "config" section that could have a bad element.&amp;nbsp; Hostname is still represented the same way, in the same place:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;17.3.1: &lt;A href="https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1731/Cisco-IOS-XE-native.yang#L1559" target="_blank"&gt;https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1731/Cisco-IOS-XE-native.yang#L1559&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;16.12.1: &lt;A href="https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/16121/Cisco-IOS-XE-native.yang#L1659" target="_blank"&gt;https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/16121/Cisco-IOS-XE-native.yang#L1659&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;(well, slight difference with '{}' vs ';', but I think that should be fine; please correct me if I'm wrong.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any suggestions as to what I should be looking for?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Aug 2020 01:33:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4139840#M1441</guid>
      <dc:creator>mark</dc:creator>
      <dc:date>2020-08-23T01:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4140540#M1442</link>
      <description>&lt;P&gt;Have you tried change snippet like this:&lt;/P&gt;&lt;PRE&gt;config_snippet = """&lt;BR /&gt;&amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;&lt;BR /&gt;  &amp;lt;hostname&amp;gt;AAAROUTERAAA&amp;lt;/hostname&amp;gt;&lt;BR /&gt;&amp;lt;/native&amp;gt;&lt;BR /&gt;"""&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 16:21:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4140540#M1442</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2020-08-24T16:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4140621#M1443</link>
      <description>&lt;P&gt;Unfortunately, no.&lt;/P&gt;&lt;PRE&gt;raise XMLError("Element [%s] does not meet requirement" % ele.tag) ncclient.xml_.XMLError: Element [{http://cisco.com/ns/yang/Cisco-IOS-XE-native}native] does not meet requirement&lt;/PRE&gt;&lt;P&gt;It seems to require the &amp;lt;config&amp;gt;&amp;lt;/config&amp;gt; structure.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 18:24:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4140621#M1443</guid>
      <dc:creator>mark</dc:creator>
      <dc:date>2020-08-24T18:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4146531#M1444</link>
      <description>&lt;P&gt;Hi Mark&lt;/P&gt;&lt;P&gt;Seems like I'm having the same issue with a WLC98k running 17.3.1:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cisco.com/t5/mobility-discussions/wlc98k-configure-ap-tags-through-netconf/td-p/4146361" target="_self"&gt;https://community.cisco.com/t5/mobility-discussions/wlc98k-configure-ap-tags-through-netconf/td-p/4146361&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you been able to find a solution?&lt;/P&gt;&lt;P&gt;Oli&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:00:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4146531#M1444</guid>
      <dc:creator>0_Kiss</dc:creator>
      <dc:date>2020-09-04T16:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4146535#M1445</link>
      <description>&lt;P&gt;No.&amp;nbsp; I've tested the same config against earlier versions and the earlier versions work just fine.&amp;nbsp; This is only broken in 17.3.1.&amp;nbsp; My only suggestion is to roll-back the version number and test again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've setup an alert so that I'll be notified when a new version of the CSR1000v is released.&amp;nbsp; When it comes out I'll be testing it immediately.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:07:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4146535#M1445</guid>
      <dc:creator>mark</dc:creator>
      <dc:date>2020-09-04T16:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4147308#M1446</link>
      <description>&lt;P&gt;Thanks Mark! I have now made the same observation, my scripts run fine on a WLC with version 16.12.4a. Strange!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 12:56:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4147308#M1446</guid>
      <dc:creator>0_Kiss</dc:creator>
      <dc:date>2020-09-07T12:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4164576#M1447</link>
      <description>&lt;P&gt;try this one it works:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;config_snippet = """&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;native xmlns="&lt;A href="http://cisco.com/ns/yang/Cisco-IOS-XE-native" target="_blank" rel="noopener"&gt;http://cisco.com/ns/yang/Cisco-IOS-XE-native&lt;/A&gt;"&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;hostname&amp;gt;AAAROUTERAAA&amp;lt;/hostname&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;/native&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;/config&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;"""&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 10 Oct 2020 15:15:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4164576#M1447</guid>
      <dc:creator>mashrafi</dc:creator>
      <dc:date>2020-10-10T15:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4: bad-element: config</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4165476#M1448</link>
      <description>&lt;P&gt;How did you figure out those namespace definitions were required?&lt;/P&gt;&lt;P&gt;Your solution works, but now I'm having a similar problem with the &amp;lt;cli-config-data&amp;gt; instruction.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 21:13:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4165476#M1448</guid>
      <dc:creator>mark</dc:creator>
      <dc:date>2020-10-12T21:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf error in IOS-XE 17.3.1a but works fine on IOS-XE 16.12.4:</title>
      <link>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4528425#M1449</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1111146"&gt;@mashrafi&lt;/a&gt;&amp;nbsp;for helping to point us in the right direction! Created a YouTube video &lt;A title="YouTube video on how to fix IOS XE v17 NETCONF scripts" href="https://youtu.be/xEdWLeOQkDY" target="_blank" rel="noopener"&gt;here&lt;/A&gt; demonstrating how to fix NETCONF scripts in v17 IOS XE based on your post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;profhamachi&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jan 2022 04:56:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-error-in-ios-xe-17-3-1a-but-works-fine-on-ios-xe-16-12-4/m-p/4528425#M1449</guid>
      <dc:creator>profhamachi</dc:creator>
      <dc:date>2022-01-09T04:56:22Z</dc:date>
    </item>
  </channel>
</rss>

