Re: [netmod] augment YANG 1.0 with YANG 1.1 OK?

Andy Bierman <andy@yumaworks.com> Tue, 24 October 2017 17:13 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 8DAB213946F for <netmod@ietfa.amsl.com>; Tue, 24 Oct 2017 10:13:41 -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 LU8WtfNcoJGK for <netmod@ietfa.amsl.com>; Tue, 24 Oct 2017 10:13:39 -0700 (PDT)
Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::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 9679F1394EB for <netmod@ietf.org>; Tue, 24 Oct 2017 10:13:38 -0700 (PDT)
Received: by mail-lf0-x22f.google.com with SMTP id k40so24832290lfi.4 for <netmod@ietf.org>; Tue, 24 Oct 2017 10:13:38 -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=s1PqMVYKpxrP5/XmwZly4PRXnO4Q1mJcb0qZtZRTkxU=; b=Cbq3KeTW5401lPJ4czp78Yo+J4rPkpd1iMf4WBfMnIbo5Ir2cNBy0rjLFCYRgXUoPN pW0glUFIBmNBuBbWBbBugY+QKr0UsRanGn1ZgcjgNOQyfg0PPv72KYy5Zod8/ghJCtpw cBf/AYchl7gYi9k1RL9bamVXE0RDM56efk+f4MOqxIb2XXp7R+hhJSbHtiqDHqiUkeRj KKA8McCugc60tm9rqJT2HmHpC2OUor2RlY3W5TcCwU7c6BTG4aL+1OQBCzSaKRW/UNAv ZsUMbKRZxRjXefpw4vzZhq/4ScXqenDHYzEmeigTH2qFvLDyGxK4JJhYLj2FwFehfoPr ecpQ==
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=s1PqMVYKpxrP5/XmwZly4PRXnO4Q1mJcb0qZtZRTkxU=; b=FMtoTELaQYT3Pfc+JeSJRsKr2BL7HbKZrS+RuMdjA7u4C7bndtk3Ib4vAA18+pBr4J vLRfi4T4HoBizSIDp20R741hJjb4rNNDxX8XTr1xupGSTJcvSkV8zIu/+l1cLR8ABjFE Pi5+Zp3LCYrwy7b6+zLo2JLeHQDJ8KKKqJOjKBmmSbNh5X0+QR3oX9DHHPqXQ4Oa6Ro6 pPKWtUaIbIXYDjZ/G1kYRh7ZaJePBpYHfw8m7j3RnPOMLz/7cP0m00IVsQeGYaUMToxv mTE6Vdik/zGpdmjPgAGT49tT6nH4vKejGq6ZaWRrS6M+sSlSZYN0o1M4jaSnz2DRLBMs GFjA==
X-Gm-Message-State: AMCzsaXeID8ScK/6k2gwpaB0smkbeC4qb6FOg4KOB1yP3pHIKYMToo9u JELJtOc/84NAjSs9ENgX+vkmlOL0TTJGQikuMNPjbw==
X-Google-Smtp-Source: ABhQp+QSWZ+2gvaxEjOwYaZ6Umtf9aDSBU51FYdQ2JpE2JdjZBz6PSAOuse+mJl/y4hInjN5Zsju7x4jZZ1kbpSapBs=
X-Received: by 10.46.117.24 with SMTP id q24mr6819359ljc.14.1508865216912; Tue, 24 Oct 2017 10:13:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.150.198 with HTTP; Tue, 24 Oct 2017 10:13:35 -0700 (PDT)
In-Reply-To: <bacb34ef-d3d9-babd-467e-188146c1084d@cisco.com>
References: <CABCOCHQhPHxen2YD-ZPHqpGZN5YrE_7RVe7_3qUkdazL+PTSmg@mail.gmail.com> <20171015.095206.5556973134711466.mbj@tail-f.com> <CABCOCHR_q8DTF2agDi_VH9pSL8DWV1ttuX=ZZDO9OmNXhAeEsg@mail.gmail.com> <20171018143651.kdsf77r65ptlu4mq@elstar.local> <CABCOCHRVdkjV5PgQ+UtwJMKPLeFRKs_=ogAfTaCGZsWEdgP5uw@mail.gmail.com> <20171018213601.hdkt2qtqsno6vr4u@elstar.local> <CABCOCHS72TVrurJ1mTRi4eGQR3=G1=bx3wk_NK07NOB8OaZfKg@mail.gmail.com> <bacb34ef-d3d9-babd-467e-188146c1084d@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 24 Oct 2017 10:13:35 -0700
Message-ID: <CABCOCHR6tSg9RRW7gZ50qp6F5frWGm-P1qK_0xEEQdiNursB7A@mail.gmail.com>
To: Robert Wilton <rwilton@cisco.com>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="089e082f63e044d676055c4e0f81"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/92Cjta0gGVVdVP0JEhAmanLD2Y0>
Subject: Re: [netmod] augment YANG 1.0 with YANG 1.1 OK?
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: Tue, 24 Oct 2017 17:13:41 -0000

