ydk-gen
ydk-gen copied to clipboard
OpenDaylight serviceprovider not working
Expected Behavior
Load the query when the router is in connected stated in ODL
Current Behavior
Output the following when the router is connected:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: type must be string, but is object
Steps to Reproduce
Register your router to ODL 0.11.1 or 0.8.3, wait for it to be in connected state, see below:
opendaylight-user@root>netconf:list-devices
NETCONF ID | NETCONF IP | NETCONF Port | Status
-------------------------------------------------------------
EDG-01-216.BRU1-IXN | 10.1.128.120 | 1830 | connected
Then run the script below
Your Script
import os
import sys
from argparse import ArgumentParser
if sys.version_info > (3,):
from urllib.parse import urlparse
else:
from urlparse import urlparse
from ydk.types import Empty
from ydk.services import CRUDService
from ydk.providers import OpenDaylightServiceProvider
import pkg_resources
from ydk.errors import YError
from ydk.types import EncodingFormat
from ydk.path import Repository
repo = Repository("/root/Cisco/odl/odl-11.1")
odl_provider = OpenDaylightServiceProvider(repo, "10.1.20.144", "admin", "admin", 8181, EncodingFormat.XML)
Logs
Enable logging and post the logs below
System Information
Docker image of YDK (0.8.4)
Is this still an issue? Could you please provide more information including log file.