[OPNFLWPLUG-656] Translate/convert in Services (remove dependency on DeviceContext) Created: 23/Mar/16  Updated: 27/Sep/21  Resolved: 17/May/16

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jozef Slezák Assignee: Tomas Slusny
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by OPNFLWPLUG-654 Deprecate PortNumberCache (OF Plugin ... Resolved
External issue ID: 5591

 Description   

Call DeviceContext.oook() before creating instance of the service (encapsulate to util method). For classes that are currently calling DeviceContext.oook() add parameter to the constructor:
a/ org.opendaylight.openflowplugin.impl.statistics.services.AggregateFlowsInTableService
b/ org.opendaylight.openflowplugin.impl.statistics.services.OpendaylightFlowStatisticsServiceImpl

Call getMessageConverter(key) before creating instance of the service (encapsulate to util method). Add argument ConvertorMessageToOFJava to constructor of class and stop using getDeviceContext():
c/ org.opendaylight.openflowplugin.impl.services.SalExperimenterMessageServiceImpl

org.opendaylight.openflowplugin.api.openflow.device.MessageTranslator<I, O>
a/ org.opendaylight.openflowplugin.impl.translator.AggregatedFlowStatisticsTranslator
b/ org.opendaylight.openflowplugin.impl.translator.FlowRemovedTranslator
c/ org.opendaylight.openflowplugin.impl.translator.FlowRemovedV10Translator
d/ org.opendaylight.openflowplugin.impl.translator.PacketReceivedTranslator (see OPNFLWPLUG-655 PortNumberCache)
e/ org.opendaylight.openflowplugin.impl.translator.PortUpdateTranslator



 Comments   
Comment by Tomas Slusny [ 28/Apr/16 ]

What do you mean by util methods? I created static "util" method .createWithOook for both services, what calls DeviceContext.oook() and then creates the service with result from previous call passed to constructor.

Comment by Tomas Slusny [ 10/May/16 ]

Gerrit: https://git.opendaylight.org/gerrit/#/c/38592/

Generated at Wed Feb 07 20:33:02 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.