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

Andy Bierman <andy@yumaworks.com> Wed, 18 October 2017 16:29 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 7697F1321CB for <netmod@ietfa.amsl.com>; Wed, 18 Oct 2017 09:29:42 -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 O7w31tZxmX-K for <netmod@ietfa.amsl.com>; Wed, 18 Oct 2017 09:29:40 -0700 (PDT)
Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com [IPv6:2a00:1450:4010:c07::234]) (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 3467B13304E for <netmod@ietf.org>; Wed, 18 Oct 2017 09:29:40 -0700 (PDT)
Received: by mail-lf0-x234.google.com with SMTP id 90so6488020lfs.13 for <netmod@ietf.org>; Wed, 18 Oct 2017 09:29:40 -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; bh=N2d/9zWeGS7WQyYSsL3Pq/9xAZVM9Ndm8ZwSrZiGALw=; b=H3tHAklajGc75DFxkQ+5LKqrWbUUvjprPaqV3enmpUvhJX6ThqQfZHJzfllQua9Axr SZNVlVcNW5K4Q8hO/Oh93UQbdo8JW4GB/b0BtU0bESN033oP/xLXhWYL5Sghy+loiyla IFd9JRc4b8koeDiagSYDFLUWdEMtCdeE4Sswl8XyaDKpUpOKdxxYDzYYo3XytWw6vbBY R1rbeAVI73vDAB2oWczIg4JfsoSopTk3JHYNe1sR4TuUTvUFIjwtcJIPjVstxN3d2A0x xnHDw2tqOLdEkaAla/2tmR4frfVN89pX7woaFNeDS7M8P1Cz/J59qoUDAqfFjc0hhWqV PLSw==
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; bh=N2d/9zWeGS7WQyYSsL3Pq/9xAZVM9Ndm8ZwSrZiGALw=; b=OZOzXAmdiExLTNUXUi9NLzdCgNZzuo05LbVzID9IkNTzMbJTEjkIkys5YiEWqYuDwH zaUwg4zwiCEbbD6eu7FSWS7a5ixyaO+7j9r8aJN4MeITVDx5XP2Obqbbg412AqJisqy7 FSlExEdgbZJ/H1YFKTUbDoaAPVTKEIoSx6JQ/gKQJIa8le/mWrIqVfB2XywC6s1pI092 PsRAZERwFRCRXh9UnUvD4dvbWtUD/9TW9xSLjXXu7bvHijSVu8/Y2EJ//s/pDpySV1MG Ln+/8E8mZfthutda6TflyLzxZ8D5N2+WPKOHXkMv1+1ddvvuoPjBOnHE6fnr2JKy+88+ q54w==
X-Gm-Message-State: AMCzsaX9eHER1O9KS0BdEvxh8zttcBIIJNOc69//+H1y0mXZdL2y74FI O4hRZ/NG9dGOe6k/xAHLofZpYqQLxRTOA5lLMzulQg==
X-Google-Smtp-Source: ABhQp+RtFT8G5K+/N+0h0mq/ZFOWyq9u+NdCt7ffD3HKQCRx0z0wu4moT1oLgeir0LyqkgtRsOaXQywx30HWFDco3+A=
X-Received: by 10.46.83.25 with SMTP id h25mr217768ljb.158.1508344178316; Wed, 18 Oct 2017 09:29:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.150.198 with HTTP; Wed, 18 Oct 2017 09:29:37 -0700 (PDT)
In-Reply-To: <20171018143651.kdsf77r65ptlu4mq@elstar.local>
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>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 18 Oct 2017 09:29:37 -0700
Message-ID: <CABCOCHQnSjCZ_ntON8xgN-wbL6L_N-NHHw9RkyuM4V1Zix-WZg@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Andy Bierman <andy@yumaworks.com>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="f40304360142f2bc3b055bd4be72"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/RpZBLdbkALtvidZSanTatZAYMkQ>
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: Wed, 18 Oct 2017 16:29:42 -0000

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.
>


OK -- seems correct


>
> 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.]
>
>

 A top-level RPC can also be used if a datastore parameter is needed,
or an <action2> wrapper can be defined.

The draft should be clear that the ability to invoke an action (within
a config=true parent data node) is removed. This is under-specified
in YANG so it is not really breaking anything.


/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/>
>