Deficiencies in current yangtool generation of ietf types.

Description

 

This results in the following

Attachments

3
  • 17 Mar 2015, 11:04 AM
  • 17 Mar 2015, 10:52 AM
  • 16 Mar 2015, 02:54 PM
100% Done
Loading...

Activity

Show:

Robert Varga March 31, 2018 at 6:48 PM

We need to be able to inject the annotation externally so things like ietf-inet-types do not have to be edited.

Robert Varga November 8, 2017 at 1:35 AM

I think we can solve this via a set of tricks, which do require some changes in how yang-model-api and yang-data-api contracts work around string types.

What we need to do is semantically bind a derived type definition with a data type representation other than string. This needs to happen at model definition time because it affects default statement mapping, as known to the system. To fulfill that requirement, we can support this feature only types marked with an annotation, of whose base type is either a built-in type or an unannotated type.

The annotation needs to a FQCN (or similarly unique) pointer towards a codec-type support class which defines native representation class and toString/forString factory methods, which provide

These annotations are expected to be packaged along with the base model and the support class, so that is difficult to encounter a situation when we are seeing the model without the classes being present - that particular scenario being an error case, where we fall back to string representation and java binding suffers, as it needs to recover from that.

Robert Varga March 6, 2017 at 1:18 PM

Anton Ivanov September 1, 2015 at 7:57 AM

(In reply to Robert Varga from comment #26)
> https://wiki.opendaylight.org/view/
> String_data_normalization_and_alternative_storage lists the requirements and
> preliminary breakdown.

One comment on the last paragraph.

You cannot use InetAddress as it will automatically convert v4 in v6 to v4. I was also having some JMX issues when I tried to add it to the API.

So I would suggest that any optimization stop at byte[] and integer derived types.

A.

Anton Ivanov April 16, 2015 at 4:10 PM

New gerrit:

https://git.opendaylight.org/gerrit/#/c/18450/

Corresponding openflowjava java gerrits on Helium-SR3 (the yangtools one cleanly cherry-picks on helium-sr2 or sr3)

https://git.opendaylight.org/gerrit/18451

Openflowplugin

https://git.opendaylight.org/gerrit/18452

L2Switch

https://git.opendaylight.org/gerrit/18453

OF and OFJ are helium based because the master is still in-flux.

Details

Assignee

Reporter

Priority

Created March 12, 2015 at 5:20 PM
Updated December 22, 2024 at 2:15 AM