Merge "Adding name param for forwarding enties:"
[groupbasedpolicy.git] / groupbasedpolicy / src / main / yang / model / forwarding.yang
index d3394699f433e27311ab82a32101d994dae36c86..2fcca5d1c20de51b74f56b7ddcab945ab3bb8b34 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,6 +79,17 @@ module forwarding {
         }
     }
 
+    grouping forwarding-fields {
+
+        container parent {
+            uses context-key;
+        }
+
+        leaf name {
+            type gbp-common:name;
+        }
+    }
+
     grouping forwarding-with-tenant-fields {
         leaf tenant-id {
             type gbp-common:tenant-id;
@@ -92,20 +101,14 @@ module forwarding {
             key "context-type context-id";
             uses context-key;
 
-            uses has-address-type;
-            container parent {
-                uses context-key;
-            }
+            uses forwarding-fields;
         }
 
         list network-domain {
             key "network-domain-type network-domain-id";
             uses network-domain-key;
 
-            container parent {
-                uses context-key;
-            }
-
+            uses forwarding-fields;
             description "Network domain can be augmented with further information.";
         }
     }