BUG-4827: Create grouping for Path-id and make it by default 0 00/37800/2
authorClaudio D. Gasparini <cgaspari@cisco.com>
Tue, 19 Apr 2016 11:27:40 +0000 (13:27 +0200)
committerClaudio D. Gasparini <cgaspari@cisco.com>
Tue, 19 Apr 2016 13:00:50 +0000 (15:00 +0200)
+ Create grouping for Path Id
+ Make Path Id default value 0

Change-Id: I85ad9df929da144ff4b16e9042b21d83202c03c9
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
bgp/inet/src/main/yang/bgp-inet.yang
bgp/parser-api/src/main/yang/bgp-message.yang

index cdcc58489e42b2edf92cb822a201f83eab3c7956..a5fa2455c11944e51c4b4fc4b200863d193cef63 100644 (file)
@@ -32,9 +32,7 @@ module bgp-inet {
         leaf prefix {
             type inet:ipv4-prefix;
         }
-        leaf path-id {
-            type bgp-msg:path-id;
-        }
+        uses bgp-msg:path-id-grouping;
     }
 
     grouping ipv6-prefix {
index 9b8663d19b87b51bd69d525766ed171de77fb005..917001e53d1dc00fc4011a965296de69ae9b29c5 100644 (file)
@@ -40,12 +40,19 @@ module bgp-message {
 
     typedef path-id {
         type uint32;
+        default 0;
         description
             "Identifier of a single path. The identifier does not
              carry any semantic meaning beyond uniquely identifying
              a path.";
     }
 
+    grouping path-id-grouping {
+        leaf path-id {
+            type path-id;
+        }
+    }
+
     grouping originator-id {
         leaf originator {
             type inet:ipv4-address;