cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
308
Views
0
Helpful
1
Replies

Netconf/YANG to Create SNMP User on Nexus

NetDevOp
Level 1
Level 1

I have been using Netconf to manage my Nexus switches for some time but I am having difficulty creating a SNMP user.

This is the YAML I am sending for the commit (ncclient):

 

<config>
  <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
    <snmp-items>
      <inst-items>
        <lclUser-items>
          <LocalUser-list>
            <userName>rw_user</userName>
            <authpwd>authPW123</authpwd>
            <authtype>md5</authtype>
            <isenforcepriv>true</isenforcepriv>
            <islocalizedkey>false</islocalizedkey>
            <privpwd>privPW123</privpwd>
            <privtype>des</privtype>
            <group-items>
              <UserGroup-list>
                <groupName>network-admin</groupName>
              </UserGroup-list>
            </group-items>
          </LocalUser-list>
        </lclUser-items>
      </inst-items>
    </snmp-items>
  </System>
</config>

 

However, the running config only shows:

 

username rw_user password 5 !  role network-admin
username rw_user passphrase  lifetime 99999 warntime 14 gracetime 3

 

And the newly created snmp user can't be used.

1 Reply 1

Alex Stevenson
Cisco Employee
Cisco Employee

Hi @NetDevOp,

 

The code sample you have here looks like XML, not YAML.

 

Please see:

 

Deep Dive Into Model Driven Programmability with NETCONF and YANG

https://pubhub.devnetcloud.com/media/netdevops-live/site/files/s01t03.pdf