Bug 607 - PCEP Segment Routing - yang model 87/6887/7
authorMilos Fabian <milfabia@cisco.com>
Mon, 12 May 2014 06:42:32 +0000 (08:42 +0200)
committerMilos Fabian <milfabia@cisco.com>
Wed, 4 Jun 2014 12:21:59 +0000 (14:21 +0200)
-created yang model odl-pcep-segment-routing02
-based on http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02
-SR-ERO object and subobject
-SR-PCE-CAPABILITY TLV
-related augmentation

-created yang model odl-pcep-lsp-setup-type01
-based on http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01
-PATH-SETUP-TYPE TLV
-related augmentations

Change-Id: I9d0b0d1a1ad4adae843c04009d3259fd23f50f2a
Signed-off-by: Milos Fabian <milfabia@cisco.com>
pcep/pom.xml
pcep/segment-routing/pom.xml [new file with mode: 0644]
pcep/segment-routing/src/main/yang/odl-pcep-lsp-setup-type01.yang [new file with mode: 0644]
pcep/segment-routing/src/main/yang/odl-pcep-segment-routing02.yang [new file with mode: 0644]

index 3f02262cbc06c7be6d20938922833b16507429e9..0b29c279e724a4334bbdf12b86a0a71b9d958859 100644 (file)
@@ -52,6 +52,7 @@
         <module>tunnel-provider-config</module>
 
         <module>controller-config</module>
+        <module>segment-routing</module>
     </modules>
 
     <dependencyManagement>
