Showing results for 
Search instead for 
Did you mean: 

Cant Connect NX-OS to OpenDayLight via NETCONF

Zufar Dhiyaulhaq

hi, i follow the step on cisco learning labs Cisco DevNet Learning Labs to active the NETCONF on NX-OS. and its successful.

this is my output of getting list of YANG Files.

root@client:/python# ssh -p 830 admin@ -s netconf

User Access Verification


<?xml version="1.0" encoding="UTF-8"?>

<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">















and this is my python files to get all the list, its working

from ncclient import manager

def get_capabilities(host, port, user, pwd):

    with manager.connect(host=host, port=port, username=user, password=pwd, hostkey_verify=False, device_params={'name': 'nexus'}) as m:

        capabilities =  m.server_capabilities

    return capabilities

def print_capabilities(c):

    file = open ("capability-nx-os.txt","w")

    for line in c:


x = get_capabilities ("","830","admin","Tanjung814")

a = print_capabilities(x)

but when i try to get the YANG Files directly from the NX-OS devices, its cannot. this is my python files.

from ncclient import manager

import xml.etree.ElementTree as ET

m = manager.connect(host='', port=830, username='admin',

                    password='Tanjung814', device_params={'name': 'nexus'})

schema = m.get_schema('openconfig-vlan')

xml_et = ET.fromstring(schema.xml)

yang = list(xml_et)[0].text

with open('openconfig-vlan.yang', 'w') as f:


when running the files.

root@client:/python/nx-os# python

Traceback (most recent call last):

  File "", line 8, in <module>

    schema = m.get_schema('openconfig-vlan')

  File "/usr/local/lib/python2.7/dist-packages/ncclient/", line 162, in wrapper

    return self.execute(op_cls, *args, **kwds)

  File "/usr/local/lib/python2.7/dist-packages/ncclient/", line 232, in execute

    raise_mode=self._raise_mode).request(*args, **kwds)

  File "/usr/local/lib/python2.7/dist-packages/ncclient/operations/", line 129, in request

    return self._request(node)

  File "/usr/local/lib/python2.7/dist-packages/ncclient/operations/", line 337, in _request

    raise self._reply.error

ncclient.operations.rpc.RPCError: Invalid or unsupported operation tag


this error happen to when i try to connect NX-OS directly to OpenDayLight. the ODL cant download the YANG Files store in the NX-OS to the OpenDayLight cache/scheme folder. i try on SR1000V this script working. i dont know why this error on NX-OS. thanks

1 Reply 1

Cisco Employee
Cisco Employee

See discussion of same topic at Cant Get YANG Files on NX-OS

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: