Merge "Bug 4957 Fix Last No Master RoleCtx cleaning"
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / md / ModelDrivenSwitch.java
index 7ee044ccbdd7c8af81f72ccc90fc235c2a3fb2ad..0120d9004f226ab95a92fd5e6f9f450980d4fdfc 100644 (file)
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.openflowplugin.api.openflow.md;
 
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import com.google.common.base.Optional;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
@@ -28,30 +29,25 @@ import org.opendaylight.yangtools.concepts.CompositeObjectRegistration;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
+import java.math.BigInteger;
+
 /**
  * interface concatenating all md-sal services provided by OF-switch
  */
-public interface ModelDrivenSwitch extends
+public interface ModelDrivenSwitch
+        extends
         SalGroupService,
         SalFlowService,
-        SalMeterService,
-        SalTableService,
-        SalPortService,
-        PacketProcessingService,
-        NodeConfigService,
-        OpendaylightGroupStatisticsService,
-        OpendaylightMeterStatisticsService,
-        OpendaylightFlowStatisticsService,
-        OpendaylightPortStatisticsService,
-        OpendaylightFlowTableStatisticsService,
-        OpendaylightQueueStatisticsService,
+        SalMeterService, SalTableService, SalPortService, PacketProcessingService, NodeConfigService,
+        OpendaylightGroupStatisticsService, OpendaylightMeterStatisticsService, OpendaylightFlowStatisticsService,
+        OpendaylightPortStatisticsService, OpendaylightFlowTableStatisticsService, OpendaylightQueueStatisticsService,
         Identifiable<InstanceIdentifier<Node>> {
 
     /**
-     * @param ctx
+     * @param rpcProviderRegistry
      * @return wrapped list of {service provider + path} registration couples
      */
-    CompositeObjectRegistration<ModelDrivenSwitch> register(ProviderContext ctx);
+    CompositeObjectRegistration<ModelDrivenSwitch> register(RpcProviderRegistry rpcProviderRegistry);
 
     /**
      * @return id of encapsulated node (served by this impl)
@@ -64,4 +60,29 @@ public interface ModelDrivenSwitch extends
      * @return session context object
      */
     SessionContext getSessionContext();
+
+    /**
+     * Returns whether this *instance* is entity owner or not
+     * @return true if it's entity owner, else false.
+     */
+    boolean isEntityOwner();
+
+    /**
+     * Set entity ownership satus of this switch in *this* instance
+     * @param isOwner
+     */
+    void setEntityOwnership(boolean isOwner);
+
+    /**
+     * Send table feature to the switch to get tables features for all the tables.
+     * @return Transaction id
+     */
+    Optional<BigInteger> sendEmptyTableFeatureRequest();
+
+    /**
+     * Method send port/desc multipart request to the switch to fetch the initial details.
+     */
+
+    public abstract void requestSwitchDetails();
+
 }