BUG-45 : updated yang models for bgp. 55/1255/1
authorDana Kutenicsova <dkutenic@cisco.com>
Wed, 18 Sep 2013 09:25:01 +0000 (11:25 +0200)
committerDana Kutenicsova <dkutenic@cisco.com>
Wed, 18 Sep 2013 09:34:12 +0000 (11:34 +0200)
Change-Id: I9a0c82a76bc01c322e130bb7d4a0b0f75ef65406
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
bgp/parser-api/src/main/yang/bgp-message.yang [moved from bgp/parser-api/src/main/yang/bgpls-message.yang with 55% similarity]
bgp/parser-api/src/main/yang/bgpls-nlri.yang

similarity index 55%
rename from bgp/parser-api/src/main/yang/bgpls-message.yang
rename to bgp/parser-api/src/main/yang/bgp-message.yang
index 37c1a3d03c7a71238503ea6d061022e470c0b100..c5da10dd7552088165855542554c4f3fd994b37d 100644 (file)
@@ -1,9 +1,12 @@
-module bgpls-message {
+module bgp-message {
        yang-version 1;
        namespace "urn:opendaylight:params:xml:ns:yang:bgp-message";
        prefix "bgp-msg";
 
-       import  ietf-inet-types { prefix inet;}
+       import  ietf-inet-types { 
+               prefix inet;
+               revision-date 2010-09-24;
+       }
 
        organization "Cisco Systems, Inc.";
        contact "Dana Kutenicsova <dkutenic@cisco.com>";
@@ -19,7 +22,7 @@ module bgpls-message {
                accompanies this distribution, and is available at
                http://www.eclipse.org/legal/epl-v10.html";
 
-       revision "2013-09-04" {
+       revision "2013-09-18" {
                description
                        "Initial revision.";
                reference "RFC4271, RFC4893";
@@ -50,31 +53,6 @@ module bgpls-message {
                type uint32;
        }
 
-       grouping capability-parameter {
-               reference "http://tools.ietf.org/html/rfc3392#section-4";
-       }
-
-       grouping as4-bytes-capability {
-               reference "http://tools.ietf.org/html/rfc6793";
-               uses capability-parameter;
-               leaf as-number {
-                       type as-number;
-                       mandatory true;
-               }
-       }
-
-       grouping path-attribute {
-               reference "http://tools.ietf.org/html/rfc4271#section-5";
-       }
-
-       grouping origin {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.1";
-               uses path-attribute;
-               leaf value {
-                       type origin-value;
-               }
-       }
-
        grouping as-path-segment {
                choice segment {
                        case a-set {
@@ -91,57 +69,6 @@ module bgpls-message {
                                        }
                                }
                        }
-               }
-       }
-
-       grouping as-path {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.2";
-               uses path-attribute;
-               list segments {
-                       container as-path-segment {
-                               uses as-path-segment;
-                       }
-               }
-       }
-
-       grouping next-hop {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.3";
-               uses path-attribute;
-               leaf hop {
-                       type inet:ipv4-address;
-               }
-       }
-
-       grouping multi-exit-disc {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.4";
-               uses path-attribute;
-               leaf med {
-                       type uint32;
-               }
-       }
-
-       grouping local-pref {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.5";
-               uses path-attribute;
-               leaf pref {
-                       type uint32;
-               }
-       }
-
-       grouping atomic-aggregate {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.6";
-               uses path-attribute;
-       }
-
-       grouping aggregator {
-               reference "http://tools.ietf.org/html/rfc4271#section-5.1.7";
-               uses path-attribute;
-               leaf as {
-                       type as-number;
-                       mandatory true;
-               }
-               leaf ip {
-                       type inet:ipv4-address;
                        mandatory true;
                }
        }
@@ -166,8 +93,14 @@ module bgpls-message {
                        mandatory true;
                }
                list optional-parameters {
-                       container parameter {
-                               uses capability-parameter;
+                       reference "http://tools.ietf.org/html/rfc3392#section-4";
+                       choice parameters {
+                               container as4-bytes {
+                                       reference "http://tools.ietf.org/html/rfc6793";
+                                       leaf as-number {
+                                               type as-number;
+                                       }
+                               }
                        }
                }
        }
@@ -175,16 +108,64 @@ module bgpls-message {
        notification update {
                description "Update Message";
                reference "http://tools.ietf.org/html/rfc4271#section-4.3";
-               leaf-list withdrawn-routes {
-                       type inet:ipv4-prefix;
+               container 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 origin-value;
+                                       mandatory true;
+                               }
+                       }
+                       container as-path {
+                               reference "http://tools.ietf.org/html/rfc4271#section-5.1.2";
+                               list segments {
+                                       uses as-path-segment;
+                               }
+                       }
+                       container next-hop {
+                               reference "http://tools.ietf.org/html/rfc4271#section-5.1.3";
+                               leaf hop {
+                                       type inet:ipv4-address;
+                                       mandatory true;
+                               }
+                       }
+                       container multi-exit-disc {
+                               reference "http://tools.ietf.org/html/rfc4271#section-5.1.4";
+                               presence "MULTI_EXIT_DSC present.";
+                               leaf med {
+                                       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 Aggregare attribute is present.";
+                       }
+                       container aggregator {
+                               reference "http://tools.ietf.org/html/rfc4271#section-5.1.7";
+                               leaf as {
+                                       type as-number;
+                               }
+                               leaf ip {
+                                       type inet:ipv4-address;
+                               }
+                       }
                }
-               list path-attributes {
-                       container path-attribute {
-                               uses path-attribute;
+               container withdrawn-routes {
+                       leaf-list withdrawn-routes {
+                               type inet:ipv4-prefix;
                        }
                }
-               leaf-list nlri {
-                       type inet:ipv4-prefix;
+               container nlri {
+                       leaf-list nlri {
+                               type inet:ipv4-prefix;
+                       }
                }
        }
 
index e550e76af99d6de9582dd7190908a5232f66ce02..1598752710292bdfa82c93fdd4ef03508567871f 100644 (file)
@@ -3,7 +3,10 @@ module bgpls-nlri {
        namespace "urn:opendaylight:params:xml:ns:yang:bgpls";
        prefix "nlri";
 
-       import  ietf-inet-types { prefix inet;}
+       import  ietf-inet-types { 
+               prefix inet;
+               revision-date 2010-09-24;
+       }
 
        organization "Cisco Systems, Inc.";
        contact "Dana Kutenicsova <dkutenic@cisco.com>";