Re: [netmod] regarding draft-bierman-netmod-yang-data-ext-00

Andy Bierman <andy@yumaworks.com> Sat, 02 September 2017 18:02 UTC

Return-Path: <andy@yumaworks.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 7D40F132FAC for <netmod@ietfa.amsl.com>; Sat, 2 Sep 2017 11:02:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
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 FWSKjX_0Ld46 for <netmod@ietfa.amsl.com>; Sat, 2 Sep 2017 11:02:44 -0700 (PDT)
Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 86D58132F6D for <netmod@ietf.org>; Sat, 2 Sep 2017 11:02:44 -0700 (PDT)
Received: by mail-it0-x22f.google.com with SMTP id t134so3412309ita.0 for <netmod@ietf.org>; Sat, 02 Sep 2017 11:02:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1lW0VGCA1wn4/XDP35kGe9TY4pVE7KrFvzAyI2zcOKw=; b=EX+gnaefv3fAvc8crNNtZ51Up8O0xCrkjBxX0fttp50VbNSQE2qxhBinfquvLcumnS //8yNQ0uREQxQzSFFqVNVbcEyqiREfbj7JqBQePqJNp5O/LlAufKlpqrKaTtyborhFMU e2baX3CsRfV2ASRjSdU/W7YGAVFTcwgHfu+KaP6dQvD/XUmT5hNaowyzUb6mQuupwj0z RdZ9OHMdYiR/Z5bD++48pSH3kULDnYqAzWpInDnnQ88btdhIxK+JwmWctp8gtSxZiHQf ohDEDdI8VZ5eLVSX27GnFdWvQm50Q8NxUwbTKHiMuv8VJnFypm6/PTCEi3PyDm1Sn1GE u+tg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1lW0VGCA1wn4/XDP35kGe9TY4pVE7KrFvzAyI2zcOKw=; b=fyd6Xt4uoxOqPDjgeRT1PxTd2qWxO9jy4fEMvjCVND2mPUz4kPCzD+J9PE6vQHak0y ZWhS8G5u1ORJ1euXvonMNUWjgHj2qizONwvoshDxFdGyy6HGVaEbone92rPMlLA8FdkB ytir37DgHSWeXuK0Ebg/mkvH1J+kFDKh/OKCCPhjRpzmgh5Gf4C/rFu0SgB2CvV5H261 vuMchqUp26C4Tci8NWliKEMS4sgfvC6/cYC3Pnx1HLyqGxb6cDDlzrGJpBaaO6PqBHX2 dj4jn5X+Z3OSB0N+0W4nv4b5PLdsap6ZtTw7EL6uSoqtEz44HTz3cEBSzpgrC+SVhWAF lQpQ==
X-Gm-Message-State: AHPjjUgrTNLIME5302zjnRLmFImQaIj17KMqF1Wg2fR4nQdwos9DoGve aO0r/BNM+e4VVGzWkhG2imtO2UqMvlKa
X-Google-Smtp-Source: ADKCNb7usMQYIaQtbeEtysFLXM8JYKZe9dU6lftku7umu+zGL7AS1kpR8ZFMeeyWi3oZGJd/WERrLLtfd8nIU3QbjKw=
X-Received: by 10.36.36.210 with SMTP id f201mr1757034ita.24.1504375363679; Sat, 02 Sep 2017 11:02:43 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.36.6.206 with HTTP; Sat, 2 Sep 2017 11:02:42 -0700 (PDT)
In-Reply-To: <B20865BF-F5A7-4772-A7A5-45CEA6ADD1CE@juniper.net>
References: <57AA997C-6E52-49D2-B6AF-7DDE8F13D7B3@juniper.net> <CABCOCHSA_dqNwy=xj4vj8bCHKaJhisx0qCccYCyyBdLWXeW2Rw@mail.gmail.com> <56D58AA8-E71E-4CA1-B81E-70E2EDD94E91@juniper.net> <CABCOCHShmLL03Z7H=ZAFFj9N+=qqDjHttprR-_ev6i+0g21iJQ@mail.gmail.com> <E4E11358-9E08-415E-ADBC-B4F3A2F81AE7@juniper.net> <20170901205511.3hgalynjpur2gjqf@elstar.local> <B20865BF-F5A7-4772-A7A5-45CEA6ADD1CE@juniper.net>
From: Andy Bierman <andy@yumaworks.com>
Date: Sat, 02 Sep 2017 11:02:42 -0700
Message-ID: <CABCOCHQeCJ9jRa2QFTyz1DOp=BYcOeju9dO2sCE8j_43t=TnKA@mail.gmail.com>
To: Kent Watsen <kwatsen@juniper.net>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="001a1147c68e294f05055838af7c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/1EdQwbCTcbo0BcaV0CmdA5_zl6Y>
Subject: Re: [netmod] regarding draft-bierman-netmod-yang-data-ext-00
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 02 Sep 2017 18:02:46 -0000

