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

Keys of type binary and ygot. #788

Closed
hellt opened this issue Feb 17, 2023 · 1 comment
Closed

Keys of type binary and ygot. #788

hellt opened this issue Feb 17, 2023 · 1 comment

Comments

@hellt
Copy link
Contributor

hellt commented Feb 17, 2023

Hi all,
I have been trying to generate state Go structs (with ygot 0.24.4) for SR Linux and noticed that ygot doesn't support keys of type binary.

F0217 13:43:59.166924   21437 generator.go:376] ERROR Generating GoStruct Code: list /srl_nokia-macsec/macsec/interfaces/interface/mka/state/mka-peer has a binary key -- this is unsupported, list /srl_nokia-system/system/sync/ptp/instance/port-ds-list/neighbor-list has a binary key -- this is unsupported

Unfortunately, binary types are quite common in IETF, and some derived data elements follow IETF, for instance, sync:

  typedef clock-identity-type {
    type binary {
      length "8";
      srl_nokia-ext:output-flavor "hex";
    }
    description
      "Identifies unique entities within a PTP Network.
       The identity is an 8-octet array, constructed according
       to specifications in IEEE Std 1588";
    reference
      "IEEE Std 1588-2019: 5.3.4, 7.5.2.2";
  }

I wonder what made ygot resistance to binary keys, given that they are encoded as base64 string

Binary values are encoded with the base64 encoding scheme (see
[RFC4648], Section 4).

ADD1: some refs

@hellt
Copy link
Contributor Author

hellt commented Feb 17, 2023

Closing this, since the discussion happens in #456

@hellt hellt closed this as completed Feb 17, 2023
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

1 participant