Fix to allow RESTCONF PUTing of Flows
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / opendaylight-flow-types.yang
similarity index 73%
rename from opendaylight/md-sal/model/model-flow-base/src/main/yang/flow-types.yang
rename to opendaylight/md-sal/model/model-flow-base/src/main/yang/opendaylight-flow-types.yang
index 29ea8ddf1889bc8d3cfec6e37d070896fc0bd3ae..e83306db50db1155ab1d9fb7147fd71e2329cfff 100644 (file)
@@ -6,6 +6,7 @@ module opendaylight-flow-types {
     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}    
     import opendaylight-match-types {prefix match; revision-date "2013-10-26";}
     import opendaylight-action-types {prefix action;}
+    import opendaylight-meter-types {prefix meter; revision-date "2013-09-18";}
 
     revision "2013-10-26" {
         description "Initial revision of flow service";
@@ -21,46 +22,54 @@ module opendaylight-flow-types {
         }
     }
 
-    grouping instruction {
-        choice instruction {
-            case go-to-table {
-                leaf table_id {
-                    type uint8;
-                }
+     grouping instruction {
+         choice instruction {
+            case go-to-table-case {
+                container go-to-table {
+                 leaf table_id {
+                     type uint8;
+                 }
+             }
             }
-            
-            case write-metadata {
-                leaf metadata {
-                    type uint64;
-                }
-                
-                leaf metadata-mask {
-                    type uint64;
-                }
+             
+            case write-metadata-case {
+                container write-metadata {
+                 leaf metadata {
+                     type uint64;
+                 }
+                 
+                 leaf metadata-mask {
+                     type uint64;
+                 }
+             }
             }
-            
-            case write-actions {
-                uses action:action-list;
+             
+            case write-actions-case {
+                container write-actions {
+                 uses action:action-list;
+             }
             }
-            
-            case apply-actions {
-                uses action:action-list;
+             
+            case apply-actions-case {
+                container apply-actions {
+                 uses action:action-list;
+             }
             }
-            
-            case clear-actions {
-                uses action:action-list;
+             
+            case clear-actions-case {
+                container clear-actions {
+                 uses action:action-list;
+             }
             }
-            
-            case meter {
-                leaf meter {
-                    type string;
-                }
-                
-                leaf meter-id {
-                    type uint32;
-                }
-            }   
-        }
+             
+            case meter-case {
+                container meter {
+                     leaf meter-id {
+                        type meter:meter-id;
+                     } 
+                 }
+             }
+         }
     }
     
     typedef flow-mod-flags {
@@ -161,7 +170,7 @@ module opendaylight-flow-types {
     grouping flow-statistics {
         leaf packet-count {
             type yang:counter64;
-        } 
+        }
 
         leaf byte-count {
             type yang:counter64;