BUG 2230: RSPV Model Update 58/27058/4
authorClaudio D. Gasparini <cgaspari@cisco.com>
Wed, 16 Sep 2015 09:06:44 +0000 (11:06 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 18 Sep 2015 14:20:57 +0000 (14:20 +0000)
Protection subobject can be only set on SRRO, SERO.

Change-Id: I963eb24abaec4d738b65beb90d0b25c5f51628c4
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
rsvp/api/src/main/yang/rsvp.yang

index 37ed5b3719b495ae7621ce1d07537e9d8bff6712..08308174a2129e46f88dc789caa646999b202e79 100644 (file)
@@ -445,18 +445,6 @@ module rsvp {
                     uses unnumbered-subobject;
                 }
             }
-
-            case basic-protection-case {
-                container basic-protection {
-                    uses protection-subobject;
-                }
-            }
-
-            case dynamic-control-protection-case {
-                container dynamic-control-protection {
-                    uses protection-subobject;
-                }
-            }
         }
     }
 
@@ -546,14 +534,42 @@ module rsvp {
             reference "http://tools.ietf.org/html/rfc4873#section-4.1";
 
             uses rsvp-te-object;
-            uses explicit-route-subobjects-list;
+            uses explicit-route-subobjects-list {
+                augment "subobject-container/subobject-type" {
+                    case basic-protection-case {
+                        container basic-protection {
+                            uses protection-subobject;
+                        }
+                    }
+
+                    case dynamic-control-protection-case {
+                        container dynamic-control-protection {
+                            uses protection-subobject;
+                        }
+                    }
+                }
+            }
         }
     }
 
     grouping secondary-record-route-object {
         container secondary-record-route-object {
             uses rsvp-te-object;
-            uses record-route-subobjects-list;
+            uses record-route-subobjects-list {
+                augment "subobject-container/subobject-type" {
+                    case basic-protection-case {
+                        container basic-protection {
+                            uses protection-subobject;
+                        }
+                    }
+
+                    case dynamic-control-protection-case {
+                        container dynamic-control-protection {
+                            uses protection-subobject;
+                        }
+                    }
+                }
+            }
         }
     }
 
@@ -596,18 +612,6 @@ module rsvp {
                         }
                     }
                 }
-
-                case basic-protection-case {
-                    container basic-protection {
-                        uses protection-subobject;
-                    }
-                }
-
-                case dynamic-control-protection-case {
-                    container dynamic-control-protection {
-                        uses protection-subobject;
-                    }
-                }
             }
         }
     }