Closed dcornejo closed 5 years ago
Thanks for putting attention on this. But no, ietf-netconf-notification@2008-07-01.yang in the clixon repo is an effort to recreate RFC5277 create-subscription and the types around that. RFC5277 does not contain a Yang model, just XML schema, so the yang model was manually created from the RFC. ietf-notifications@2012-02-06.yang on the other hand, (eg https://github.com/YangModels/yang/blob/master/standard/ietf/RFC/ietf-netconf-notifications@2012-02-06.yang) is RFC 6470, so is a completely different yang model. The confusion is that they are names (almost) the same. I see Cisco has the original RFC5277 at, for example https://github.com/YangModels/yang/blob/master/vendor/cisco/xr/651/notifications.yang. There is a relatively recent model at draft-ietf-netconf-rfc5277bis-01 which is modeled by Cisco in for example https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1681/ietf-event-notifications.yang where create-subscription is still defined. There are also new rpc:s for subscribed-notifications. So there are a number of different options: 1) keep the original (maybe rename it for avoiding similar confusion) 2) Use cisco's "notification.yang" (I would want to have a proper source though) 3) Upgrade to draft-ietf-netconf-rfc5277bis-01. I have no idea how much work that is. 4) Follow the more recent work,eg at https://github.com/netconf-wg/rfc5277bis for subscribed-notifications. But there I think create-subscription is obsolete. 5) someting else?
name confusion noted.
the simplest change is to fix two instances of date-and-time types that are missing the yang: prefix and should be yang:date-and-time (see patch below)
This opened up some other issues:
Note that the yang module has been renamed: ietf-netconf-notifications -> clixon-rfc5277.
thank you!
the type statements at lines 122 & 129 are missing the yang: prefix which breaks validating.
the latest revision of this file seems to be ietf-netconf-notifications@2012-02-06.yang, but this file bears little resemblance to the version supplied.
i can't find a source for the supplied version, so i don't know if this is an error in the source or in the clixon repo. a fix to the supplied version is trivially to add "yang:" to add the date-and-time types, but since this is in ietf namespace, in theory the latest version should be used.