From 115232e2523dfaaded73908cca6b6425c8602f1e Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Sat, 21 Mar 2020 16:46:24 -0700 Subject: [PATCH] yang: revert leafref to get interface cmd working Unable to access interface command: root@bharat:~/stash/libyang/build# dpkg-query -W | grep libyang libyang-dev 0.16.105-3~ubuntu18.04.1 libyang0.16 0.16.105-3~ubuntu18.04.1 root@bharat:~/stash/libyang/build# vtysh bharat# config t bharat(config)# interface lo % Configuration failed: validation error. Please check the logs for more details. Logfile: 2020/03/21 16:48:55 ZEBRA: libyang: Leafref "/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default" points to a non-existing leaf. (/frr-interface:lib/interface[name='lo'][vrf='default']/vrf) 2020/03/21 16:48:55 ZEBRA: [EC 100663337] nb_candidate_commit_prepare: failed to validate candidate configuration CI system failure: 2020/03/21 18:53:18 ZEBRA: libyang: Leafref "/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default" points to a non-existing leaf. (/frr-interface:lib/interface[name='r1-eth0'][vrf='default']/vrf) 2020/03/21 18:53:18 ZEBRA: [EC 100663337] nb_candidate_commit_prepare: failed to validate candidate configuration 2020/03/21 18:53:18 ZEBRA: libyang: Leafref "/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default" points to a non-existing leaf. (/frr-interface:lib/interface[name='r1-eth1'][vrf='default']/vrf) Signed-off-by: Chirag Shah --- yang/frr-interface.yang | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yang/frr-interface.yang b/yang/frr-interface.yang index 5dcda076d4..ea36bfb5d6 100644 --- a/yang/frr-interface.yang +++ b/yang/frr-interface.yang @@ -38,7 +38,11 @@ module frr-interface { } leaf vrf { - type frr-vrf:vrf-ref; + type string { + length "1..16"; + } + /* yang version 0.16 having issue accessing leafref. */ + /* type frr-vrf:vrf-ref;*/ description "VRF this interface is associated with."; }