cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
326
Views
0
Helpful
1
Replies
Highlighted
Cisco Employee

Errors with YDK on get_config call

I’ve hit this problem when getting the config of a IOS-XR 6.6.3 (YDK classes are for 6.6.2), it seems that YDK is not working well with the class 'Snmp' from module 'Cisco_IOS_XR_snmp_agent_cfg'. The 6.6.3 is supposed to be only bug fixes of 6.6.2 (I heard).

Is this a known issue ?

    provider = NetconfServiceProvider(address=data['router'],

                                      port=830,

                                      username=data['usr'],

                                      password=data['pass'],

                                      protocol="ssh")

    netconf = NetconfService()

 

    conf=netconf.get_config(provider, Datastore.running)

    pp.pprint(conf.keys())

 

This code produces the following error in ‘ydk’ log:

2020-01-06 14:29:44,375 - ydk - INFO - ============= Sending RPC to device =============

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

  <source>

    <running/>

  </source>

</get-config>

</rpc>

2020-01-06 14:29:46,352 - ydk - INFO - ============= Received RPC from device =============

<?xml version="1.0"?>

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">

  <data>

          </vrf>

        </netconf-vrf-table>

      </server>

    </ssh>

  </data>

</rpc-reply>

 

2020-01-06 14:29:46,776 - ydk - ERROR - Failed instantiate class 'Snmp' from module 'Cisco_IOS_XR_snmp_agent_cfg'

2020-01-06 14:30:12,629 - ydk - INFO - Disconnected from device

 

All other classes found in the config looked OK, (notice the missing class 'Cisco-IOS-XR-snmp-agent-cfg:snmp' in the list) :

[ 'Cisco-IOS-XR-ip-domain-cfg:ip-domain',

  'Cisco-IOS-XR-snmp-agent-cfg:mib',

  'Cisco-IOS-XR-ip-ntp-cfg:ntp',

  'Cisco-IOS-XR-ipv4-filesystems-cfg:ftp',

  'Cisco-IOS-XR-infra-infra-clock-linux-cfg:clock',

  'Cisco-IOS-XR-man-netconf-cfg:netconf-yang',

  'Cisco-IOS-XR-infra-rsi-cfg:vrfs',

  'Cisco-IOS-XR-ip-static-cfg:router-static',

  'Cisco-IOS-XR-ip-tcp-cfg:ip-tcp',

  'Cisco-IOS-XR-ip-tcp-cfg:ip',

  'Cisco-IOS-XR-ipv4-acl-cfg:ipv4-acl-and-prefix-list',

  'Cisco-IOS-XR-tty-server-cfg:tty',

  'Cisco-IOS-XR-infra-syslog-cfg:syslog-service',

  'Cisco-IOS-XR-infra-syslog-cfg:syslog',

  'Cisco-IOS-XR-ip-iarm-cfg:ip-arm',

  'Cisco-IOS-XR-policy-repository-cfg:routing-policy',

  'Cisco-IOS-XR-tty-vty-cfg:vty',

  'Cisco-IOS-XR-infra-infra-cfg:banners',

  'Cisco-IOS-XR-call-home-cfg:call-home',

  'Cisco-IOS-XR-ifmgr-cfg:interface-configurations',

  'Cisco-IOS-XR-lib-mpp-cfg:control-plane',

  'Cisco-IOS-XR-ip-bfd-cfg:bfd',

  'Cisco-IOS-XR-aaa-lib-cfg:aaa',

  'Cisco-IOS-XR-ipv4-bgp-cfg:bgp',

  'Cisco-IOS-XR-shellutil-cfg:host-names',

  'Cisco-IOS-XR-infra-policymgr-cfg:policy-manager',

  'Cisco-IOS-XR-crypto-ssh-cfg:ssh']

 

Any ideas ? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Participant

My investigation of this issue showed that it appears due to use of 'entity' node name in the YANG model, which confuses YDK generated bundle code. I have opened YDK GitHub issue to track this error.

As a workaround I suggest to use explicit filters for device query and not to use the Cisco_IOS_XR_snmp_agent_cfg.Snmp class

Yan Gorelik
YDK Solutions

View solution in original post

1 REPLY 1
Highlighted
Participant

My investigation of this issue showed that it appears due to use of 'entity' node name in the YANG model, which confuses YDK generated bundle code. I have opened YDK GitHub issue to track this error.

As a workaround I suggest to use explicit filters for device query and not to use the Cisco_IOS_XR_snmp_agent_cfg.Snmp class

Yan Gorelik
YDK Solutions

View solution in original post

This widget could not be displayed.