On 05/08/18 13:32, Martin Bjorklund wrote: > Robert Varga <[email protected]> wrote: >> Hello, >> >> I have went through RFC7950, but I cannot find the text which would give >> answer whether: >> >> feature foo; >> feature bar; >> >> container baz { >> if-feature "foo and (not baz)"; >> } >> >> list baz { >> if-feature "(not foo) and baz"; >> } >> >> is valid YANG or not. The two statements violate Section 6.1.2, but they >> are mutually exlusive when conformance comes into play.
Hello Martin,
thanks for your reply.
> I think you mean 6.2.1. You are right; these two statements violate
> 6.2.1 and this is thus not legal.
>
> Consider what this would mean in the model above:
>
> augement /baz {
> ...
> }
This is precisely what I considered and in the specific case of list vs.
container, both being mutually exclusive, I have not found a case which
would break down.
>> Does compliance (Section 5.6) have any bearing on namespaces (Section
>> 6.1.2)?
>
> Section 5.6 is about server conformance, and the first sentence is:
>
> Conformance to a model is a measure of how accurately a server
> follows the model.
>
> Namespaces are not related to how accurately a server follows a model.
My mistake for not being quite clear. In this context both the list and
container are optional to implement and cannot, obviously, be
implemented at the same time.
That having been said, I much prefer this being invalid YANG to needing
to support it -- just because it keeps my implementation simple :)
Regards,
Robert
signature.asc
Description: OpenPGP digital signature
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
