Closed danielkinguk closed 1 year ago
We have found similar issues with the MW topology YANG
See: https://github.com/YangCatalog/bottle-yang-extractor-validator/issues/74
Still unsure why it does not compile/validate. Daniel P is on the case.
First issue solved after a couple of hours of debugging the YANG validator. Solution:
Delete L9 of the YANG model (https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-flexigrid-tunnel-yang/blob/master/ietf-flexi-grid-tunnel.yang#L9).
It doesn't like that date (and I don't know exactly why 😕).
Now, we do have the validation report:
Pyang Validation
No warnings or errors
Pyang Output
No warnings or errors
Confdc Output
ietf-te@2021-10-22.yang:298) is converted to 'string' when part of a union
ietf-te@2021-10-22.yang:302) is converted to 'string' when part of a union
Yanglint Validation
libyang err : Invalid default - value does not fit the type (Invalid identityref "flexi-ch-spc-6p25ghz" value - identity not found in module "ietf-flexi-grid-tunnel".). (Schema location /ietf-te:te/tunnels/tunnel/secondary-reverse-paths/secondary-reverse-path/path-out-segment/label-restrictions/label-restriction/label-step/technology/ietf-flexi-grid-tunnel:flexi-grid/flexi-grid-channel-spacing.)
YANGLINT[E]: Processing schema module from /var/yang/tmp/yangvalidator/yangvalidator-v2-workdir-qnXKFzYD/ietf-flexi-grid-tunnel@2021-10-25.yang failed.
Yangdump-pro Validation
No warnings or errors
The only clear error is:
Invalid default - value does not fit the type (Invalid identityref "flexi-ch-spc-6p25ghz" value - identity not found in module "ietf-flexi-grid-tunnel".
which has to do with this augment (https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-flexigrid-tunnel-yang/blob/master/ietf-flexi-grid-tunnel.yang#L870) and happens to be the last one using l0-types:flexi-grid-label-step:
augment "/te:te/te:tunnels/te:tunnel/"
+ "te:secondary-reverse-paths/te:secondary-reverse-path/"
+ "te:path-out-segment/te:label-restrictions/"
+ "te:label-restriction/te:label-step/te:technology" {
description
"Augment TE label range step for the egress segment
of the secondary reverse path.";
case flexi-grid {
uses l0-types:flexi-grid-label-step;
}
}
From layer-0 types:
grouping flexi-grid-label-step {
description
"Label step information for flexi-grid";
leaf flexi-grid-channel-spacing {
type identityref {
base flexi-ch-spc-type;
}
default "flexi-ch-spc-6p25ghz";
description
"Label-step is the nominal central frequency granularity
(GHz), e.g., 6.25 GHz.";
reference
"RFC 7699: Generalized Labels for the Flexi-Grid in Lambda
Switch Capable (LSC) Label Switching Routers";
}
To be discussed on Thursday meeting.
Thanks for the debugging Daniel.
Looks to be an issue with the online tool "flexi-ch-spc-6p25ghz" is not valid, it has to be an issue with YANG tool.
https://github.com/YangCatalog/yang-validator-extractor
Daniel P will log an issue with the YANG Tools repository.
Check with Daniel P.