openconfig / ygot

A YANG-centric Go toolkit - Go/Protobuf Code Generation; Validation; Marshaling/Unmarshaling
Apache License 2.0
286 stars 107 forks source link

invalid module name prefix in IETF JSON #92

Closed larryleguo closed 7 years ago

larryleguo commented 7 years ago

ygot.ConstructIETFJSON() can generate the following JSON config:

{ "openconfig-system:openconfig-openflow:system": { "openflow": { "agent": { "config": { "backoff-interval": 5, "datapath-id": "00:16:3e:00:00:00:00:00", "failure-mode": "SECURE", "inactivity-probe": 10, "max-backoff": 10 } } } }, "openconfig-system:system": { "clock": { "config": { "timezone-name": "Europe/Stockholm" } }, "config": { "domain-name": "google.com", "hostname": "switch_a", "login-banner": "Hello!", "motd-banner": "Hi There!" } } }

The first "system" section contains more than one module name as a prefix. However, according toRFC 7951 section 4 “Names and Namespaces”, this is invalid: there can only be a single module name preceding the element name.

robshakir commented 7 years ago

Confirmed fixed in: https://groups.google.com/forum/#!topic/ygot-users/TeyRrRGTgKA