03-16-2020 10:45 AM
Hi Team,
When tried to compile ydk-models-cisco-ios-xr with latest 7.2.1 models, we could not compile the below UM models for our YDK 0.5.5 environment.
Pyang version : 1.7.4 or later
Cisco-IOS-XR-um-if-arp-cfg.yang
Cisco-IOS-XR-um-if-bundle-cfg.yang
Cisco-IOS-XR-um-if-ip-address-cfg.yang
Cisco-IOS-XR-um-if-tunnel-cfg.yang
Cisco-IOS-XR-um-if-vrf-cfg.yang
Cisco-IOS-XR-um-traps-mpls-ldp-cfg.yang
We are not able to isolate the issue as there are no specific errors, but these models are silently ignored. Corresponding .py file for these models are not generated, so we could not import these YANG models in our automation. Could you please help us to get better insight on this, as we are not getting a clue.
Logs:
(exec-20.03.10) jkalaise@theneer ~ > python
Python 3.5.0 (default, Jun 14 2016, 17:27:33)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import ydk
from ydk.models.cisco_ios_xr import Cisco_IOS_XR_um_router_static_cfg as xr_um_static_cfg ----- Can import this model
from ydk.models.cisco_ios_xr import Cisco_IOS_XR_um_if_vrf_cfg as test ----- Could not import this as we could not generate .py out of this YANG and no error reported, it was siliently ignored
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Cisco_IOS_XR_um_if_vrf_cfg'
Regards,
Kousalya
Solved! Go to Solution.
04-07-2020 12:49 PM
I don't think your models are missing. Make sure you understand the structure of the YANG modules. Cisco-IOS-XR-um-if-* are augmentations of Cisco-IOS-XR-um-interfaces-cfg. You won't see separate Python modules for the augmentations. All data nodes should resides under the Cisco_IOS-XR_um_interfaces_cfg module.
Cisco-IOS-XR-um-traps-mpls-ldp-cfg is also an augmentation.
03-16-2020 11:03 PM
Hello Kousalya
This is expected outcome, because YDK currently does not support YANG 1.1. The installation of pyang 1.7 is also not supported, because its API is not compatible with pyang 1.6, which is one of requirements for YDK-0.5.5 installation.
Cisco needs to find resources to address this very important enhancement.
03-17-2020 10:50 PM
Hi Yan,
Thank you so much for your reply.
I have few more queries on this compilation issue.
1. I tried upgrading to pyang 1.7.4 in YDK0.5.5 env, able to compile models without any errors( UM models were missing in Package)
2. Generated same package with YDK 0.8.3 + pyang 1.7.4 and found UM models are missing in that as well.
As per your comment, API is not compatible with 1.6 and cannot upgrade to Pyang 1.7.4 in YDK0.5.5 env.
Please correct me if I am wrong, I am able to upgrade Pyang 1.7.4 in both YDK0.5.5 and YDK0.8.3, able to generate pkg but UM models are not added.
Also could you help me with exact requirement to get this enhancement added. So that I can request CISCO dev team to address the same.
Thanks,
Kousalya
03-18-2020 09:11 AM
Hi Kousalya
The YDK is not built to work with Pyang 1.7. If you want to work with current YDK releases of 0.5.5 or 0.8.4, you have to downgrade your Pyang installation to 1.6.
Also. When building the model bundle with generate.py you can use '-v' flag to enable debugging logging. That will help you to identify the issues with 'um' modules.
Regarding enhancement. I am not a Cisco employee anymore and not in position to provide you with requested help. If your team is really need this and other YDK enhancement, please talk to your managers, who should find internal resources or hire me to do this work.
04-07-2020 12:49 PM
I don't think your models are missing. Make sure you understand the structure of the YANG modules. Cisco-IOS-XR-um-if-* are augmentations of Cisco-IOS-XR-um-interfaces-cfg. You won't see separate Python modules for the augmentations. All data nodes should resides under the Cisco_IOS-XR_um_interfaces_cfg module.
Cisco-IOS-XR-um-traps-mpls-ldp-cfg is also an augmentation.
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