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

Incompatible ENUM and boolean representations #69

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

Incompatible ENUM and boolean representations #69

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

Comments

@kot-begemot-uk
Copy link

All standardized representations for ENUM and boolean such as RFC 4717, 7951, etc use the textual representation of ENUMs and booleans.

CPS presently can only understand or generate the numerical for ENUMs and uses 0/1 instead of true/false for booleans. This use of yang modeled data is not interoperable and requires the use of yang models to convert it to an interop form on every operation.

@rakeshdatta
Copy link
Collaborator

@kot-begemot-uk Hi Anton,
can you please help me with the information mentioned in: https://github.com/open-switch/opx-docs/wiki/Report-bugs

@kot-begemot-uk
Copy link
Author

RFC8040 and the netconf RFCs specify that ENUMs are represented by their named values and boolean is represnted by true and false. The yang RFCs (both yang 1.0 and 1.1) are also fairly specific that the numeric values for enum are purely "implementer's business" and should not be used for interchange.
CPS violates every single one of these.

@kot-begemot-uk
Copy link
Author

Example violations:
base-if-phy/if/interfaces/interface/npu-id = 0
dell-base-if-cmn/if/interfaces/interface/if-index = 5
dell-if/if/interfaces/interface/phys-address = 90:b1:1c:f4:ef:a0
dell-if/if/interfaces/interface/speed = 8 <<<VIOLATES RFCs
if/interfaces/interface/enabled = 0<<<VIOLATES RFCs
base-if-phy/if/interfaces/interface/learn-mode = 3<<<VIOLATES RFCs
if/interfaces/interface/name = e101-001-0
dell-if/if/interfaces/interface/duplex = 1<<<VIOLATES RFCs
dell-if/if/interfaces/interface/auto-negotiation = 0<<<VIOLATES RFCs
if/interfaces/interface/type = ianaift:ethernetCsmacd
dell-if/if/interfaces/interface/tx-idle-time = 768
dell-if/if/interfaces/interface/oui = 6976381
dell-if/if/interfaces/interface/tx-wake-time = 768
dell-if/if/interfaces/interface/mtu = 1532
dell-if/if/interfaces/interface/mode = 1<<<VIOLATES RFCs
base-if-phy/if/interfaces/interface/port-id = 1
dell-base-if-cmn/if/interfaces/interface/vlan-filter = 2<<<VIOLATES RFCs
base-if-phy/if/interfaces/interface/phy-media = 1<<<VIOLATES RFCs
dell-if/if/interfaces/interface/fec = 2<<<VIOLATES RFCs
base-if-phy/if/interfaces/interface/tagging-mode = 3<<<VIOLATES RFCs
dell-if/if/interfaces/interface/eee = 0<<<VIOLATES RFCs

Out of reported data 75% are in violation of the RFCs to start off with and unacceptable to any RFC compliant implementation.

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