Add INFO.yaml for GBP
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / model / forwarding.yang
index d3394699f433e27311ab82a32101d994dae36c86..5945a0bb5a6d9dee94642f15ae89b8a840d035f7 100644 (file)
@@ -66,11 +66,9 @@ module forwarding {
     grouping context-key {
         leaf context-type {
             type context-type-ref;
-            mandatory true;
         }
         leaf context-id {
             type gbp-common:context-id;
-            mandatory true;
         }
     }
 
@@ -81,39 +79,40 @@ module forwarding {
         }
     }
 
-    grouping forwarding-with-tenant-fields {
-        leaf tenant-id {
-            type gbp-common:tenant-id;
-            description
-                        "The tenant with which forwarding-context is associated";
-        }
+    grouping forwarding-fields {
 
-        list forwarding-context {
-            key "context-type context-id";
+        container parent {
             uses context-key;
-
-            uses has-address-type;
-            container parent {
-                uses context-key;
-            }
         }
 
-        list network-domain {
-            key "network-domain-type network-domain-id";
-            uses network-domain-key;
-
-            container parent {
-                uses context-key;
-            }
-
-            description "Network domain can be augmented with further information.";
+        leaf name {
+            type gbp-common:name;
         }
     }
 
     container forwarding {
         list forwarding-by-tenant {
             key tenant-id;
-            uses forwarding-with-tenant-fields;
+            leaf tenant-id {
+                type gbp-common:tenant-id;
+                description
+                            "The tenant with which forwarding-context is associated";
+            }
+
+            list forwarding-context {
+                key "context-type context-id";
+                uses context-key;
+
+                uses forwarding-fields;
+            }
+
+            list network-domain {
+                key "network-domain-type network-domain-id";
+                uses network-domain-key;
+
+                uses forwarding-fields;
+                description "Network domain can be augmented with further information.";
+            }
         }
     }