Bug-2827: role switch proposal
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / md / core / session / SessionContext.java
index 2fe1ff0d03627c7aea83b40ab421f465c5a5d7ad..eec52194be693942f4898e8ae575c0129e2999cb 100644 (file)
@@ -18,6 +18,7 @@ import org.opendaylight.openflowplugin.api.openflow.md.core.NotificationEnqueuer
 import org.opendaylight.openflowplugin.api.openflow.md.ModelDrivenSwitch;
 import org.opendaylight.openflowplugin.api.openflow.md.core.NotificationQueueWrapper;
 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ControllerRole;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortGrouping;
 import org.opendaylight.yangtools.concepts.CompositeObjectRegistration;
@@ -86,7 +87,7 @@ public interface SessionContext {
      * @return The Map of OFPhysicalPort
      */
     Map<Long, PortGrouping> getPhysicalPorts();
-    
+
     /**
      * Returns a map containing all bandwidths for all OFPorts of this switch.
      * @return The Map of bandwidths for all OFPorts
@@ -98,7 +99,7 @@ public interface SessionContext {
      * @return The Set of port ID
      */
     Set<Long> getPorts();
-    
+
     /**
      * Returns OFPhysicalPort of the specified portNumber of this switch.
      * @param portNumber The port ID
@@ -156,14 +157,24 @@ public interface SessionContext {
      * @return provider composite registration
      */
     CompositeObjectRegistration<ModelDrivenSwitch> getProviderRegistration();
-    
+
     /**
      * @return seed value for random operations
      */
     int getSeed();
-    
+
     /**
      * @return (wrapped) notification enqueue service - {@link NotificationQueueWrapper}
      */
     NotificationEnqueuer getNotificationEnqueuer();
+
+    /**
+     * @param roleOnDevice
+     */
+    void setRoleOnDevice(ControllerRole roleOnDevice);
+
+    /**
+     * @return actual role
+     */
+    ControllerRole getRoleOnDevice();
 }