[netmod] Problem in draft-ietf-netmod-smi-yang-04

Martin Bjorklund <mbj@tail-f.com> Mon, 02 April 2012 14:13 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7617821F858A for <netmod@ietfa.amsl.com>; Mon, 2 Apr 2012 07:13:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.187
X-Spam-Level:
X-Spam-Status: No, score=-0.187 tagged_above=-999 required=5 tests=[BAYES_20=-0.74, HELO_MISMATCH_COM=0.553]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qCjY4Omv6Mva for <netmod@ietfa.amsl.com>; Mon, 2 Apr 2012 07:13:37 -0700 (PDT)
Received: from mail.tail-f.com (de-2007.d.ipeer.se [213.180.74.102]) by ietfa.amsl.com (Postfix) with ESMTP id EEF1621F8565 for <netmod@ietf.org>; Mon, 2 Apr 2012 07:13:35 -0700 (PDT)
Received: from localhost (138.162.241.83.in-addr.dgcsystems.net [83.241.162.138]) by mail.tail-f.com (Postfix) with ESMTPSA id CD52F1200D50; Mon, 2 Apr 2012 16:13:33 +0200 (CEST)
Date: Mon, 02 Apr 2012 16:13:33 +0200
Message-Id: <20120402.161333.1154244105910951530.mbj@tail-f.com>
To: netmod@ietf.org, bclaise@cisco.com
From: Martin Bjorklund <mbj@tail-f.com>
X-Mailer: Mew version 6.3.51 on Emacs 23.3 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [netmod] Problem in draft-ietf-netmod-smi-yang-04
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netmod>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Apr 2012 14:13:37 -0000

Hi,

I just discovered a problem with draft-ietf-netmod-smi-yang-04.  I
believe this document has been sent to the IESG.


The document specifies how to translate an OCTET STRING w/
DISPLAY-HINT to a YANG 'string'.  But look at this example:

InetAddressIPv4 ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "1d.1d.1d.1d"
    STATUS       current
    DESCRIPTION
        "Represents an IPv4 network address:

           Octets   Contents         Encoding
            1-4     IPv4 address     network-byte order

         The corresponding InetAddressType value is ipv4(1).

         This textual convention SHOULD NOT be used directly in object
         definitions, as it restricts addresses to a specific format.
         However, if it is used, it MAY be used either on its own or in
         conjunction with InetAddressType, as a pair."
    SYNTAX       OCTET STRING (SIZE (4))

becomes:

  typedef InetAddressIPv4 {
    type string {
      length "4";
      ...
    }
    ...
  }

But the length of an ipv4 address is not 4 characters!!

Conclusion: if the type is octet string, and it has a display-hint, we
must not translate the length restriction to yang.


/martin