[OPNFLWPLUG-654] Deprecate PortNumberCache (OF Plugin Cluster Ready) but create NodeConnectorRefToPortTranlator Created: 23/Mar/16  Updated: 27/Sep/21  Resolved: 25/Apr/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
blocks OPNFLWPLUG-656 Translate/convert in Services (remove... Resolved
External issue ID: 5589

 Description   

Create class NodeConnectorRefToPortTranlator with two methods:
a/ toNodeConnectorRef
input: DeviceState
output: NodeConnectorRef
b/ fromNodeConnectorRef
input: DeviceState, NodeConnectorRef
output: Long

While implementing these methods use org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil (this is allready used by the cache).

After that remove this cluster buggy (Please, annotate these methods as Deprecated):

  • org.opendaylight.openflowplugin.api.openflow.device.PortNumberCache.lookupNodeConnectorRef(Long)
  • org.opendaylight.openflowplugin.api.openflow.device.PortNumberCache.storeNodeConnectorRef(Long, NodeConnectorRef)

Stop using these deprecated methods in d/ org.opendaylight.openflowplugin.impl.translator.PacketReceivedTranslator.



 Comments   
Comment by Jozef Slezák [ 23/Mar/16 ]

If needed while implementing you can also use org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil.

Comment by Tomas Slusny [ 30/Mar/16 ]

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

Comment by Jozef Bacigal [ 30/Mar/16 ]

Jozef one additional question, you wrote we need a method to convert NodeConnectorRef to Port(Long).

In DeviceState.Features.List<Ports>, which port do we shall return ? First not null, not empty ?

Comment by Jozef Slezák [ 07/Apr/16 ]

There is answer in this comment on: "Jozef one additional question, you wrote we need a method to convert NodeConnectorRef to Port(Long). In DeviceState.Features.List<Ports>, which port do we shall return ? First not null, not empty ?"

Please use algorithm: org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil.nodeConnectorIdfromDatapathPortNo(BigInteger, Long, OpenflowVersion)

You have logical error in:
https://git.opendaylight.org/gerrit/#/c/36740/3/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/NodeConnectorRefToPortTranslator.java

Comment by Jozef Slezák [ 13/Apr/16 ]

We have agreed that org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil.nodeConnectorRefFromDatapathIdPortno(BigInteger, Long, OpenflowVersion) will be used instead of org.opendaylight.openflowplugin.openflow.md.util.InventoryDataServiceUtil.nodeConnectorIdfromDatapathPortNo(BigInteger, Long, OpenflowVersion) in NodeConnectorRefToPortTranlator.

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