Re: [netmod] yang-data issues

Andy Bierman <andy@yumaworks.com> Mon, 22 October 2018 17:41 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 EFB641252B7 for <netmod@ietfa.amsl.com>; Mon, 22 Oct 2018 10:41:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 2yYPwHVS8tRa for <netmod@ietfa.amsl.com>; Mon, 22 Oct 2018 10:41:53 -0700 (PDT)
Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 8EFA3124BE5 for <netmod@ietf.org>; Mon, 22 Oct 2018 10:41:52 -0700 (PDT)
Received: by mail-lj1-x22e.google.com with SMTP id t22-v6so313647lji.7 for <netmod@ietf.org>; Mon, 22 Oct 2018 10:41:52 -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=2hEE1ygU2+ggztYLFtKnCRGpFUi2lv++nJAuA6akNgk=; b=D52u+AVxsKeMvo4PebBWDDNBygsBozWDneTA+G/4vyT8kNld1JwYrqntoqULvgojIY 0H+8k3ZUyj5KS97D5MU+F2GUVHOcdx11Tvq0sAIG8oMvXettZV9G5yNtETI+MS+CUqfC nS3j5ZKROpsWKbznIYMjNqOI8fEAZE5h5cv0LS7Dwn6U4FyI0hwtpAoCkGmBBXkZ6svU vzJ4P3ef9ROTJGpfndwtZ9FIHFx1a0917NCJNihn8uududgBctAkD1tUIF50GRxR+ekg JdbPMz2F0xF8wfJ6rPCqD5DyVnZJQhPahpPd6bQC18nea6fT1mIvp+7LZcSkhNTwGKbK GSiA==
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=2hEE1ygU2+ggztYLFtKnCRGpFUi2lv++nJAuA6akNgk=; b=mmyZVIuAi5HujdNrJVL7TaY8cJ6lymBz01+bBV1QKjBInP+h90CPCcJ9Odue/+g+Js PiuWQqiZaE2thuDzyqU7SieqW/I2nQoQF5RZ+pt16SxKUrEy+LS8H7YRsYkxRzg9cJPm 7y87nM64aLLM7uL7PmdvXh3I91vfONgesN9bYo7lbjq7vyuYuRkWWMDdIVyFk2jLbwlB +92PxBR0D5k8FfUkEyt8gY+lJAYsFLWNC5o4yOpUeQY/cimkcyj4UVN92scZXs0VREPV Wplgef/6jQirdrVZWe/o2EgKrvu15B80z0MWiRfK3IjS0Vz+imTtrZ7ZWlLXIHg97O7w c/fA==
X-Gm-Message-State: ABuFfojrjrD7YSfmel3Aw89NTtlFRS3377mRfhLlBiqZMwyRC+iWoI8w RMsFldSBjWH+hGtw+CQSsAC5Ov5025vcmDjQ4BMD6kgf
X-Google-Smtp-Source: ACcGV61xHpF9aXn0FEKiByTcB5enbRdVlWB9nvEHyk6uoWTvTMRA4n9fJr3sai0KuGHIYXdBXx4L01dv2XVJlZnwsLY=
X-Received: by 2002:a2e:2205:: with SMTP id i5-v6mr26298639lji.15.1540230110547; Mon, 22 Oct 2018 10:41:50 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:1f87:0:0:0:0:0 with HTTP; Mon, 22 Oct 2018 10:41:49 -0700 (PDT)
In-Reply-To: <DAEC916E-564D-436E-8B34-6235BDC466AC@juniper.net>
References: <20180911.104447.2165943059473950359.mbj@tail-f.com> <DAEC916E-564D-436E-8B34-6235BDC466AC@juniper.net>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 22 Oct 2018 10:41:49 -0700
Message-ID: <CABCOCHT5NYseHZoqFR4FDV+0upePvQe=iUTwiuFAspcD-ejuWw@mail.gmail.com>
To: Kent Watsen <kwatsen@juniper.net>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000009ca8030578d4c4f6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Cs81OuTbXWI5yGiJtUk3uEMVI6U>
Subject: Re: [netmod] yang-data issues
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: Mon, 22 Oct 2018 17:41:56 -0000

On Sat, Oct 20, 2018 at 5:48 AM, Kent Watsen <kwatsen@juniper.net> wrote:

> Folks,
>
> Can we get some quick replies to this email?
>
>

At the last IETF there were people that said both yang-data and
augment-yang-data extensions
were needed and they wanted this work to be completed quickly.  Is that
still the case?


IMO, NMDA and yang-library-bis offer a better solution path (which has been
brought up before).
If there is a need for specialized datastores like "factory-default" then
why not have
an abstract datastore or abstract module-set?  I do not think current YANG
supports this
approach very well (because modules used outside a server do not have
yang-library)
but that could probably be fixed with yang-instance-data


Kent // all hats
>
>
>

Andy


>
>
> -----Original Message-----
> From: netmod <netmod-bounces@ietf.org> on behalf of Martin Bjorklund <
> mbj@tail-f.com>
> Date: Tuesday, September 11, 2018 at 4:45 AM
> To: "netmod@ietf.org" <netmod@ietf.org>
> Subject: [netmod] yang-data issues
>
> Hi,
>
> The authors of draft-ietf-netmod-yang-data-ext have been discussing
> the two remaining issues on this draft; the issue of whether a
> yang-data structure must have unique top-level node names or not, and
> the issue of the syntax for augment-yang-data.  We haven't been able
> to find agreement with the current proposal, so I have a suggestion
> for a slightly modified yang-data statement (which may have been
> discussed before):
>
> The idea is to encode a yang-data extension the same way as anydata,
> i.e., as a container.  For example:
>
>   yd:yang-data modify-subscription-datastore-error-info {
>       description
>         "This yang-data MAY be provided as part of a subscription's RPC
>         error response when there is a failure of a
>         'modify-subscription' RPC which has been made against a
>         datastore.  This yang-data MUST be used if hints are to be
>         provides back to the subscriber.";
>       leaf reason {
>         type identityref {
>           base sn:modify-subscription-error;
>         }
>         description
>           "Indicates the reason why the subscription has failed to
>           be modified.";
>       }
>       uses hints;
>     }
>
> This would be encoded as:
>
>   <modify-subscription-datastore-error-info>
>     <reason>foo</reason>
>     <period-hint>42</period-hint>
>     ...
>   </modify-subscription-datastore-error-info>
>
>
> Since the structure is always encoded as a container, it follows that
> it can have any data definition statement as substatement, with no
> restriction on naming and type of statement.  An instance of this can
> trivially be a complete instance document in XML w/o additional
> context, works well with JSON, and can appear in an error-info
> structure.
>
> Such a structure can be augemented as:
>
>   yd:augment-yang-data /sn:modify-subscription-datastore-error-info {
>     leaf foo { ... }
>   }
>
> The drawback is that it forces the use of an extra container in the
> encoding.  OTOH, most usages of current rc:yang-data follows this
> pattern:
>
>   rc:yang-data modify-subscription-datastore-error-info {
>     container modify-subscription-datastore-error-info {
>       ...
>     }
>   }
>
>
>
>
> /martin
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.
> ietf.org_mailman_listinfo_netmod&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-
> ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m=
> 7nlVu5dJaa8XsD0LRd0VTH301caVRUXGsa6L-UgXVRE&s=1o7vXH-
> j8Ha6xbJFTG1jjNzy9JQw7k-UWIqpeCr8qrk&e=
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>