Register for SalPortService 04/5704/2
authorMoiz Raja <moraja@cisco.com>
Fri, 21 Mar 2014 00:21:53 +0000 (17:21 -0700)
committerMichal Rehak <mirehak@cisco.com>
Fri, 21 Mar 2014 12:05:30 +0000 (13:05 +0100)
This is required so that someone can use the SalPortService as a consumer
- rebased onto merged change

Change-Id: I14069f04420285a783c16926543cf30ec85308b8
Signed-off-by: Moiz Raja <moraja@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/AbstractModelDrivenSwitch.java

index c8b620eae94223ad2ca34c8cb83a0da0ea2291e8..81b3bd3a550f9f0a8e40053fc8ffa2e2d33dd876 100644 (file)
@@ -21,6 +21,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.SalPortService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
@@ -44,6 +45,8 @@ public abstract class AbstractModelDrivenSwitch implements ModelDrivenSwitch {
     private RoutedRpcRegistration<SalMeterService> meterRegistration;
 
     private RoutedRpcRegistration<PacketProcessingService> packetRegistration;
+
+    private RoutedRpcRegistration<SalPortService> portRegistration;
     
     private RoutedRpcRegistration<OpendaylightFlowStatisticsService> flowStatisticsRegistration;
 
@@ -90,6 +93,11 @@ public abstract class AbstractModelDrivenSwitch implements ModelDrivenSwitch {
         tableRegistration.registerPath(NodeContext.class, getIdentifier());
         builder.add(tableRegistration);
 
+        portRegistration = ctx.addRoutedRpcImplementation(SalPortService.class, this);
+        portRegistration.registerPath(NodeContext.class, getIdentifier());
+        builder.add(portRegistration);
+
+
         packetRegistration = ctx.addRoutedRpcImplementation(PacketProcessingService.class, this);
         packetRegistration.registerPath(NodeContext.class, getIdentifier());
         builder.add(packetRegistration);