BUG-47: more subobject models 38/1938/2
authorRobert Varga <rovarga@cisco.com>
Wed, 16 Oct 2013 18:25:50 +0000 (20:25 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 16 Oct 2013 18:32:44 +0000 (20:32 +0200)
Change-Id: I0a34dd10b38422f3a1b9e796570b95eb85e7ea7d
Signed-off-by: Robert Varga <rovarga@cisco.com>
pcep/api/src/main/yang/pcep-types.yang
rsvp/api/src/main/yang/rsvp.yang

index 122b4cfd57e44f8792df621f9b64b4ed678391a9..7734c0364e24545eef7b1fc2bb8941c851660ff1 100644 (file)
@@ -60,6 +60,10 @@ module pcep-types {
                type uint16;
        }
 
+       typedef path-key {
+               type uint16;
+       }
+
        typedef pce-id {
                type union {
                        type binary {
@@ -574,7 +578,16 @@ module pcep-types {
                                mandatory true;
                        }
 
-                       uses rsvp:explicit-route-subobjects;
+                       uses rsvp:explicit-route-subobjects {
+// FIXME: yangtools bug
+//                             augment "subobject-type" {
+//                                     case path-key {
+//                                             container path-key {
+//                                                     uses path-key-subobject;
+//                                             }
+//                                     }
+//                             }
+                       }
                }
        }
 
@@ -731,6 +744,22 @@ module pcep-types {
                }
                
                container tlvs {
+
+               }
+       }
+
+       grouping path-key-subobject {
+               reference "https://tools.ietf.org/html/rfc5520#section-3.1";
+               uses rsvp:c-subobject;
+
+               leaf pce-id {
+                       type pce-id;
+                       mandatory true;
+               }
+
+               leaf path-key {
+                       type path-key;
+                       mandatory true;
                }
        }
 
@@ -748,10 +777,7 @@ module pcep-types {
                                default false;
                        }
 
-                       leaf pce-id {
-                               type pce-id;
-                               mandatory true;
-                       }
+                       uses path-key-subobject;
                }
        }
 
@@ -970,6 +996,10 @@ module pcep-types {
                        uses metric-object;
                }
 
+               container exclude-route {
+                       uses exclude-route-object;
+               }
+
                container include-route {
                        uses include-route-object;
                }
@@ -1042,11 +1072,12 @@ module pcep-types {
                                container of {
                                        uses of-object;
                                }
-
                                container gc {
                                        uses gc-object;
                                }
-
+                               container xro {
+                                       uses exclude-route-object;
+                               }
                                list metric {
                                        uses metric-object;
                                }
index 672fdf54b896aa50173d1472719e605b631fabb6..3aa4a53d93f8faaf0c795d3c096bea9c4ad1b561 100644 (file)
@@ -238,10 +238,6 @@ module rsvp {
 
        grouping label-subobject {
                uses c-subobject;
-               leaf c-type {
-                       type uint8;
-                       mandatory true;
-               }
 
                leaf uni-directional {
                        type boolean;
@@ -330,6 +326,9 @@ module rsvp {
                        case label {
                                uses label-subobject;
                        }
+                       case srlg {
+                               uses srlg-subobject;
+                       }
                        case unnumbered {
                                uses unnumbered-subobject;
                        }