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

Robert Wilton <rwilton@cisco.com> Tue, 24 October 2017 15:34 UTC

Return-Path: <rwilton@cisco.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 656EB138BE7 for <netmod@ietfa.amsl.com>; Tue, 24 Oct 2017 08:34:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.499
X-Spam-Level:
X-Spam-Status: No, score=-14.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 5EwelFxf5NAk for <netmod@ietfa.amsl.com>; Tue, 24 Oct 2017 08:34:57 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 65DF71385A7 for <netmod@ietf.org>; Tue, 24 Oct 2017 08:34:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=14968; q=dns/txt; s=iport; t=1508859296; x=1510068896; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=uns8O4kjrKVSEZRtrQc36xiER5obhuVygJVa4/JIIos=; b=JoKv7WZ7kmwh75KyhuEibyAgQ33qyiotgJkOqRMezorwEI+r9wvOddkn a+C252Olo6bftEOv+h4BfGPE9mEOAQaOIXzeF1lXVgzZyfZEwnRUAtrLc Ild8uvWgZ5dvg2C31/9XRh/UPlc+1Z3jI9WywujNDjtGZI6VdHLsPD2gM s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CQAABQXe9Z/xbLJq1XAxkBAQEBAQEBAQEBAQcBAQEBAYRDbieDeoofdJBPkHiFQhCCAQoYAQqDOoEPTwKFHxgBAgEBAQEBAQFrKIUeAQEBAwEBIUsZAgkCEAgnAwICGwwfEQYBDAYCAQEXigUQiVKdZ4InJop9AQEBAQEBAQEBAQEBAQEBAQEBAQEBHQWDKYNXgWkpgwGEbgE3JoJNgmEFkVCQHZR1ghWJV4c5iiWDdYdlgTkfOIFbNCEIHRVJgmQJghqCPT82i3EBAQE
X-IronPort-AV: E=Sophos;i="5.43,428,1503360000"; d="scan'208,217";a="698221801"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2017 15:34:54 +0000
Received: from [10.63.23.81] (dhcp-ensft1-uk-vla370-10-63-23-81.cisco.com [10.63.23.81]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id v9OFYrnt002792; Tue, 24 Oct 2017 15:34:54 GMT
To: Andy Bierman <andy@yumaworks.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
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>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <bacb34ef-d3d9-babd-467e-188146c1084d@cisco.com>
Date: Tue, 24 Oct 2017 16:34:53 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <CABCOCHS72TVrurJ1mTRi4eGQR3=G1=bx3wk_NK07NOB8OaZfKg@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------EEB144B6AC48AA5386884A10"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/lUwCI7rZemaK3zfN-bz2B5yhju4>
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 15:34:59 -0000

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.


(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?

Thanks,
Rob


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 
> <mailto: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
>     <mailto: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/
>     <http://www.jacobs-university.de/>>
>
>
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod