Bug:701-Have Typed ErrorNotification for different node errors
[controller.git] / opendaylight / md-sal / model / model-flow-service / src / main / yang / sal-flow.yang
index b3e6e45..4cb1d08 100644 (file)
@@ -38,6 +38,33 @@ module sal-flow {
         uses types:flow;
     }
 
+    grouping base-node-error-notification {
+        leaf node {
+            ext:context-reference "inv:node-context";
+                type inv:node-ref;
+        }
+    }
+
+    grouping node-error-reference {
+        choice object-reference {
+            case flow-ref{
+                leaf flow-ref {
+                        type types:flow-ref;
+                }
+            }
+            case group-ref{
+                leaf group-ref {
+                    type group-type:group-ref;
+                }
+            }
+            case meter-ref{
+                leaf meter-ref {
+                    type meter-type:meter-ref;
+                }
+            }
+        }
+    }
+
     /** Base configuration structure **/
     grouping flow-update {
         uses "inv:node-context-ref";
@@ -124,28 +151,8 @@ module sal-flow {
         uses error:error-message;
         uses tr:transaction-aware;
         uses tr:transaction-metadata;
-        choice object-reference {
-        case flow-ref{
-                   leaf flow-ref {
-            type types:flow-ref;
-         }
-       }
-        case group-ref{
-                   leaf group-ref {
-            type group-type:group-ref;
-         }
-       }
-        case meter-ref{
-                   leaf meter-ref {
-            type meter-type:meter-ref;
-         }
-       }
-     }
-        leaf node {
-            ext:context-reference "inv:node-context";
-            type inv:node-ref;
-        }
-        
+        uses node-error-reference;
+        uses base-node-error-notification;
     }
     
     notification node-experimenter-error-notification {