diff --git a/pcep/segment-routing/pom.xml b/pcep/segment-routing/pom.xml
new file mode 100644 (file)
index 0000000..86dc800
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2013 Cisco Systems, Inc. and others.  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
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+   <scm>
+      <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
+      <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
+      <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
+      <tag>HEAD</tag>
+   </scm>
+   <parent>
+      <groupId>org.opendaylight.bgpcep</groupId>
+      <artifactId>pcep-parent</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
+   </parent>
+   <artifactId>pcep-segment-routing</artifactId>
+   <description>PCE Segment Routing model plugin</description>
+   <packaging>bundle</packaging>
+   <name>${project.artifactId}</name>
+   <prerequisites>
+      <maven>3.0.4</maven>
+   </prerequisites>
+
+   <dependencies>
+      <dependency>
+         <groupId>${project.groupId}</groupId>
+         <artifactId>pcep-ietf-stateful07</artifactId>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-maven-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+               <instructions>
+                  <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+               </instructions>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+</project>
\ No newline at end of file
diff --git a/pcep/segment-routing/src/main/yang/odl-pcep-lsp-setup-type01.yang b/pcep/segment-routing/src/main/yang/odl-pcep-lsp-setup-type01.yang
new file mode 100644 (file)
index 0000000..b5c3944
--- /dev/null
@@ -0,0 +1,86 @@
+module odl-pcep-lsp-setup-type01 {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:pcep:lsp:setup:type:01";
+    prefix "lst01";
+
+    import pcep-types { prefix pcep; revision-date 2013-10-05; }
+    import pcep-message { prefix msg; revision-date 2013-10-07; }
+    import odl-pcep-ietf-stateful07 { prefix stateful; revision-date 2013-12-22; }
+    import odl-pcep-ietf-initiated00 { prefix crabbe; revision-date 2013-11-26; }
+    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 data model of path setup type in PCEP messages,
+        draft-sivabalan-pce-lsp-setup-type-01.
+
+        Copyright (c)2014 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 "2014-05-07" {
+        description
+            "Initial revision.";
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01";
+    }
+
+    grouping path-setup-type-tlv {
+        description "PATH-SETUP-TYPE TLV";
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+
+        container path-setup-type {
+            uses pcep:tlv;
+            leaf pst {
+                description "PST=0(false): Path is setup via RSVP-TE signaling protocol(default).
+                    PST=1(true): Path is setup using Segment Routing technique.";
+                type boolean;
+                default false;
+            }
+        }
+    }
+
+    augment "/msg:pcreq/msg:pcreq-message/msg:requests/msg:rp/msg:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:rp/msg:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/msg:pcntf/msg:pcntf-message/msg:notifications/msg:rps/msg:rp/msg:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:request-case/msg:request/msg:rps/msg:rp/msg:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/crabbe:pcinitiate/crabbe:pcinitiate-message/crabbe:requests/crabbe:srp/crabbe:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates/stateful:srp/stateful:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports/stateful:srp/stateful:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+
+    augment "/msg:pcerr/msg:pcerr-message/msg:error-type/stateful:stateful-case/stateful:stateful/stateful:srps/stateful:srp/stateful:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-lsp-setup-type-01#section-3";
+        uses path-setup-type-tlv;
+    }
+}
\ No newline at end of file
diff --git a/pcep/segment-routing/src/main/yang/odl-pcep-segment-routing02.yang b/pcep/segment-routing/src/main/yang/odl-pcep-segment-routing02.yang
new file mode 100644 (file)
index 0000000..b40f227
--- /dev/null
@@ -0,0 +1,209 @@
+module odl-pcep-segment-routing02 {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:pcep:segment:routing:02";
+    prefix "sr02";
+
+    import pcep-types { prefix pcep; revision-date 2013-10-05; }
+    import pcep-message { prefix msg; revision-date 2013-10-07; }
+    import odl-pcep-ietf-stateful07 { prefix stateful; revision-date 2013-12-22; }
+    import odl-pcep-ietf-initiated00 { prefix crabbe; revision-date 2013-11-26; }
+    import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+    import network-topology { prefix nt; revision-date 2013-10-21; }
+    import network-topology-pcep { prefix pn; revision-date 2013-10-24; }
+    import odl-pcep-lsp-setup-type01 { prefix lst01; revision-date 2014-05-07; }
+
+    organization "Cisco Systems, Inc.";
+    contact "Milos Fabian <milfabia@cisco.com>";
+
+    description
+        "This module contains the data model of PCEP Extensions for Segment Routing,
+        draft-sivabalan-pce-segment-routing-02.
+
+        Copyright (c)2014 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 "2014-05-06" {
+        description
+            "Initial revision.";
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02";
+    }
+
+    grouping sr-pce-capability-tlv {
+        description "SR-PCE-CAPABILITY TLV";
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.1.1";
+
+        container sr-pce-capability {
+            uses pcep:tlv;
+            leaf msd {
+                description "Maximum SID Depth";
+                type uint8;
+                default 0;
+            }
+        }
+    }
+
+    augment "/msg:open/msg:open-message/msg:open/msg:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.1";
+        uses sr-pce-capability-tlv;
+    }
+
+    augment "/msg:pcerr/msg:pcerr-message/msg:error-type/msg:session-case/msg:session/msg:open/msg:tlvs" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.1";
+        uses sr-pce-capability-tlv;
+    }
+
+    typedef sid-type {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.3.1";
+        type enumeration {
+            enum ipv4-node-id {
+                value 1;
+            }
+            enum ipv6-node-id {
+                value 2;
+            }
+            enum ipv4-adjacency {
+                value 3;
+            }
+            enum ipv6-adjacency {
+                value 4;
+            }
+            enum unnumbered {
+                value 5;
+            }
+        }
+    }
+
+    grouping sr-ero-object {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.3";
+        container sr-ero {
+            uses pcep:object;
+            list subobject {
+                order-by user;
+                reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.3.1";
+                leaf loose {
+                    type boolean;
+                    mandatory true;
+                }
+                leaf sid-type {
+                    type sid-type;
+                }
+                leaf flags {
+                    type bits {
+                        bit m {
+                            position 31;
+                        }
+                        bit c {
+                            position 30;
+                        }
+                        bit s {
+                            position 29;
+                        }
+                        bit f {
+                            position 28;
+                        }
+                    }
+                    mandatory true;
+                }
+
+                leaf sid {
+                    description "Segment Identifier";
+                    type uint32;
+                }
+
+                choice nai {
+                    reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-5.3.2";
+                    description "Node or Adjacency Identifier";
+                    case ip-node-id {
+                        when "../sid-type = 'ipv4-node-id' or ../sid-type = 'ipv6-node-id'";
+                        description "IP Node ID";
+                        leaf ip-address {
+                            type inet:ip-address;
+                            mandatory true;
+                        }
+                    }
+                    case ip-adjacency {
+                        when "../sid-type = 'ipv4-adjacency' or ../sid-type = 'ipv6-adjacency'";
+                        description "IP Adjacency";
+                        leaf local-ip-address {
+                            type inet:ip-address;
+                            mandatory true;
+                        }
+                        leaf remote-ip-address {
+                            type inet:ip-address;
+                            mandatory true;
+                        }
+                    }
+                    case unnumbered-adjacency {
+                        when "../sid-type = 'unnumbered'";
+                        description "Unnumbered Adjacency with IPv4 NodeIDs";
+                        leaf local-node-id {
+                            type uint32;
+                            mandatory true;
+                        }
+                        leaf local-interface-id {
+                            type uint32;
+                            mandatory true;
+                        }
+                        leaf remote-node-id {
+                            type uint32;
+                            mandatory true;
+                        }
+                        leaf remote-interface-id {
+                            type uint32;
+                            mandatory true;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    augment "/msg:pcrep/msg:pcrep-message/msg:replies/msg:result/msg:success-case/msg:success/msg:paths" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.2";
+        uses sr-ero-object;
+    }
+
+    //stateful07
+    augment "/crabbe:pcinitiate/crabbe:pcinitiate-message/crabbe:requests" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.3";
+        uses sr-ero-object;
+    }
+
+    augment "/stateful:pcrpt/stateful:pcrpt-message/stateful:reports" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.4";
+        container sr-te-path {
+            uses sr-ero-object;
+        }
+    }
+
+    augment "/stateful:pcupd/stateful:pcupd-message/stateful:updates" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.5";
+        container sr-te-path {
+            uses sr-ero-object;
+        }
+    }
+
+    //nt-pcep
+    augment "/pn:add-lsp/pn:input/pn:arguments" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.3";
+        container sr-te-path {
+            uses sr-ero-object;
+        }
+    }
+
+    augment "/pn:update-lsp/pn:input/pn:arguments" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.5";
+        container sr-te-path {
+            uses sr-ero-object;
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology/nt:node/pn:path-computation-client/pn:reported-lsp/pn:path" {
+        reference "http://tools.ietf.org/html/draft-sivabalan-pce-segment-routing-02#section-4.4";
+        uses sr-ero-object;
+    }
+}
\ No newline at end of file