<?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 Netconf in Python script in Tools</title>
    <link>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4506861#M1407</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting following error while trying to use the filter for netconf in Python. Please help to make corrections:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;m = manager.connect(host="sandbox-iosxe-latest-1.cisco.com", port=830, username="developer", password="C1sco12345", hostkey_verify=False)&lt;BR /&gt;m.connected&lt;BR /&gt;True&lt;BR /&gt;loop777 = m.get_config("running")&lt;BR /&gt;filt_lo777 = """&lt;BR /&gt;&amp;lt;filter&amp;gt;&lt;BR /&gt;&amp;lt;interfaces xmlns="&lt;A href="http://openconfig.net/yang/interfaces" target="_blank"&gt;http://openconfig.net/yang/interfaces&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;interface&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;Loopback777&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;/interface&amp;gt;&lt;BR /&gt;&amp;lt;/interfaces&amp;gt;&lt;BR /&gt;&amp;lt;/filter&amp;gt;&lt;BR /&gt;"""&lt;BR /&gt;loopb_777 = m.get_config("running", filt_lo777)&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "&amp;lt;pyshell#131&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;loopb_777 = m.get_config("running", filt_lo777)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\automation\netconf\lib\site-packages\ncclient\manager.py", line 246, in execute&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return cls(self._session,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\automation\netconf\lib\site-packages\ncclient\operations\retrieve.py", line 166, in request&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return self._request(node)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ncclient.operations.rpc.RPCError: {'type': 'protocol', 'tag': 'unknown-element', 'app_tag': None, 'severity': 'error', 'info': '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;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;&amp;lt;bad-element&amp;gt;filter&amp;lt;/bad-element&amp;gt;\n&amp;lt;/error-info&amp;gt;\n', 'path': '\n /rpc/get-config\n ', 'message': None}&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 23:25:47 GMT</pubDate>
    <dc:creator>sqambera</dc:creator>
    <dc:date>2021-11-22T23:25:47Z</dc:date>
    <item>
      <title>Netconf in Python script</title>
      <link>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4506861#M1407</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting following error while trying to use the filter for netconf in Python. Please help to make corrections:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;m = manager.connect(host="sandbox-iosxe-latest-1.cisco.com", port=830, username="developer", password="C1sco12345", hostkey_verify=False)&lt;BR /&gt;m.connected&lt;BR /&gt;True&lt;BR /&gt;loop777 = m.get_config("running")&lt;BR /&gt;filt_lo777 = """&lt;BR /&gt;&amp;lt;filter&amp;gt;&lt;BR /&gt;&amp;lt;interfaces xmlns="&lt;A href="http://openconfig.net/yang/interfaces" target="_blank"&gt;http://openconfig.net/yang/interfaces&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;interface&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;Loopback777&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;/interface&amp;gt;&lt;BR /&gt;&amp;lt;/interfaces&amp;gt;&lt;BR /&gt;&amp;lt;/filter&amp;gt;&lt;BR /&gt;"""&lt;BR /&gt;loopb_777 = m.get_config("running", filt_lo777)&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "&amp;lt;pyshell#131&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;loopb_777 = m.get_config("running", filt_lo777)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\automation\netconf\lib\site-packages\ncclient\manager.py", line 246, in execute&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return cls(self._session,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\automation\netconf\lib\site-packages\ncclient\operations\retrieve.py", line 166, in request&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return self._request(node)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ncclient.operations.rpc.RPCError: {'type': 'protocol', 'tag': 'unknown-element', 'app_tag': None, 'severity': 'error', 'info': '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;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;&amp;lt;bad-element&amp;gt;filter&amp;lt;/bad-element&amp;gt;\n&amp;lt;/error-info&amp;gt;\n', 'path': '\n /rpc/get-config\n ', 'message': None}&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 23:25:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4506861#M1407</guid>
      <dc:creator>sqambera</dc:creator>
      <dc:date>2021-11-22T23:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf in Python script</title>
      <link>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4507100#M1408</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/257193"&gt;@sqambera&lt;/a&gt;&amp;nbsp;i get this error on the sandbox too, switch your hostname to the other XE always-on sandbox and run this again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;with manager.connect(host = "sandbox-iosxe-recomm-1.cisco.com",
                     port = 830,
                     username = "developer",
                     password = "C1sco12345",
                     hostkey_verify = False) as m:&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Nov 2021 12:25:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4507100#M1408</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2021-11-23T12:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Netconf in Python script</title>
      <link>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4507366#M1409</link>
      <description>&lt;P&gt;Thank you so much for nailing it down. Changing the host made it work. Really appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Qamber&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 20:09:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/netconf-in-python-script/m-p/4507366#M1409</guid>
      <dc:creator>sqambera</dc:creator>
      <dc:date>2021-11-23T20:09:01Z</dc:date>
    </item>
  </channel>
</rss>

