Re: [yang-doctors] reference in import statement

Martin Bjorklund <mbj@tail-f.com> Thu, 15 February 2018 08:40 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2BB70126C23 for <yang-doctors@ietfa.amsl.com>; Thu, 15 Feb 2018 00:40:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uD_YI4IIqCKy for <yang-doctors@ietfa.amsl.com>; Thu, 15 Feb 2018 00:40:03 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id A297E124B18 for <yang-doctors@ietf.org>; Thu, 15 Feb 2018 00:40:03 -0800 (PST)
Received: from localhost (unknown [173.38.220.45]) by mail.tail-f.com (Postfix) with ESMTPSA id 874D01AE02C9; Thu, 15 Feb 2018 09:40:02 +0100 (CET)
Date: Thu, 15 Feb 2018 09:40:02 +0100 (CET)
Message-Id: <20180215.094002.1931037953577008064.mbj@tail-f.com>
To: j.schoenwaelder@jacobs-university.de
Cc: yang-doctors@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <20180215083130.uagwwr5huxgs5qst@elstar.local>
References: <20180215083130.uagwwr5huxgs5qst@elstar.local>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/3b5B7pFVPLgd46Lg2hHzuvaEGJs>
Subject: Re: [yang-doctors] reference in import statement
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Feb 2018 08:40:05 -0000

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> Hi,
> 
> I have just seen this pattern
> 
>    import ietf-inet-types {
>      prefix "inet";
>      reference "RFC 6991";
>    }
> 
> and I wonder how people understand this. From the way this import
> works, any (newer) version of ietf-inet-types is OK to use to resolve
> the import but I could see that this statement makes people believe
> they have to use the version of ietf-inet-types contained in RFC
> 6991

I see what you mean, but suppose we didn't write the reference
statement.  In this case the RFC would still have a reference to RFC
6991, so that could also make people believe that the reference is
absolute.

I guess the problem is exposed more in the reference statement in the
YANG module though.

Maybe "reference" in "import" is actually a bad idea (except when used
with import-by-revision (which in itself is also bad idea)).

> (but then this should have been import by revision). I know that we
> had a common practice to have comments before this was possible, like
> 
>    import ietf-inet-types {             // RFC 6991
>      prefix "inet";
>    }
> 
> but then this was a comment, now the RFC numbers becomes part of the
> definition. Should we be concerned about this? Or should we suggest
> to be more clear about this, e.g.:
> 
>    import ietf-inet-types {
>      prefix "inet";
>      reference "RFC 6991 (at the time of this writing)";

  import ietf-inet-types {
    prefix inet;
    reference "RFC 6991: Common YANG Data Types
                 (at the time of this writing)";
  }


/martin