]> git.puffer.fish Git - matthieu/frr.git/commitdiff
yang: revert leafref to get interface cmd working
authorChirag Shah <chirag@cumulusnetworks.com>
Sat, 21 Mar 2020 23:46:24 +0000 (16:46 -0700)
committerSantosh P K <sapk@vmware.com>
Thu, 16 Apr 2020 15:00:18 +0000 (08:00 -0700)
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 <chirag@cumulusnetworks.com>
yang/frr-interface.yang

index 5dcda076d41266014f8fec55db3e52ad7378fbc3..ea36bfb5d6101f5d85e6469a050dc76967788b12 100644 (file)
@@ -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.";
       }