Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Due to the latest versions of this library not being compatible with CPS, this bug has been closed with an exemption being raised, but we decided to investigate into upgrading open daylight regardless, to prevent future vulnerabilities like this from happening.

References:

ODL yang tool version 6.0.1 https://javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/8.0.6/index.html

ODL yang tool version 8.0.6 https://javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/8.0.6/index.html

Incompatible Objects:

Incompatible objects currently being used within CPS with latest open daylight version


Object in OpenDaylight 6.0.1

Differences in 

OpenDaylight 8.0.6

Potential Solutions
NormalizedNode<?,?

...

Now takes no wild card arguments

Remove wild card arguments

...


ValueNode<?,?>

...

Now takes

...

one wild card

...

arguments

Currently uses getValue() to retrieve

...

list of normalized node values, no longer available in

...

latest version.

Remove unnecessary wild card arguments

Wild card is value of the node, could get body and value from that.

YangTextSchemaSourceAbstract class now contains new getSymbolicName() method of type Optional String must be implemented.

Implement new method as mentioned. Can return empty.

Image Added

DataContainerNode<?>No longer takes any arguments.Remove wild card arguments
DataContainerChild<?,?>

...

No longer takes any arguments.Remove wild card arguments

...

LeafSetNode

Currently uses getNodeType().getLocalName() to get the leaf list name, which has moved in latest version.

Currently uses getValue() to retrieve list list values, no longer available in

...

  • Currently uses getValue() to get a collection of MapEntryNodes.

...

  • Overridden method which can take two or three arguments, JsonParserStream.create(NormailzedStreamWriter, codecFactory, SchemaNode)

OpenDaylight 8.0.6

...

  • Alternate to getVlaue could be body()

...

latest version.

getNodeType().getLocalName() is found under getIdentifier().getNodeType().getLocalName

...

Image Added

Alternative to getValue() could be body() - returns all child nodes, may have to be re-written to accommodate this.

Image Added

MapNode

Currently uses getValue() to get a collection of MapEntryNodes, which is not available in latest version.

Alternative to above could be mapNode.asMap().values()

Image Added

YangSyntaxErrorException

...

Has moved to new location.

...

Import exception from new location.
JsonParserStream

Overridden method which can take two or three arguments, currently is implemented as JsonParserStream.create(NormailzedStreamWriter, codecFactory, SchemaNode).

Latest version uses different object for third argument JsonParserStream.create(NormailzedStreamWriter, codecFactory, EffectiveStatementInference).

Not sure yet, the Schema Node object is used in many places for assigning node values, would have to potentially complete rewrite this to use to EffectiveStatementInterface.

Image Added


JsonParserStream

see relevant commit: https://gerrit.onap.org/r/c/cps/+/131019

Image Added

    • Using the above POC, the following existing test passes for 2 out of 3 

Image Added

      • Below shows the exception that is thrown for the failing test

Image Added