On Tue, Oct 24, 2017 at 8:34 AM, Robert Wilton <rwilton@cisco.com> wrote:

> Hi Andy,
>
> To try and formally close this issue: We propose that no changes are made
> to the NMDA draft.
>
> I think that you have raised two issues in this thread:
>
>
> (1) All YANG actions in an NMDA server are invoked against <operational>.
>
> We generally agree that module defined actions, and module defined RPCs
> and notifications, will generally apply to the operational state of a
> system, but this won't necessarily universally hold.  In particular it may
> not hold for any YANG modules that are defining generic behaviour (e.g.
> inactive configuration, templating solutions, I2RS, etc).  We don't think
> that this needs to be specified in the NMDA datastores draft, but would be
> better documented in a future revision of YANG.
>
>
>

IMO the more complex NMDA is to implement, the less likely it will be
implemented.
If you want the tools to figure out the correct datastore(s) from
description-stmts
instead of something deterministic and machine-usable, NMDA is less likely
to be implemented.

Given that the same objects can be defined differently in each datastore in
NMDA,
it is especially useful to know which set of YANG modules applies, before
parsing instance
data against those modules.

(2) Define <action2>:
>
> I'm not convinced that this is really required/helpful, given that most
> actions are likely to only apply to operational.  If it turns out that this
> is particularly useful then I would propose that this is deferred until a
> future revision of NETCONF, particularly because we are trying to keep the
> NETCONF NMDA and RESTCONF NMDA drafts as small as possible.
>
> Is this OK?
>

The NMDA theme has been to declare things that are possible in pre-NMDA
but not supported in post-NMDA to be not useful, so this can be left to
vendors I guess.



> Thanks,
> Rob
>
>
>

Andy


> On 18/10/2017 23:16, Andy Bierman wrote:
>
>
>
> On Wed, Oct 18, 2017 at 2:36 PM, Juergen Schoenwaelder <
> j.schoenwaelder@jacobs-university.de> wrote:
>
>> On Wed, Oct 18, 2017 at 01:26:30PM -0700, Andy Bierman wrote:
>> > On Wed, Oct 18, 2017 at 7:36 AM, Juergen Schoenwaelder <
>> > j.schoenwaelder@jacobs-university.de> wrote:
>> >
>> > > On Sun, Oct 15, 2017 at 12:56:42PM -0700, Andy Bierman wrote:
>> > > > > >
>> > > > > >   augment "/if:interfaces-state/if:interface" {
>> > > > > >     action reset {
>> > > > > >       description "Reset this interface";
>> > > > > >     }
>> > > >
>> > > > Can you spot the NMDA problem above?
>> > > > Actually, it exists for in-line definitions, not just augment.
>> > > >
>> > > > Once you collapse the interfaces-state tree into /interfaces, there
>> > > > is no way to specify whether an action is intended for <operational>
>> > > > or a configuration datastore, or all datastores.
>> > >
>> > > I think operations (both RPCs and actions) by default always execute
>> > > in the context of the operational state datastore. This is consistent
>> > > with the way we define the xpath context. An operation that operates
>> > > on other datastores needs to carry this information in its semantics
>> > > and typically requires special arguments to select the datastores
>> > > affected. This is how <get-config> and <edit-config> work. Hence, a
>> > > reset action defined for an interface by default applies to the
>> > > operational state datastore. And this default makes likely sense for
>> > > most actions and RPCs.
>> > >
>> > > If an action or RPC is expected to operate on a different datastore,
>> > > the description must explain this and there may be a need to pass a
>> > > datastore identifier to the operation. [Yes, in retrospect, one might
>> > > have designed the protocol differently so that there would always be a
>> > > datastore parameter at the protocol level but its too late for that.]
>> > >
>> > >
>> >
>> > IMO this needs to be simple and deterministic.
>> > All YANG actions in an NMDA server are invoked against <operational>.
>> >
>>
>> Well, yes, like all RPC operations - except that we have RPC
>> operations that do act on other datastores. ;-) But the generic
>> mechanism including any xpath contexts is against operational.  If the
>> semantics of the operation that say 'interpret parameter 5 as a
>> datastore name and act on that datastore', well then this is what the
>> designer wanted. This is how edit-config and friends work today.
>>
>>
>
> Except this approach is ad-hoc and sub-optimal.
> That's why NMDA <get-data> is better (because it is extensible yet not
> ad-hoc).
> IMO an <action2> wrapper would be a good addition for a YANG update
>
>   <action2>
>      <datastore>rd:running</datastore>
>      <top>
>          <foo>
>            <test-action>
>                ...
>           </test-action>
>         </foo>
>    </top>
>   </action2>
>
> It is better to keep the YANG model decoupled from datastores,
> and use a protocol parameter to make it explicit.
>
>
> /js
>>
>
>
> Andy
>
>
>>
>> --
>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>> Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>
>>
>
>
>
> _______________________________________________
> netmod mailing listnetmod@ietf.orghttps://www.ietf.org/mailman/listinfo/netmod
>
>
>