From: Michal Rehak Date: Fri, 7 Nov 2014 11:41:13 +0000 (+0100) Subject: BUG-1764: default config for OF switch - fix X-Git-Tag: release/lithium~732 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=58ff9cb81d6f465d13b72a2652359258438f2f1b;p=openflowplugin.git BUG-1764: default config for OF switch - fix - added routed registration - added missing version property Change-Id: I1ddfaa08672b7f9492b3951a44ab22513074c925 Signed-off-by: Michal Rehak --- diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/AbstractModelDrivenSwitch.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/AbstractModelDrivenSwitch.java index 1bfa98f432..5afd47efab 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/AbstractModelDrivenSwitch.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/AbstractModelDrivenSwitch.java @@ -20,6 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeCon import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node; 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.module.config.rev141015.NodeConfigService; 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; @@ -45,6 +46,8 @@ public abstract class AbstractModelDrivenSwitch implements ModelDrivenSwitch { private RoutedRpcRegistration meterRegistration; private RoutedRpcRegistration portRegistration; + + private RoutedRpcRegistration nodeConfigRegistration; private RoutedRpcRegistration packetRegistration; @@ -117,6 +120,10 @@ public abstract class AbstractModelDrivenSwitch implements ModelDrivenSwitch { portStatisticsRegistration.registerPath(NodeContext.class, getIdentifier()); builder.add(portStatisticsRegistration); + nodeConfigRegistration = ctx.addRoutedRpcImplementation(NodeConfigService.class, this); + nodeConfigRegistration.registerPath(NodeContext.class, getIdentifier()); + builder.add(nodeConfigRegistration); + flowTableStatisticsRegistration = ctx.addRoutedRpcImplementation(OpendaylightFlowTableStatisticsService.class, this); flowTableStatisticsRegistration.registerPath(NodeContext.class, getIdentifier()); builder.add(flowTableStatisticsRegistration); diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java index b9607d5979..15043c3c10 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/OFRpcTaskFactory.java @@ -1915,6 +1915,7 @@ public abstract class OFRpcTaskFactory { builder.setXid(xid); builder.setFlags(flag); builder.setMissSendLen(input.getMissSearchLength()); + builder.setVersion(getVersion()); ListenableFuture> resultLib = JdkFutureAdapters.listenInPoolThread(taskContext.getSession().getPrimaryConductor().getConnectionAdapter().setConfig(builder.build())); Futures.addCallback(resultLib, new ResultCallback(result) { @Override