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

Andy Bierman <andy@yumaworks.com> Wed, 18 October 2017 20:26 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 CB37C133055 for <netmod@ietfa.amsl.com>; Wed, 18 Oct 2017 13:26:35 -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 fdXaPVHQ8M5s for <netmod@ietfa.amsl.com>; Wed, 18 Oct 2017 13:26:34 -0700 (PDT)
Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (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 9465D132620 for <netmod@ietf.org>; Wed, 18 Oct 2017 13:26:33 -0700 (PDT)
Received: by mail-lf0-x22a.google.com with SMTP id w21so7211735lfc.6 for <netmod@ietf.org>; Wed, 18 Oct 2017 13:26:33 -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=KNWFebKMVDxQ3rMBDGSTXC35XBadCGgvWJTMm5T7nbk=; b=z6l+GM1rOMh3UY2v29h/Jo4NUWPN81SOuTHVPl3lNljU9wJVnjboRYMMmqENJhbhRQ f2khF91LIlvMdbFoJZT/DC8OR0erZAFMHvbc7UiCqZLuqOU//ECsg65CET3AsTg13FX/ w6dgtN4Lu3hXv9+bhfJvxXVW6ubbKXS2ZvIGZgTqz3dAss9bkN65V7Zohc4dGhZedCGP SS2o/EooYprR+zei04ZBXlu41ah9ePvMJYcbK0nZpdBEUde/izuYXPXvQS3jCJhkuo0r lICAHI+ar1TxvE+HRcoYgEgUTUXlgaZZynPQrkda718HrP4OfhkngK33dyhG2C21udIg B2Bw==
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=KNWFebKMVDxQ3rMBDGSTXC35XBadCGgvWJTMm5T7nbk=; b=mWR33VBEUw2sOf+pvA/p6cHrGLuV3uJPHLLyWZlx3s3ApcZrFaczIObhhNh55kn1q9 5vqeTtuyWQNeAaWUzC6WJ4Yx+ME5g8SdlOzUcu4ylxMKYblJcR9hSWEGar6a2OvbdZbf vHgMy3U8LxUzobLjSaVxqQbRTZxI+Wa3he8Ge1toSrFJM3ecm6XtrbbnfeHWl5SL+WoM kNTpRflo7HhV4IX3bazupYzDmCYH5K2mOO48u5EJSWLmSU2JGeL+U/UoO+ml9wdvIcXL ky4bYSs93/O5E4OWpopS7TDONaRmCmNFxNXoQVp17ry+PK5hjwM3EG/d72vAK4FFdICm nnYA==
X-Gm-Message-State: AMCzsaXrkKszkrm142Otr0cqBakWah1oprb7BddYqcjT2OeVjduPG+so y6NL3AEy13YNr97+uvE00TCFVdtU76Btp0tFz6l7Sg==
X-Google-Smtp-Source: ABhQp+TO57HfmMtRIgqLLaSBj3jpzBeftQpqOBGYB3cBzBSZBbpjmgaw9uAtkIHZnjwqMpWGBRQzWxFe1Ve+s17smR8=
X-Received: by 10.25.204.81 with SMTP id c78mr6462709lfg.49.1508358391804; Wed, 18 Oct 2017 13:26:31 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.150.198 with HTTP; Wed, 18 Oct 2017 13:26:30 -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 13:26:30 -0700
Message-ID: <CABCOCHRVdkjV5PgQ+UtwJMKPLeFRKs_=ogAfTaCGZsWEdgP5uw@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="94eb2c1a17c4234cc8055bd80ed5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/pjYX3vYR8MQPARB1bTLJy8Q55WE>
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 20:26:36 -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.
>
> 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>.


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