Fix invalid YANG 1.0 leafrefs 13/50013/1
authorIgor Foltin <ifoltin@cisco.com>
Wed, 4 Jan 2017 11:31:10 +0000 (12:31 +0100)
committerIgor Foltin <ifoltin@cisco.com>
Wed, 4 Jan 2017 11:31:10 +0000 (12:31 +0100)
Two YANG 1.0 models contain leafrefs with require-instance substatements
which is not valid for YANG 1.0 version. Comment out these substatements
for now. In the future, when YANG 1.1 support for such substatements
will be available, they can be uncommented.

Change-Id: I59cc7bd8f3fdcd14d96ee672fbceaf1d48f5836d
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
bgp/openconfig-api/src/main/yang/openconfig-bgp-policy.yang
bgp/openconfig-api/src/main/yang/openconfig-bgp.yang

index 06ba51204b59470b155186d228aad5112a5ce9b6..544ab2200f84668f7d8f4ac2e4391bd7dbdd8c2b 100644 (file)
@@ -137,7 +137,9 @@ module openconfig-bgp-policy {
           path "/rpol:routing-policy/rpol:defined-sets/" +
             "bgp-pol:bgp-defined-sets/bgp-pol:community-sets/" +
             "bgp-pol:community-set/bgp-pol:community-set-name";
-          require-instance true;
+            //TODO: require-instance should be added when it's
+            //supported in YANG 1.1
+          //require-instance true;
         }
         description
           "References a defined community set";
@@ -160,7 +162,9 @@ module openconfig-bgp-policy {
             "bgp-pol:bgp-defined-sets/bgp-pol:ext-community-sets/" +
             "bgp-pol:ext-community-set/" +
             "bgp-pol:ext-community-set-name";
-          require-instance true;
+            //TODO: require-instance should be added when it's
+            //supported in YANG 1.1
+          //require-instance true;
         }
         description "References a defined extended community set";
       }
@@ -181,7 +185,9 @@ module openconfig-bgp-policy {
           path "/rpol:routing-policy/rpol:defined-sets/" +
             "bgp-pol:bgp-defined-sets/bgp-pol:as-path-sets/" +
             "bgp-pol:as-path-set/bgp-pol:as-path-set-name";
-          require-instance true;
+            //TODO: require-instance should be added when it's
+            //supported in YANG 1.1
+          //require-instance true;
         }
         description "References a defined AS path set";
       }
@@ -440,7 +446,9 @@ module openconfig-bgp-policy {
                   "bgp-pol:bgp-defined-sets/" +
                   "bgp-pol:community-sets/bgp-pol:community-set/" +
                   "bgp-pol:community-set-name";
-                require-instance true;
+                  //TODO: require-instance should be added when it's
+                  //supported in YANG 1.1
+                //require-instance true;
               }
               description
                 "References a defined community set by name";
@@ -489,7 +497,9 @@ module openconfig-bgp-policy {
                   "bgp-pol:ext-community-sets/" +
                   "bgp-pol:ext-community-set/" +
                   "bgp-pol:ext-community-set-name";
-                require-instance true;
+                  //TODO: require-instance should be added when it's
+                  //supported in YANG 1.1
+                //require-instance true;
               }
               description
                 "References a defined extended community set by
index 7e55a5312e22d0799a1a7a70d626928d6e6fac86..4f7e2149d4f2670dbcfa3a7162df08b12de56ca4 100644 (file)
@@ -425,7 +425,9 @@ module openconfig-bgp {
       type leafref {
         // we are at /bgp/neighbors/neighbor/
         path "/bgp/peer-groups/peer-group/peer-group-name";
-        require-instance true;
+        //TODO: require-instance should be added when it's
+        //supported in YANG 1.1
+        //require-instance true;
       }
       description
         "The peer-group with which this neighbor is associated";