<?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: Using NETCONF to add an SNMP server in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829988#M1011</link>
    <description>&lt;P&gt;No joy, said community is a bad element. Not sure where you got the above from, to be honest.&lt;/P&gt;</description>
    <pubDate>Sun, 07 May 2023 11:17:42 GMT</pubDate>
    <dc:creator>ChrisNewnham_</dc:creator>
    <dc:date>2023-05-07T11:17:42Z</dc:date>
    <item>
      <title>Using NETCONF to add an SNMP server</title>
      <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829914#M1007</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm trying to use ncclient to add an SNMP server, after successfully getting the config. I really don't know where to put operation="create" or if I even need to do it.&lt;/P&gt;&lt;P&gt;This is just a lab environment, IOS-XE v&amp;nbsp;16.12.05&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 19:00:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829914#M1007</guid>
      <dc:creator>ChrisNewnham_</dc:creator>
      <dc:date>2023-05-06T19:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using NETCONF to add an SNMP server</title>
      <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829925#M1008</link>
      <description>&lt;P&gt;&lt;A href="https://www.cisco.com/c/en/us/support/docs/storage-networking/management/200933-YANG-NETCONF-Configuration-Validation.html#anc10" target="_blank"&gt;https://www.cisco.com/c/en/us/support/docs/storage-networking/management/200933-YANG-NETCONF-Configuration-Validation.html#anc10&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 19:42:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829925#M1008</guid>
      <dc:creator>MHM Cisco World</dc:creator>
      <dc:date>2023-05-06T19:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using NETCONF to add an SNMP server</title>
      <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829926#M1009</link>
      <description>&lt;P&gt;I don't think I'm trying to do that, I'm simply trying to change the SNMP server on the device using NETCONF.&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2023 19:47:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829926#M1009</guid>
      <dc:creator>ChrisNewnham_</dc:creator>
      <dc:date>2023-05-06T19:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using NETCONF to add an SNMP server</title>
      <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829968#M1010</link>
      <description>&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;config&amp;gt;
  &amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;
    &amp;lt;snmp-server&amp;gt;
      &amp;lt;community&amp;gt;
        &amp;lt;name&amp;gt;public&amp;lt;/name&amp;gt;
        &amp;lt;RO/&amp;gt;
      &amp;lt;/community&amp;gt;
      &amp;lt;host&amp;gt;
        &amp;lt;version&amp;gt;2c&amp;lt;/version&amp;gt;
        &amp;lt;ip&amp;gt;
          &amp;lt;hostip&amp;gt;4.4.4.4&amp;lt;/hostip&amp;gt;
        &amp;lt;/ip&amp;gt;
        &amp;lt;community&amp;gt;public&amp;lt;/community&amp;gt;
      &amp;lt;/host&amp;gt;
    &amp;lt;/snmp-server&amp;gt;
  &amp;lt;/native&amp;gt;
&amp;lt;/config&amp;gt;
"""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 08:57:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829968#M1010</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-05-07T08:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using NETCONF to add an SNMP server</title>
      <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829988#M1011</link>
      <description>&lt;P&gt;No joy, said community is a bad element. Not sure where you got the above from, to be honest.&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 11:17:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4829988#M1011</guid>
      <dc:creator>ChrisNewnham_</dc:creator>
      <dc:date>2023-05-07T11:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using NETCONF to add an SNMP server</title>
      <link>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4830036#M1012</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/346978"&gt;@ChrisNewnham_&lt;/a&gt;&amp;nbsp;test this on the DV sandbox version&amp;nbsp;17.09.02a. Works ok. HTH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from ncclient import manager
import xml.dom.minidom

RTR = manager.connect(
    host="sandbox-iosxe-latest-1.cisco.com",
    port="830",
    username="admin",
    password="C1sco12345",
    hostkey_verify=False)

snmp_server_xml = """
&amp;lt;config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"&amp;gt;
  &amp;lt;native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native"&amp;gt;
    &amp;lt;snmp-server&amp;gt;
      &amp;lt;host-config xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-snmp"&amp;gt;
        &amp;lt;ip-community&amp;gt;
          &amp;lt;ip-address&amp;gt;4.4.4.4&amp;lt;/ip-address&amp;gt;
          &amp;lt;community-or-user&amp;gt;MOO&amp;lt;/community-or-user&amp;gt;
        &amp;lt;/ip-community&amp;gt;
      &amp;lt;/host-config&amp;gt;
    &amp;lt;/snmp-server&amp;gt;
  &amp;lt;/native&amp;gt;
&amp;lt;/config&amp;gt;
"""

edit_config_response = RTR.edit_config(target="running", config=snmp_server_xml)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 13:46:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/using-netconf-to-add-an-snmp-server/m-p/4830036#M1012</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-05-07T13:46:03Z</dc:date>
    </item>
  </channel>
</rss>

