sdcio / schema-server

Apache License 2.0
4 stars 2 forks source link

Loading Cisco schema fails #103

Open henderiw opened 3 months ago

henderiw commented 3 months ago

apiVersion: inv.sdcio.dev/v1alpha1 kind: Schema metadata: name: iosxr.cisco.sdcio.dev namespace: transport-automation spec: repoURL: https://github.com/YangModels/yang provider: iosxr.cisco.sdcio.dev version: 24.1.1 kind: branch ref: main dirs:

henderiw commented 3 months ago

One of the issues seen is this.

rpc ping-ethernet-cfm { description "Initiate a ping operation"; input { must "target-mep-id or mac"; uses TRACEROUTE-PING-CFM-INFO-TYPE; uses TRACEROUTE-PING-REMOTE-TARGET-TYPE; uses TRACEROUTE-PING-SOURCE-TYPE; leaf interval { type uint32 { range "1..4294967295"; } units "seconds"; default "1"; description "Interval between ping messages (seconds)"; }

  yangschema % go run main.go config/cisco-schema.yaml yang/cisco

models [yang/cisco] includes [] panic: yang/cisco/Cisco-IOS-XR-ethernet-cfm-act.yang:1383:7: unknown input field: must

hansthienpondt commented 3 months ago

Goyang v1.6.0 is missing "must" statements in the Input/Output fields https://github.com/openconfig/goyang/blob/v1.6.0/pkg/yang/yang.go#L693-L736 as per https://datatracker.ietf.org/doc/html/rfc7950#section-7.14.2.1 and https://datatracker.ietf.org/doc/html/rfc7950#section-7.14.3.1