Hi,

The use-cases for groupings/uses and augment are not identical.

Alternative NMDA Approach:

I don't see a big difference between defining YANG for an artifact vs.
defining some YANG for a special-purpose datastore.
There is nothing about the YANG data that is different.
There are only differences in the operations on that data,
which are properties of the datastore. Perhaps an <artifact> datastore
is a cleaner long-term solution.


Andy


On Sat, Sep 2, 2017 at 9:59 AM, Kent Watsen <kwatsen@juniper.net> wrote:

>
>
> >> Gotcha.  What do other people think, would a "uses-yang-data"
> >> statement be generally more useful?
> >
> > But does this mean we also do uses-yang-container, uses-yang-list,
> > uses-yang-xyz to other definitions as well? I do not think this is
> > desirable and why would yang-data be any different?
>
>
> Oh, no.  I view yang-data as a body-stmt, not a data-def-stmt,
> akin to 'rpc' and 'notification'.  But back to the draft's
> proposed solution, I understand that augment-stmt is a top-level
> body-stmt, but it's also a uses-stmt, and in that context, it is
> a sibling to the refine-stmt.  Already ANIMA has a need to both
> augment and refine a yang-data defined structure.  To me, a
> 'uses-yang-data' statement seems just one step more general than
> a 'augment-yang-data' statement.
>
> Specially, if we were updating YANG:
>
>    // just added last entry
>    body-stmts          = *(extension-stmt /
>                            feature-stmt /
>                            identity-stmt /
>                            typedef-stmt /
>                            grouping-stmt /
>                            data-def-stmt /
>                            augment-stmt /
>                            rpc-stmt /
>                            notification-stmt /
>                            deviation-stmt /
>                            yang-data-stmt)
>
>    // something like this?
>    yang-data-stmt            = yang-data-keyword sep identifier-arg-str
> optsep
>                          (";" /
>                           "{" stmtsep
>                               ;; these stmts can appear in any order
>                               [status-stmt]
>                               [description-stmt]
>                               [reference-stmt]
>                               *(typedef-stmt / yang-data-grouping-stmt)
>                               *data-def-stmt
>                               [uses-yang-data-stmt]
>                           "}") stmtsep
>
>    // like 'uses-stmt', but with a different keyword
>    uses-yang-data-stmt       = uses-yang-data-keyword sep
> identifier-ref-arg-str optsep
>                          (";" /
>                           "{" stmtsep
>                               ;; these stmts can appear in any order
>                               [when-stmt]
>                               *if-feature-stmt
>                               [status-stmt]
>                               [description-stmt]
>                               [reference-stmt]
>                               *refine-stmt
>                               *uses-augment-stmt
>                           "}") stmtsep
>
>    // like 'grouping-stmt', but with 'action' and 'notification' removed
>    yang-data-grouping-stmt       = yang-data-grouping-keyword sep
> identifier-arg-str optsep
>                          (";" /
>                           "{" stmtsep
>                               ;; these stmts can appear in any order
>                               [status-stmt]
>                               [description-stmt]
>                               [reference-stmt]
>                               *(typedef-stmt / yang-data-grouping-stmt)
>                               *data-def-stmt
>                           "}") stmtsep
>
>
>    yang-data-keyword              = %s"yang-data"
>    uses-yang-data-keyword         = %s"uses-yang-data"
>    yang-data-grouping-keyword     = %s"yang-data-grouping"
>
>
> How close to this can we get using an extension statement, so that a
> future adoption to YANG will be as seamless as possible?
>
> K.
>
>
>