Bug-2848: BGP-LS EPE extension yang model 01/23101/3
authorMilos Fabian <milfabia@cisco.com>
Mon, 22 Jun 2015 14:10:44 +0000 (16:10 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 25 Jun 2015 14:33:13 +0000 (14:33 +0000)
Two new Node Descriptors Sub-TLVs:
-BGP-ROUTER-ID
-Confederation Member
A new Protocol-ID for Link-Type NLRI.
Two new BGP-LS Attribute Sub-TLVs:
-Peer-SID
-Peer-Set-SID
-ref.: https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00

Change-Id: I78a32e4961ad73181b61750f681a496a91c8f9c5
Signed-off-by: Milos Fabian <milfabia@cisco.com>
bgp/linkstate/src/main/yang/bgp-epe.yang [new file with mode: 0644]
bgp/linkstate/src/main/yang/bgp-linkstate.yang
bgp/topology-provider/src/test/java/org/opendaylight/controller/config/yang/bgp/topology/provider/LinkstateTopologyBuilderModuleTest.java

diff --git a/bgp/linkstate/src/main/yang/bgp-epe.yang b/bgp/linkstate/src/main/yang/bgp-epe.yang
new file mode 100644 (file)
index 0000000..560fef1
--- /dev/null
@@ -0,0 +1,39 @@
+module bgp-epe {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:bgp-epe";
+    prefix "bgp-epe";
+
+    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+
+    organization "Cisco Systems, Inc.";
+    contact "Milos Fabian <milfabia@cisco.com>";
+
+    description
+        "This module contains the base data concepts contained
+        in draft-ietf-idr-bgpls-segment-routing-epe-00.
+
+        Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
+
+        This program and the accompanying materials are made available
+        under the terms of the Eclipse Public License v1.0 which
+        accompanies this distribution, and is available at
+        http://www.eclipse.org/legal/epl-v10.html";
+
+    revision "2015-06-22" {
+        description
+            "Initial revision.";
+    }
+
+    grouping epe-node-descriptors {
+        reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4.1";
+        leaf bgp-router-id {
+            description "BGP Router Identifier.";
+            type inet:ipv4-address;
+        }
+
+        leaf member-asn {
+            description "Confederation Member ASN.";
+            type inet:as-number;
+        }
+    }
+}
\ No newline at end of file
index 4183b1a27f13f7736cb9e8783df2bc67199b4a59..a842fa0578610b2737b394183365a1105b6edce5 100644 (file)
@@ -11,6 +11,7 @@ module bgp-linkstate {
     import network-concepts { prefix netc; revision-date 2013-11-25; }
     import rsvp { prefix rsvp; revision-date 2013-08-20; }
     import bgp-segment-routing { prefix bgp-sr; revision-date 2015-02-06; }
+    import bgp-epe { prefix bgp-epe; revision-date 2015-06-22; }
 
     organization "Cisco Systems, Inc.";
     contact "Dana Kutenicsova <dkutenic@cisco.com>";
@@ -94,6 +95,10 @@ module bgp-linkstate {
             enum static {
                 value 5;
             }
+            enum bgp-epe {
+                reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4";
+                value 7;
+            }
         }
     }
 
@@ -309,9 +314,11 @@ module bgp-linkstate {
                 }
                 container remote-node-descriptors {
                     uses node-identifier;
+                    uses bgp-epe:epe-node-descriptors;
                 }
                 container link-descriptors {
                     uses link-identifier;
+                    uses bgp-epe:epe-node-descriptors;
                 }
             }
             case prefix-case {
@@ -516,6 +523,16 @@ module bgp-linkstate {
         container sr-lan-adj-id {
             uses bgp-sr:lan-adjacency-segment-identifier;
         }
+        container peer-sid {
+            description "The SID representing the peer of the BGP session.";
+            reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4.3";
+            uses bgp-sr:adjacency-segment-identifier;
+        }
+        container peer-set-sid {
+            description "The SID representing the group the peer is part of.";
+            reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4.3";
+            uses bgp-sr:adjacency-segment-identifier;
+        }
     }
 
     typedef route-tag {
index ace4ff4baa94b3c6ec1e7454c0d85d5747469a56..f8503d9dcb29f6dfe967215697987529d8a6d4c5 100644 (file)
@@ -41,6 +41,7 @@ public class LinkstateTopologyBuilderModuleTest extends AbstractRIBImplModuleTes
         paths.add("/META-INF/yang/bgp-segment-routing.yang");
         paths.add("/META-INF/yang/rsvp.yang");
         paths.add("/META-INF/yang/iana.yang");
+        paths.add("/META-INF/yang/bgp-epe.yang");
         return paths;
     }