Upgrade ietf-{inet,yang}-types to 2013-07-15
[bgpcep.git] / bgp / parser-api / src / main / yang / bgp-message.yang
index 9efac13fd9b78be66061f6581d1d8b5d169d6cc3..b5fb116bf99e3e31cbde69f0141affdb6eabd76e 100644 (file)
@@ -3,7 +3,7 @@ module bgp-message {
     namespace "urn:opendaylight:params:xml:ns:yang:bgp-message";
     prefix "bgp-msg";
 
-    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+    import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
     import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
     import network-concepts { prefix netc; revision-date 2013-11-25; }
 
@@ -38,6 +38,21 @@ 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;
@@ -47,10 +62,15 @@ module bgp-message {
     grouping cluster-id {
         leaf-list cluster {
             type bgp-t:cluster-identifier;
+            ordered-by user;
         }
     }
 
     notification open {
+        uses open-message;
+    }
+
+    grouping open-message {
         description "Open Message";
         reference "http://tools.ietf.org/html/rfc4271#section-4.2";
         leaf version {
@@ -72,15 +92,17 @@ module bgp-message {
         list bgp-parameters {
             list optional-capabilities {
                 reference "http://tools.ietf.org/html/rfc5492#section-4";
-                choice c-parameters {
-                    case as4-bytes-case {
-                        container as4-bytes-capability {
-                            reference "http://tools.ietf.org/html/rfc6793";
-                            leaf as-number {
-                                type inet:as-number;
-                            }
+                container c-parameters {
+                    container as4-bytes-capability {
+                        reference "http://tools.ietf.org/html/rfc6793";
+                        leaf as-number {
+                            type inet:as-number;
                         }
                     }
+                    container bgp-extended-message-capability {
+                        reference "https://www.ietf.org/archive/id/draft-ietf-idr-bgp-extended-messages-11.txt";
+                        presence "Indicates peer is able to send/receive 64K messages";
+                    }
                 }
             }
         }
@@ -88,67 +110,99 @@ module bgp-message {
 
     grouping path-attributes {
         reference "http://tools.ietf.org/html/rfc4271#section-5";
-        container origin {
-            reference "http://tools.ietf.org/html/rfc4271#section-5.1.1";
-            leaf value {
-                type bgp-t:bgp-origin;
-                mandatory true;
+        container attributes {
+            container origin {
+                reference "http://tools.ietf.org/html/rfc4271#section-5.1.1";
+                leaf value {
+                    type bgp-t:bgp-origin;
+                    mandatory true;
+                }
             }
-        }
-        container as-path {
-            reference "http://tools.ietf.org/html/rfc4271#section-5.1.2";
-            list segments {
-                uses bgp-t:as-path-segment;
+            container as-path {
+                reference "http://tools.ietf.org/html/rfc4271#section-5.1.2";
+                list segments {
+                    uses bgp-t:as-path-segment;
+                }
             }
-        }
-        uses bgp-t:next-hop;
-        container multi-exit-disc {
-            reference "http://tools.ietf.org/html/rfc4271#section-5.1.4";
-            leaf med {
-                type uint32;
+            uses bgp-t:next-hop;
+            container multi-exit-disc {
+                reference "http://tools.ietf.org/html/rfc4271#section-5.1.4";
+                leaf med {
+                    type uint32;
+                }
             }
-        }
-        container local-pref {
-            reference "http://tools.ietf.org/html/rfc4271#section-5.1.5";
-            leaf pref {
-                type uint32;
+            container local-pref {
+                reference "http://tools.ietf.org/html/rfc4271#section-5.1.5";
+                leaf pref {
+                    type uint32;
+                }
             }
-        }
-        container atomic-aggregate {
-            reference "http://tools.ietf.org/html/rfc4271#section-5.1.6";
-            presence "Atomic Aggregate attribute is present.";
-        }
-        container aggregator {
-            uses bgp-t:bgp-aggregator;
-        }
-        list communities {
-            uses bgp-t:community;
-        }
-        list extended-communities {
-            uses bgp-t:extended-community;
-        }
-        container originator-id {
-            uses originator-id;
-        }
-        container cluster-id {
-            uses cluster-id;
-        }
-        container aigp {
-            container aigp-tlv {
-                leaf metric {
-                    type netc:accumulated-igp-metric;
+            container atomic-aggregate {
+                reference "http://tools.ietf.org/html/rfc4271#section-5.1.6";
+                presence "Atomic Aggregate attribute is present.";
+            }
+            container aggregator {
+                uses bgp-t:bgp-aggregator;
+            }
+            list communities {
+                uses bgp-t:community;
+            }
+            list extended-communities {
+                uses bgp-t:extended-community;
+            }
+            container originator-id {
+                uses originator-id;
+            }
+            container cluster-id {
+                uses cluster-id;
+            }
+            container aigp {
+                container aigp-tlv {
+                    leaf metric {
+                        type netc:accumulated-igp-metric;
+                    }
+                }
+            }
+            list unrecognized-attributes {
+                key type;
+                leaf partial {
+                    type boolean;
+                    mandatory true;
+                }
+                leaf transitive {
+                    type boolean;
+                    mandatory true;
+                }
+                leaf type {
+                    type uint8;
+                    mandatory true;
+                }
+                leaf value {
+                    type binary {
+                        length 0..65535;
+                    }
+                    mandatory true;
+                }
+            }
+            container bgp-prefix-sid {
+                list bgp-prefix-sid-tlvs {
+                    choice bgp-prefix-sid-tlv {
+                        reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02";
+                        // to be augmented
+                    }
                 }
             }
         }
     }
 
     notification update {
+        uses update-message;
+    }
+
+    grouping update-message {
         description "Update Message";
         reference "http://tools.ietf.org/html/rfc4271#section-4.3";
-        container path-attributes {
-            reference "http://tools.ietf.org/html/rfc4271#section-5";
-            uses path-attributes;
-        }
+        uses path-attributes;
         container withdrawn-routes {
             leaf-list withdrawn-routes {
                 type inet:ipv4-prefix;
@@ -167,6 +221,10 @@ module bgp-message {
     }
 
     notification notify {
+        uses notify-message;
+    }
+
+    grouping notify-message {
         description "Notification Message";
         reference "http://tools.ietf.org/html/rfc4271#section-4.5";