Merge "Revert "Replace tabs with spaces in config yang files""
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / group-types.yang
index 97ca8b3c71491063d21ac4284b62e537c3b56dd6..aca70a94c720f93608f68e16b77c6ae4b4a6a3d1 100644 (file)
@@ -14,20 +14,77 @@ module opendaylight-group-types {
         type uint32;
     }
     
-    grouping group-types {
-        leaf group-type {
-            type enumeration {
-                enum group-all;
-                enum group_select;
-                enum group_indirect;
-                enum group_ff;
-            }
-        }
+    typedef group-types {        
+        type enumeration {
+            enum group-all;
+            enum group-select;
+            enum group-indirect;
+            enum group-ff;
+        }        
+    }
+    
+    typedef group-capabilities { 
+        type enumeration {
+            enum select-weight;
+            enum select-liveness;
+            enum chaining;
+            enum chaining-checks;
+        }   
+    }
+    
+    identity group-type {
+       description "Base identity for all the available group types"; 
+    }
+    
+    identity group-all {
+       base group-type;
+       description "All (multicast/broadcast) group";
+    }
+    
+    identity group-select {
+       base group-type;
+       description "Select group";
+    }
+    
+    identity group-indirect {
+       base group-type;
+       description "Indirect group";
+    }
+    
+    identity group-ff {
+       base group-type;
+       description "Fast failover group";
+    }
+    
+    identity group-capability {
+       description "Base identity for all the supported group capabilities";
+    }
+    
+    identity select-weight{
+       base group-capability;
+       description "Support weight for select groups";
+    }
+
+    identity select-liveness{
+       base group-capability;
+       description "Support liveness for select groups";
+    }
+
+    identity chaining{
+       base group-capability;
+       description "Support chaining groups";
+    }
+
+    identity chaining-checks{
+       base group-capability;
+       description "Check chaining for loops and delete";
     }
     
     grouping group {
         
-        uses group-types;
+        leaf group-type {
+            type group-types;
+        }
         
         leaf group-id {
             type group-id;
@@ -119,16 +176,18 @@ module opendaylight-group-types {
     }
 
     grouping group-features {
-        uses group-types;
+    
+       leaf-list group-types-supported {
+               type identityref {
+                       base group-type;
+               }
+               }
             
-        leaf capabilities { 
-               type enumeration {
-                enum select-weight;
-                enum select-liveness;
-                enum chaining;
-                enum chaining-checks;
-            }   
-        }
+       leaf-list group-capabilities-supported {
+               type identityref {
+                       base group-capability;
+               }
+               }
 
         leaf-list max-groups {
             type uint32;