[OPNFLWPLUG-657] NodeId+DatapathId in Services (remove dependency on DeviceContext) Created: 23/Mar/16  Updated: 27/Sep/21  Resolved: 16/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


External issue ID: 5592

 Description   

Subclasses of org.opendaylight.openflowplugin.impl.services.AbstractService should have their own field for accessing NodeId+DatapathId+version. For example these classes use NodeId/DatapathId just for logging:
a/ org.opendaylight.openflowplugin.impl.statistics.services.dedicated.StatisticsGatheringService
b/ org.opendaylight.openflowplugin.impl.statistics.services.dedicated.StatisticsGatheringOnTheFlyService
c/ org.opendaylight.openflowplugin.impl.statistics.services.MatchingFlowsInTableService
d/ ... (all other subclasses)

Lets used DeviceState for accessing at least:

  • nodeId
  • version
  • datapathId (accesible in DeviceState.getFeatures())

This deviceContext is propagated also to this transform utility functions but it is not necessary (propagate there only DeviceState):
e/ org.opendaylight.openflowplugin.impl.statistics.services.compatibility.FlowStatisticsToNotificationTransformer.transformToNotification(List<MultipartReply>, DeviceContext, OpenflowVersion, TransactionId)
f/ org.opendaylight.openflowplugin.impl.statistics.services.compatibility.GroupStatisticsToNotificationTransformer.transformToNotification(List<MultipartReply>, DeviceContext, OpenflowVersion, TransactionId)
g/ org.opendaylight.openflowplugin.impl.statistics.services.compatibility.MeterStatisticsToNotificationTransformer.transformToNotification(List<MultipartReply>, DeviceContext, OpenflowVersion, TransactionId)
h/ org.opendaylight.openflowplugin.impl.statistics.services.compatibility.QueueStatisticsToNotificationTransformer.transformToNotification(List<MultipartReply>, DeviceContext, OpenflowVersion, TransactionId)
i/ org.opendaylight.openflowplugin.impl.statistics.services.compatibility.NodeConnectorStatisticsToNotificationTransformer.transformToNotification(List<MultipartReply>, DeviceContext, OpenflowVersion, TransactionId)
j/ org.opendaylight.openflowplugin.impl.statistics.services.compatibility.QueueStatisticsToNotificationTransformer.transformToNotification(List<MultipartReply>, DeviceContext, OpenflowVersion, TransactionId)



 Comments   
Comment by Tomas Slusny [ 31/Mar/16 ]

I am bit confused about the first half of the description. Should I add DeviceState to AbstractService constructor and then modify AbstractService.getVersion() and AbstractService.getDatapathId() to get these values from DeviceState and not DeviceContext.Features? And then add another method, AbstractService.getNodeId() what will return NodeId of DeviceState and update subclasses according to these changes? Because, even with these changes, I cannot replace usage of the DeviceContext, because subclasses are using MessageSpy from DeviceContext.

Comment by Tomas Slusny [ 04/Apr/16 ]

GERRIT:
https://git.opendaylight.org/gerrit/37082
https://git.opendaylight.org/gerrit/37083

Comment by Jozef Bacigal [ 18/Apr/16 ]

Transformers merged.

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