Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of binary types where well known yang/ietf types should be used #23

Open
kot-begemot-uk opened this issue Mar 9, 2018 · 6 comments
Assignees

Comments

@kot-begemot-uk
Copy link

All models use binary blobs for ip addresses and macs. There is a set of types defined in the ietf-types and ietf-yang-types models imported by OPX which should be used in order to interoperate with any other yang based system.

@rakeshdatta
Copy link

rakeshdatta commented Mar 9, 2018

I see what you mean.

  • ietf-yang-type is defining the mac-address as:
    type string {
    pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
    }

  • OPS is defining the mac-address as:
    type binary {
    length "6";
    }

This is an internal data representation.
Can u plz elaborate, with example, what interop issues are you facing due to this?

@kot-begemot-uk
Copy link
Author

kot-begemot-uk commented Mar 9, 2018 via email

@rakeshdatta
Copy link

rakeshdatta commented Mar 12, 2018

Hi Anton,

I did dig deeper into it and I agree with your point. From inter-op perspective, It's always ideal to use the IETF-defined types. However, there are numerous integrations with OPX, that require these types to be customized. That's why we had to define it in the most general and simplest form, i.e. binary. This is a pure design decision.

Modifying these types is not feasible in the next release, because it would need a wide-spread churn.
However, I would do a value assessment of converting these custom types into IETF-types in the subsequent release.If found useful we would incorporate it that time.Will keep you updated in case we decide to do so.

Thanks

@rakeshdatta
Copy link

Hi @kot-begemot-uk I am re-evaluating this issue now. To present the case better can you please provide all the information mentioned here: https://github.com/open-switch/opx-docs/wiki/Report-bugs

@kot-begemot-uk
Copy link
Author

kot-begemot-uk commented Sep 27, 2018

Present in all versions.

The following elements in dell-base-common.yang are incompatible with all known upstream yang implementations because they are in violation of RFC6021 which clearly determines what their representations should be for interchange purposes.

typedef mac-address {
type binary {
length "6";
}
description
"This type denotes a MAC address as a 6 octet binary number
in network-byte order.";
}
typedef ipv4-address {
type binary {
length "4";
}
description
"This type denotes a IPv4 address as a 4 octet binary number
in network-byte order.";
}

typedef ipv6-address {
type binary {
length "16";
}
description
"This type denotes a IPv6 address as a 16 octet binary number
in network-byte order.";
}

typedef ip-address {
type union {
type base-cmn:ipv4-address;
type base-cmn:ipv6-address;
}

@kot-begemot-uk
Copy link
Author

What is the problem you are reporting - Fundamental design fault
Do you have a use case including examples? - yes, stated
Is there a blocker? (Y/N), and include the reasoning if it is a blocker. - it is a blocker for implementing restconf, netconf or any other interop natively without presenting a "hacked" model to the consumer
OPX version that you are using (latest or specific version) - all up to head of tree
Which platform are you using? - Irrelevant as bug is on all platforms
How frequently is the bug reproducible (always, intermittently, and so on)? - Always
Include the steps to reproduce the problem - Just read the rfc please
Include any logs (journalctl -f, opx-show-version, opx-show-system-status, and so on). - not applicable
Have you found a workaround that resolves your problem? - none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants