Details
-
Bug
-
Status: Resolved
-
Resolution: Won't Do
-
None
-
None
-
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.