Bug-2827: role switch proposal
[openflowplugin.git] / openflowplugin / src / main / yang / openflow-plugin-cfg-impl.yang
index 3ac7acc27264158842ceb8496883fb0429449986..ed459ece7e87ba3adb2f6583bceb9b77d4767f87 100644 (file)
@@ -39,6 +39,21 @@ module openflow-provider-impl {
         config:java-name-prefix MsgSpyService;
     }
 
+    // role of OFPlugin instance
+    typedef ofp-role {
+        type enumeration {
+            enum NOCHANGE {
+                description "no change to role";
+            }
+            enum BECOMEMASTER {
+                description "promote current role to MASTER";
+            }
+            enum BECOMESLAVE {
+                description "demote current role to SLAVE";
+            }
+        }
+    }
+
     augment "/config:modules/config:module/config:configuration" {
         case openflow-provider-impl {
             when "/config:modules/config:module/config:type = 'openflow-provider-impl'";
@@ -59,6 +74,10 @@ module openflow-provider-impl {
                     }
                 }
             }
+            leaf role {
+                type ofp-role;
+                default "NOCHANGE";
+            }
         }
 
         case msg-spy-service-impl {