Subject: Re: [netmod] Y45: conformance-stmt proposal
From: Andy Bierman <[email-masked]>
To: Ladislav Lhotka <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Date: Thu, 8 Jan 2015 07:40:34 -0800
List-Id: NETMOD WG list <netmod.ietf.org>

On Thu, Jan 8, 2015 at 1:51 AM, Ladislav Lhotka <[email-masked]> wrote:
> Andy Bierman <[email-masked]> writes:
>
>> Hi,
>>
>> I hope we can resolve this issue on the mailing list, since
>> it was skipped in the interim meeting.
>>
>> IMO import-by-revision is fatally flawed.
>> The problem with representing the conformance dependency chain
>> in the import-stmt is that not every module is using import-by-revision,
>> and if A.1 imports B.1 and B.1 imports C.any, then the dependency
>> chain for module A.1 is not deterministic.
>>
>> import-by-revision everywhere is going to be unmanageable,
>> even if all the effort to update every YANG module in existence
>> was made.
>
> Why is it necessary to do such updates? If module A imports
> B@2014-01-08, then it can continue using definitions from that
> particular revision of B forever, even if B is updated.
>

IMO (from a couple decades of dealing with MIB module updates
it is much easier to just make sure the latest revision of any module
in use does not change the definition of any other modules.
SMIv2 never needed import-by-revision.

>>
>> Instead, a conformance-stmt much simpler than the SMIv2
>> MODULE-COMPLIANCE macro is needed:
>>
>> module foo {
>>    ...
>>    import ietf-yang-types { prefix yang; }
>>    import ietf-inet-types { prefix inet; }
>>    import ietf-interfaces { prefix if; }
>>
>>    revision 2014-01-05;
>>    ....
>>
>>    conformance 2014-01-05 {
>>       module ietf-inet-types@2013-07-15;
>>       module ietf-yang-types@2013-07-15;
>>       module ietf-interfaces@2014-05-08;
>>    }
>> }
>>
>
> I don't understand: how is this different from the case when the
> revisions of imported modules are specified directly in import statements?
>

I picked a bad example.
The idea is the conformance macro flattens out the dependency
tree for each module.

module foo {
    ...
    import ietf-ip { prefix ip; }

    revision 2014-01-05;
    ....

    conformance 2014-01-05 {
       use-module ietf-ip@2014-06-16;
       use-module ietf-interfaces@2014-05-08;
       use-module ietf-yang-types@2013-07-15;
       use-module ietf-inet-types@2013-07-15;
    }
}

Note that none of these published modules use import-by-revision.
The only way to capture the dependency chain for these imported
modules is to add some statement to the importing module.

> Lada

Andy

>
>>
>> Tools can generate this stmt or can be fairly easily generated by hand.
>> Import-by-revision would no longer be used.
>>
>> There would be 1 or more conformance-stmts in descending
>> date order, like the revision-stmt history.
>>
>>
>> Andy
>>
>> _______________________________________________
>> netmod mailing list
>> [email-masked]
>> https://www.ietf.org/mailman/listinfo/netmod
>
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: E74E8C0C