Introduced renderer yang API
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / model / forwarding.yang
index a191cc11d6ed37a735e067d5ed6b1643ea8d4f0c..d39e0e4a4d985189fb83fc50c341e08390f4baed 100644 (file)
@@ -82,35 +82,39 @@ module forwarding {
         }
     }
 
-    container forwarding {
-        list forwarding-by-tenant {
-            key tenant-id;
-            leaf tenant-id {
-                type gbp-common:tenant-id;
-                description
-                            "The tenant with which forwarding-context is associated";
-            }
+    grouping 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;
+        list forwarding-context {
+            key "context-type context-id";
+            uses context-key;
 
-                uses has-address-type;
-                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;
-                }
+        list network-domain {
+            key "network-domain-type network-domain-id";
+            uses network-domain-key;
 
-                description "Network domain can be augmented with further information.";
+            container parent {
+                uses context-key;
             }
+
+            description "Network domain can be augmented with further information.";
+        }
+    }
+
+    container forwarding {
+        list forwarding-by-tenant {
+            key tenant-id;
+            uses forwarding-with-tenant-fields;
         }
     }