Re: [netmod] Action and RPC statements [was Re: augment YANG 1.0 with YANG 1.1 OK?]

Andy Bierman <andy@yumaworks.com> Thu, 26 October 2017 18:42 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 D228913F44A for <netmod@ietfa.amsl.com>; Thu, 26 Oct 2017 11:42:30 -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 nl6JQlyes0WC for <netmod@ietfa.amsl.com>; Thu, 26 Oct 2017 11:42:29 -0700 (PDT)
Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com [IPv6:2a00:1450:4010:c07::233]) (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 920D413F448 for <netmod@ietf.org>; Thu, 26 Oct 2017 11:42:28 -0700 (PDT)
Received: by mail-lf0-x233.google.com with SMTP id 90so4807152lfs.13 for <netmod@ietf.org>; Thu, 26 Oct 2017 11:42:28 -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=GgU+Y+TiYNf96p72/RhJYDjurF/ttxnOIc6MwPQPoh0=; b=0jhOjebGPzdUK6AgLVRt42R4RTU3q3SP1BnMV0UTcuLAWVnhddoOMeNpARCKR36vrp PGo/M6atUvVhphDqqVio2Xc1zHZ4gafbjwBXGlILG+zZXWv4nnrezIH2sHVxXn2Gv2JE SPfEmVZ0EBlidZJjuk/jKGe+b+TV2OYSaQqeRW1lSuBiTg6e4zh+rG6F/z74BjTWRtyX ymlgVv4eMEWDhPwSkKBGbO6/GpJ2MAzIzJITuMD/oSaz9cpIZ5yKSF5UwFaSxg7b1khU H6SEgjgpDdQLil09xfLJmMMetSVymuWnKlv0RqjOtrIWeTf8seezcmNlLl/fCnW0xvtW 3aqw==
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=GgU+Y+TiYNf96p72/RhJYDjurF/ttxnOIc6MwPQPoh0=; b=Kw83zZW5Mc0YO6TpEkwQdzmWwV2UjLKoeeBLVz8DOAOgeUfG5NS0aaRO8JuypuSAmG 4jyNn5XZl5GqirjbXrqun3C+v5aazkUjVf7bhkmPwdcPdwi100Jn7NtMhop/LYCtj8jf 3WDWCK5s5ekiJ3C4a3FuSDsmfNhdOareLkvgZGTaXlzgwIIcHzQiQOCDRM+pZl3EjVsZ /71hnlNw7usPfTLs/3SWMepRhtKQuQ9aogR8FhHBzs0OEp6rLduxWLvfCiWtpvBjWolY Oy1FFKuCHDH9jwQCipUVik8hmS4PfJjy/FM3kRPIzC1GCWV73V38xsodEfr03X1uUVYt kkLg==
X-Gm-Message-State: AMCzsaXUTtKK7U+lev9XEnAHx4RsQNucjWnVXH2ntKjwB0MObIfdX1dD KSfkChljUaDm8luZewmKb19ldlx/MZ9m8g8bpNQK5Q==
X-Google-Smtp-Source: ABhQp+SZRRu1Z3tBytHYW1VdoRK2fmqb/oy41UP5cs/mB5YLnOY8ZDvWOqM2VxRTjLGODU3VgmsJYAViLWZPutbCGbQ=
X-Received: by 10.25.23.165 with SMTP id 37mr8256024lfx.202.1509043346848; Thu, 26 Oct 2017 11:42:26 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.150.198 with HTTP; Thu, 26 Oct 2017 11:42:26 -0700 (PDT)
In-Reply-To: <c544a19e-2534-9355-002e-18affd12ea5a@alumni.stanford.edu>
References: <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> <CABCOCHR6tSg9RRW7gZ50qp6F5frWGm-P1qK_0xEEQdiNursB7A@mail.gmail.com> <20171024172125.l6l3yhocakfkcoh2@elstar.local> <CABCOCHQ8nbf_H6eJxGFqwr=LHrdxyFWc3a4FfhLwR45bs-J19Q@mail.gmail.com> <20171025110851.wdoj2dbrqmxz5shd@elstar.local> <CABCOCHR22Ehryxu374a_-F6PFYayTgizReHuC0EaY4uBC7+vyg@mail.gmail.com> <4d2030ca-3d75-72db-1afd-76a8597b615c@cisco.com> <c544a19e-2534-9355-002e-18affd12ea5a@alumni.stanford.edu>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 26 Oct 2017 11:42:26 -0700
Message-ID: <CABCOCHQdmMYObMBCxP=qWuH3RdCRi9q7Y6G0VsSnDeyg2qLc4w@mail.gmail.com>
To: Randy Presuhn <randy_presuhn@alumni.stanford.edu>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="001a11401a04a3d6a9055c7788d1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/IjG3b3Dik5qau5Q2jHYH5iJKYyc>
Subject: Re: [netmod] Action and RPC statements [was Re: 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: Thu, 26 Oct 2017 18:42:31 -0000

On Thu, Oct 26, 2017 at 11:22 AM, Randy Presuhn <
randy_presuhn@alumni.stanford.edu> wrote:

> Hi -
>
> On 10/26/2017 10:44 AM, Robert Wilton wrote:
>
>> Hi ,
>>
>> Separating out the issue regarding which datastore action and RPC apply
>> to, we propose the following NEW text to the datastores draft:
>>
>> 6.2 Invocation of Actions and RPC Operations
>>
>>    This section updates section 7.15. of RFC 7950.
>>
>>    In YANG data models, the "action" statement may appear under "config
>>    true" and "config false" schema nodes.  While instances of both
>>    schema nodes may appear in <operational>, instances of "config true"
>>    schema nodes may also appear in other datastores.
>>
>>    An NMDA compliant server MUST execute all actions in the context of
>>    <operational>.  Likewise, an NMDA compliant server MUST invoke all RPC
>>    operations in the context of <operational>, unless the RPC is
>> explicitly
>>    defined as affecting other datastores (e.g., <edit-config>).
>>
>> OK?
>>
>
> A question - I understand the motivation for the "unless" for RPC
> operations, but wonder why there is no similar "unless" for actions.
>
>

The <rpc> is not really in a datastore at all.
It may have input and output parameters with leafref and must/when
statements.
These are evaluated in the <operational> context.
The <rpc> may in fact be something like <edit-config>
which has parameters (like <config> to apply to
a specific datastore.

The action node is embedded within some data that has to be parsed
in a specific datastore before the action is processed.
This data is required to be in <operational>.
It also has XPath and leafref that needs to be resolved (same as <rpc>).

The side effects of the <rpc> or <action> can impact other datastores.
This would be defined in the description-stmt and this is not a problem.



Randy
>
>
Andy


> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>