Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-315

OutputActionBuilder.setOutputNodeConnector(new Uri("1")); needs to be replaced with ... setOutputNodeConnector(new NodeConnectorId(...))

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Do
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 2382

    Description

      In a number of places of the controller code, I see code that looks like this:

      1 private void prepareActionOutput(OutputActionCaseBuilder wrapper)

      { 2 OutputActionBuilder outputActionBuilder = new OutputActionBuilder(); 3 outputActionBuilder.setOutputNodeConnector(new Uri("1")); <==== ?!? 4 wrapper.setOutputAction(outputActionBuilder.build()); 5 }

      Line 3 is an issue because while it is legal, it is not a NodeConectorId type.

      As mentioned by Martin in core review:

      https://git.opendaylight.org/gerrit/#/c/12568/
      Martin Bobak Nov 12 2:44 AM
      Patch Set 8: -Code-Review
      I do believe, that patchset 8 as well as patchset 1 is not responsible for
      uri becoming just ‘CONTROLLER’. W/out the 'OF:dpid:’. Method
      toADNodeConnectorId always returns only port number part of uri - as a short
      number or whatever string it was.

      there is quite a bit of confusion on the proper use of
      "OutputActionBuilder.setOutputNodeConnector()" because it takes Uri and that
      has the potential of run time bugs where the Type:DPID:Port notation is not
      provided. A better idea would be to make
      OutputActionBuilder.setOutputNodeConnector() require NodeConnectorId as the parameter.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            flavio@flaviof.com Flavio Fernandes
            flavio@flaviof.com Flavio Fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: