07-12-2016 08:47 AM
I have set up a new YDK 0.4.2 environment and I am trying to run the sample YDK python script. I'm seeing an error...
(ydk-py) [gibson@rickenbacker ydk-py]$ python2.7 ./samples/bgp.py -h
Traceback (most recent call last):
File "./samples/bgp.py", line 32, in <module>
from ydk.models.bgp.bgp_types import Ipv4Unicast_Identity
ImportError: cannot import name Ipv4Unicast_Identity
After inspecting the bgp_types.py file I can see that Ipv4Unicast_Identity *should be* Ipv4UnicastIdentity (no underscore).
Now it runs fine...
(ydk-py) [gibson@rickenbacker ydk-py]$ python2.7 ./samples/bgp.py -h
Usage: bgp.py [-h | --help] [options]
Options:
-h, --help show this help message and exit
-v VERSION, --version=VERSION
force NETCONF version 1.0 or 1.1
-u USERNAME, --user=USERNAME
-p PASSWORD, --password=PASSWORD
password
--proto=PROTO Which transport protocol to use, one of ssh or tcp
--host=HOST NETCONF agent hostname
--port=PORT NETCONF agent SSH port
Solved! Go to Solution.
07-12-2016 09:12 AM
Thanks. Both the above issues have been fixed
07-12-2016 08:52 AM
Thanks for letting us know about this . This sample will be fixed to remove this error.
07-12-2016 09:07 AM
Also Ipv6Unicast_Identity should be Ipv6UnicastIdentity.
07-12-2016 09:12 AM
Thanks. Both the above issues have been fixed
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide