Bug 7453 - FlowRemoved doesn't have Removed Reason Information
[openflowplugin.git] / model / model-flow-base / src / main / yang / opendaylight-flow-types.yang
index 9de9cb7215173d72f6cf923efc0d4ca66986c6c8..ad70cda6016cce94aba516361bc3b024438ccd38 100644 (file)
@@ -122,15 +122,27 @@ module opendaylight-flow-types {
             bit SEND_FLOW_REM;
         }
     }
+     typedef removed-flow-reason {
+            type enumeration {
+                enum OFPRR_IDLE_TIMEOUT{
+                    value 0;
+                    description "Flow idle time exceeded idle_timeout.";
+                }
+                enum OFPRR_HARD_TIMEOUT {
+                    value 1;
+                    description "Time exceeded hard_timeout.";
+                }
+                enum OFPRR_DELETE {
+                    value 2;
+                    description "Evicted by a DELETE flow mod.";
+                }
+                enum OFPRR_GROUP_DELETE {
+                    value 3;
+                    description "Group was removed.";
+                }
 
-    typedef removed_reason_flags {
-        type bits {
-            bit IDLE_TIMEOUT;
-            bit HARD_TIMEOUT;
-            bit DELETE;
-            bit GROUP_DELETE;
-        }
-    }
+            }
+     }
     
     grouping generic_flow_attributes {
         leaf priority {
@@ -245,7 +257,7 @@ module opendaylight-flow-types {
         uses generic_flow_attributes;
         
         leaf removed_reason {
-            type removed_reason_flags;
+            type removed-flow-reason;
         }
 
         leaf duration_nsec {