Re: [netmod] YAng-Tree for a YANG structure

Martin Bjorklund <mbj@tail-f.com> Thu, 04 April 2019 08:39 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 CDDE6120098 for <netmod@ietfa.amsl.com>; Thu, 4 Apr 2019 01:39:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, 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 mleKdT6U2zDW for <netmod@ietfa.amsl.com>; Thu, 4 Apr 2019 01:39:01 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 70840120059 for <netmod@ietf.org>; Thu, 4 Apr 2019 01:39:01 -0700 (PDT)
Received: from localhost (unknown [173.38.220.61]) by mail.tail-f.com (Postfix) with ESMTPSA id EFF2A1AE018B; Thu, 4 Apr 2019 10:38:57 +0200 (CEST)
Date: Thu, 04 Apr 2019 10:38:59 +0200 (CEST)
Message-Id: <20190404.103859.1356196088749426307.mbj@tail-f.com>
To: balazs.lengyel@ericsson.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <92454923-211d-ffad-88e9-a23fb9bae8f2@ericsson.com>
References: <92454923-211d-ffad-88e9-a23fb9bae8f2@ericsson.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/jMc1zGhQqTaIc8NcR04pU3K9Tes>
Subject: Re: [netmod] YAng-Tree for a YANG structure
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Thu, 04 Apr 2019 08:39:03 -0000

Hi,

Balázs Lengyel <balazs.lengyel@ericsson.com>; wrote:
> Hello,
> 
> In draft-ietf-netmod-yang-data-ext the extension structure is
> defined. In my draft about
> instance data format I plan to use this in a YANG model. Kent raised
> the question about
> providing a YANG Tree description of the model.
> 
> Is there any idea how the data nodes inside a yang "structure" should
> be represented in a
> tree?

I suggest just like yang-data:

module: example-module

  structure address-book:
    +-- address* [last first]
       +-- last      string
       +-- first     string
       +-- street?   string
       +-- city?     string
       +-- state?    string

I will add text to the draft that defines this.


> Any idea when pyang will be prepared for that?

I have added support for this on the branch feature/yang-structure.
It verifies the grammar and adds the option --tree-print-structures.
It doesn't handle augment-structure yet.


/martin