Fix to allow RESTCONF PUTing of Flows
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / group-types.yang
index 244fedb3e7e0dc0baf4dc59455749156babe0e8a..8c874e2fe80a60f345f67fe091cde4a883fcc631 100644 (file)
@@ -14,6 +14,10 @@ module opendaylight-group-types {
         type uint32;
     }
     
+    typedef bucket-id {
+       type uint32;
+    }
+    
     typedef group-types {        
         type enumeration {
             enum group-all;
@@ -32,6 +36,53 @@ module opendaylight-group-types {
         }   
     }
     
+    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 {
         
@@ -61,9 +112,9 @@ module opendaylight-group-types {
         
         container buckets {
             list bucket {
-                key "order";
-                leaf order {
-                    type int32;
+                key "bucket-id";
+                leaf bucket-id {
+                    type bucket-id;
                 }
                 
                 leaf weight {
@@ -86,7 +137,7 @@ module opendaylight-group-types {
     grouping group-statistics {
             
         leaf group-id {
-            type int32;
+            type group-id;
         }
         
         leaf ref-count {
@@ -112,9 +163,9 @@ module opendaylight-group-types {
         
         container buckets {
             list bucket-counter {
-                key "order";
-                leaf order {
-                    type int32;
+                key "bucket-id";
+                leaf bucket-id {
+                    type bucket-id;
                 }
                 
                 leaf packet-count {
@@ -129,23 +180,18 @@ module opendaylight-group-types {
     }
 
     grouping group-features {
-        leaf types {
-            type bits {
-               bit group-all;
-               bit group-select;
-               bit group-indirect;
-               bit group-ff;
-            }
-        }
+    
+       leaf-list group-types-supported {
+               type identityref {
+                       base group-type;
+               }
+               }
             
-        leaf capabilities { 
-               type bits {
-                bit select-weight;
-                bit select-liveness;
-                bit chaining;
-                bit chaining-checks;
-            }   
-        }
+       leaf-list group-capabilities-supported {
+               type identityref {
+                       base group-capability;
+               }
+               }
 
         leaf-list max-groups {
             type uint32;
@@ -163,9 +209,8 @@ module opendaylight-group-types {
     grouping group-statistics-request {
         list group-stats {
             key "group-id";         
-            
             leaf group-id {
-                type int32;
+                type group-id;
             }           
         }
     }
@@ -174,11 +219,7 @@ module opendaylight-group-types {
     grouping group-statistics-reply {
        
         list group-stats {
-            key "group-stats-order";
-            leaf group-stats-order {
-                type int32;
-            }
-            
+            key "group-id";
             uses group-statistics;
         }
     }
@@ -186,11 +227,7 @@ module opendaylight-group-types {
     grouping group-desc-stats-reply {
        
         list group-desc-stats {
-            key "order-id";         
-            leaf order-id {
-                type int32;
-            }
-            
+            key "group-id";         
             uses group;
         }
     }
@@ -199,4 +236,12 @@ module opendaylight-group-types {
        uses group-features;
     }
     
+    grouping groups {
+        list group {
+            key "group-id";                  
+        
+            uses group;
+        }
+    }
+    
 }
\ No newline at end of file