Fix to allow RESTCONF PUTing of Flows
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / group-types.yang
index e0f60e4054e4b919fc5303ec4b062b6a3d1bce07..8c874e2fe80a60f345f67fe091cde4a883fcc631 100644 (file)
@@ -2,42 +2,119 @@ module opendaylight-group-types {
     namespace "urn:opendaylight:group:types";
     prefix group;
 
-    import ietf-inet-types {prefix inet;}
-    import ietf-yang-types {prefix yang;}
-    import opendaylight-flow-types {prefix flow-types;}
+    import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
+    import ietf-yang-types {prefix yang; revision-date "2010-09-24";}   
+    import opendaylight-action-types {prefix action;}
 
-    revision "2013-09-18" {
+    revision "2013-10-18" {
         description "Initial revision of group service";
     }
 
-    typedef group-ref {
-        type instance-identifier;
+    typedef group-id {
+        type uint32;
     }
     
-    grouping group-types {
-        leaf group-type {
-            type enumeration {
-                enum group-all;
-                enum group_select;
-                enum group_indirect;
-                enum group_ff;
-            }
-        }
+    typedef bucket-id {
+       type uint32;
+    }
+    
+    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-ref;
+            type group-id;
+        }
+        
+        leaf group-name {
+            type string;
+        }
+        
+        leaf container-name {
+            type string; 
         }
         
+        leaf install {
+            type boolean; 
+        } 
+        
+        leaf barrier {
+            type boolean; 
+        }       
+        
         container buckets {
             list bucket {
-                key "order";
-                leaf order {
-                    type int32;
+                key "bucket-id";
+                leaf bucket-id {
+                    type bucket-id;
                 }
                 
                 leaf weight {
@@ -52,34 +129,15 @@ module opendaylight-group-types {
                     type uint32;
                 }
                 
-                container actions {
-                    list action {
-                        key "action-order";
-                        leaf action-order {
-                            type int32;
-                        }
-            
-                        uses flow-types:action;
-                    }
-                }
+                uses action:action-list;
             }
         }
     }
     
-    grouping group-statistics-request {
-        list group-stats {
-            key "group-id";         
-            
-            leaf group-id {
-                type int32;
-            }           
-        }
-    }
-    
     grouping group-statistics {
             
         leaf group-id {
-            type int32;
+            type group-id;
         }
         
         leaf ref-count {
@@ -105,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 {
@@ -121,55 +179,69 @@ module opendaylight-group-types {
         }       
     }
 
+    grouping group-features {
+    
+       leaf-list group-types-supported {
+               type identityref {
+                       base group-type;
+               }
+               }
+            
+       leaf-list group-capabilities-supported {
+               type identityref {
+                       base group-capability;
+               }
+               }
+
+        leaf-list max-groups {
+            type uint32;
+            description "Maximum number of groups for each type";
+            max-elements 4;
+        }
+            
+        leaf-list actions {
+            type uint32;
+            description "Bitmap number OFPAT_* that are supported";
+            max-elements 4;
+        }
+    }
+    
+    grouping group-statistics-request {
+        list group-stats {
+            key "group-id";         
+            leaf group-id {
+                type group-id;
+            }           
+        }
+    }
+    
+    
     grouping group-statistics-reply {
+       
         list group-stats {
-            key "group-stats-order";
-            leaf group-stats-order {
-                type int32;
-            }
-            
+            key "group-id";
             uses group-statistics;
         }
     }
     
-    grouping group-desc-stats {
+    grouping group-desc-stats-reply {
+       
         list group-desc-stats {
-            key "order-id";         
-            
-            leaf order-id {
-                type int32;
-            }
-            
+            key "group-id";         
             uses group;
         }
     }
     
-    grouping group-features {
-        list group-features {
-            key "order";
-            leaf order {
-                type int32;
-            }
-            
-            uses group-types;
-            type capabilities {
-                enum select-weight;
-                enum select-liveness;
-                enum chaining;
-                enum chaining-checks;
-            }   
-
-            leaf-list max-groups {
-                type uint32;
-                description "Maximum number of groups for each type";
-                max-elements 4;
-            }
-            
-            leaf-list actions {
-                type uint32;
-                description "Bitmap number OFPAT_* that are supported";
-                max-elements 4;
-            }
+    grouping group-features-reply {
+       uses group-features;
+    }
+    
+    grouping groups {
+        list group {
+            key "group-id";                  
+        
+            uses group;
         }
-    }    
+    }
+    
 }
\ No newline at end of file