Re: [netmod] Action and RPC statements
Andy Bierman <andy@yumaworks.com> Mon, 06 November 2017 17:16 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 A359D13FB55 for <netmod@ietfa.amsl.com>; Mon, 6 Nov 2017 09:16:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 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] 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 dOE6yhP0K8tI for <netmod@ietfa.amsl.com>; Mon, 6 Nov 2017 09:15:57 -0800 (PST)
Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (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 1FD3D13FAF7 for <netmod@ietf.org>; Mon, 6 Nov 2017 09:15:57 -0800 (PST)
Received: by mail-lf0-x22e.google.com with SMTP id g70so11334919lfl.3 for <netmod@ietf.org>; Mon, 06 Nov 2017 09:15:57 -0800 (PST)
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=5dsVRGD2b0d4i4mJJkvklkI14JdbNyFmukzBHQqIY6s=; b=14F14hZhgeLx1znKrA444osZ5zxHhNY+G6eTGthAD1VAw0tDf64zzUZmKAxQx9FMel fiYq8mUISYKQt8SynzU9TjbUiRzyp4c1wVCx0to2cClETYcZJ14V2/xi4uhSCU/LprUm +q4K4qhLvPARYUJYjs3+PVq1oLONackxLTrDwratAbBw/3E8tIxDglnK8FZMCgg6O0OC TfHeZvc+3qbX6ADPzGkc8kFfTkZGA6Z9OxvfLVdwcphuuPSIGj5IUGko+D8EPRsf6I2l Lk9fA6smNay4g204C2qz1i1C2fXCh7xj9SjA3KxriitSo1ZZ9UXox9Lht0D+ULeBlNzL Fgmg==
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=5dsVRGD2b0d4i4mJJkvklkI14JdbNyFmukzBHQqIY6s=; b=CjtEdwQRfh4nlyYxYodYpVGnC5CUR2UqgrLWnkJFFFojeA/h43oXy59MdMi7xEOgMh Ge2KB1EhZepeQlbP9e8mLNkbCKzdLisY+cbJZrBqA8zKXdETz+llKQRFjZ4Drlvj7JmO /aNrQGmwfwj1oLKO4ZbGlK+wHOTDjKj5hw1hE8AD15lnzjw6DEfhtgAAgbkj5OCSBFuv q72g3PxmdP2mL9uQecIO419Pn/dHM6ufoWDhoDTvKWxgViZflKS4tEW8eBEUAuYQU6yB ebEERWmHZpC1BUr1uyYE/0799MKxWXCfXoXS43dypBOq0/NY5oOokyJW4vQNEkTWkI2Q y6fA==
X-Gm-Message-State: AMCzsaVLQL9VI2+V4630s8ZY7ptgdZu90CaEHs0bnG724ugP9Bc3mUl3 POZfSBl8Gybc8bn8mhOAtgdciyjx5sOvbqnyn5Qt4Q==
X-Google-Smtp-Source: ABhQp+S0CAxsbJQdDAmuJ7MWsiB3lAC3ucUFawHjm/aQHw8v7osi4irYw1ZuoK/sFOmYvT44cyRwL+50ARsSmqgQsL8=
X-Received: by 10.25.23.165 with SMTP id 37mr5657809lfx.202.1509988555344; Mon, 06 Nov 2017 09:15:55 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.214.9 with HTTP; Mon, 6 Nov 2017 09:15:54 -0800 (PST)
In-Reply-To: <20171106.141924.996087392255055625.mbj@tail-f.com>
References: <CABCOCHRkpPQ7Udcd7AZDTwYvEP3BOOv8ec6GOUOf2_QZsZApEA@mail.gmail.com> <201711022116.vA2LGTB3044617@idle.juniper.net> <CABCOCHS+g45H7P8nZ7tUQeW5Q=xXQRm7kQJWwsfG8PrR-DERSQ@mail.gmail.com> <20171106.141924.996087392255055625.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 06 Nov 2017 09:15:54 -0800
Message-ID: <CABCOCHSKDQzkZ_VvXb-A9Pne8280Z7NzStMeER6798Zc_isMzw@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: Phil Shafer <phil@juniper.net>, Robert Wilton <rwilton@cisco.com>, Kent Watsen <kwatsen@juniper.net>, "netmod@ietf.org" <netmod@ietf.org>, Randy Presuhn <randy_presuhn@alumni.stanford.edu>
Content-Type: multipart/alternative; boundary="001a11401a0474e7db055d539bd0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/pG-hEYVhjXX2HLr8CTN4mrcDl2c>
Subject: Re: [netmod] Action and RPC statements
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: Mon, 06 Nov 2017 17:16:01 -0000
On Mon, Nov 6, 2017 at 5:19 AM, Martin Bjorklund <mbj@tail-f.com> wrote:
> Hi,
>
> Trying to summarize this issue.
>
> The problem is which datastore is used to:
>
> 1a. evaluate action ancestor nodes
> 1b. evaluate action input/output parameter leafref,
> instance-identifier, must, when
> 2. evaluate rpc input/output parameter leafref,
> instance-identifier, must, when
>
> (Note that the side effects of an action/rpc is not part of this
> issue)
>
> I think it would be very weird if 1a and 1b were treated differently,
> so I just label them as 1 below.
>
> Possible solutions:
>
> A. Always use <operational> for 1 and 2.
>
> (This is what the current nmda draft says).
>
> B. Let the client specify the datastore for 1, and use <operational>
> for 2.
>
> (Note that this is trivial in RESTCONF (since the datastore is
> part of the URL), but would require a new parameter for NETCONF
> (or a new <action2>).
>
> C. Let the client specify the datastore for 1 and 2.
>
> This would require a new generic parameter for how RPCs are
> invoked in both NETCONF and RESTCONF.
>
> D. Like B, but let the description of the "rpc" statement optionally
> override this.
>
>
> I prefer B and then D.
>
>
>
I prefer (A).
I do not see how this is transparent to non-NMDA clients that use actions
and/or rpcs.
The evaluation of config=true nodes change from <running> to <operational>.
This is a significant change that can break non-NMDA clients.
A non-NMDA client thinks the server is performing XPath evaluation according
to RFC 7950, sec. 6.4.1.
o If the XPath expression is defined in a substatement to an "input"
statement in an "rpc" or "action" statement, the accessible tree
is the RPC or action operation instance, all state data in the
server, and the running configuration datastore. The root node
has top-level data nodes in all modules as children.
Additionally, for an RPC, the root node also has the node
representing the RPC operation being defined as a child. The node
representing the operation being defined has the operation's input
parameters as children.
o If the XPath expression is defined in a substatement to an
"output" statement in an "rpc" or "action" statement, the
accessible tree is the RPC or action operation instance, all state
data in the server, and the running configuration datastore. The
root node has top-level data nodes in all modules as children.
Additionally, for an RPC, the root node also has the node
representing the RPC operation being defined as a child. The node
representing the operation being defined has the operation's
output parameters as children.
> /martin
>
>
>
Andy
>
>
> Andy Bierman <andy@yumaworks.com> wrote:
> > On Thu, Nov 2, 2017 at 2:16 PM, Phil Shafer <phil@juniper.net> wrote:
> >
> > > Sorry, if I wasn't clear. I meant the <datastore> element would
> > > be directly under <action>, so the system knows where to start
> > > looking for data. Guessing is bad.
> > >
> > >
> > Totally agree guessing is bad.
> > Did you see the <action2> proposal in a previous email?
> > That is exactly what I proposed, except I do not want to
> > overload <action> so the new template would be a different name.
> >
> > I realize the expanded name of the datastore element prevents it from
> > being confused with top-level YANG nodes, but the conformance
> > is more clear with a new name.
> >
> >
> >
> >
> > > Thanks,
> > > Phil
> > >
> >
> > Andy
> >
> >
> > >
> > >
> > > Andy Bierman writes:
> > > >So a server will be required to guess the correct datastore until it
> > > >finds the right one that matches the action instance?
> > > >
> > > > <action>
> > > > <top>
> > > > <list1>
> > > > <key>10</key>
> > > > <do-test>
> > > > <datastore>candidate</datastore>
> > > > </do-test>
> > > > </list1>
> > > > </top>
> > > > </action>
> > > >
> > > >The server will guess the datastore in some proprietary order and
> parse
> > > >instances of /top/ and /top/list1. Then it finds the <do-test> action
> > > >and parses the input to get to the datastore and find out the real
> > > datastore
> > > >to use. If the server guessed wrong, then it reparses the <action>
> > > against
> > > >the requested datastore. Hopefully the schema trees match up.
> > > >
> > > >Will vendors do all the extra work required to support this sort of
> thing?
> > > >I doubt it.
> > > >
> > > >
> > > >Andy
> > > >
> > > >
> > > >
> > > >
> > > >On Tue, Oct 31, 2017 at 11:36 PM, Phil Shafer <phil@juniper.net>
> wrote:
> > > >
> > > >> Robert Wilton writes:
> > > >> >ii) However, as far as I can see, it doesn't make sense for an
> action
> > > to
> > > >> >directly affect the contents of any configuration datastore, that
> > > should
> > > >> >be done via a purpose built rpc (like edit-config).
> > > >>
> > > >> An example action would be to retrieve the fingerprint of an ssh
> > > >> key. I might want to get the fingerprint of a key in <candidate>
> > > >> before I commit it.
> > > >>
> > > >> Or I could have an action that sets the SNMPv3 auth key to a random
> > > >> value, and I want to invoke that action against <candidate>.
> > > >>
> > > >> Seems like <startup> might also be an interesting place to target
> > > >> actions, but I can't think of a good example.
> > > >>
> > > >> There are always scenarios where something is useful, and the
> problem
> > > >> with ruling it out is that it becomes needed at some later point.
> > > >> We've a habit of ruling out things and later wishing we had them.
> > > >>
> > > >> Is the easy fix to just put a datastore leaf under rpc/action and
> > > >> have it default to operational? Any specific RPC can define its
> > > >> own datastore leaf of hard-code the database in the description
> > > >> (explicitly or implicitly <operational>), but the <action> RPC only
> > > >> gets this if we make a new parameter for it.
> > > >>
> > > >> Thanks,
> > > >> Phil
> > > >>
> > > >
> > > >--001a11411b0ad2d58d055cee96cb
> > > >Content-Type: text/html; charset="UTF-8"
> > > >Content-Transfer-Encoding: quoted-printable
> > > >
> > > ><div dir=3D"ltr">Hi,<div><br></div><div>So a server will be required
> to
> > > gue=
> > > >ss the correct datastore until it</div><div>finds the right one that
> > > matche=
> > > >s the action instance?</div><div><br></div><div>=C2=A0
> > > =C2=A0<action>=
> > > ></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0<top></div><div>=C2=A0
> > > =C2=A0 =
> > > >=C2=A0 =C2=A0 =C2=A0 <list1></div><div>=C2=A0 =C2=A0 =C2=A0
> =C2=A0 =
> > > >=C2=A0 =C2=A0 =C2=A0<key>10</key></div><div>=C2=A0 =C2=A0
> > > =C2=
> > > >=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<do-test></div><div>=C2=A0
> =C2=A0
> > > =C2=
> > > >=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <datastore>candidate<
> > > /datas=
> > > >tore></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> > > =C2=A0</do-=
> > > >test></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> > > </list1></div><=
> > > >div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </top></div><div>=C2=A0 =C2=A0
> > > </a=
> > > >ction></div><div><br></div><div>The server will guess the
> datastore
> > > in s=
> > > >ome proprietary order and parse</div><div>instances of /top/ and
> > > /top/list1=
> > > >.=C2=A0 Then it finds the <do-test> action</div><div>and parses
> the
> > > i=
> > > >nput to get to the datastore and find out the real
> datastore</div><div>to
> > > u=
> > > >se.=C2=A0 If the server guessed wrong, then it reparses the
> > > <action> =
> > > >against</div><div>the requested datastore.=C2=A0 Hopefully the schema
> > > trees=
> > > > match up.</div><div><br></div><div>Will vendors do all the extra
> work
> > > requ=
> > > >ired to support this sort of thing?</div><div>I doubt
> > > it.</div><div><br></d=
> > > >iv><div><br></div><div>Andy</div><div><br></div><div><br></
> > > div><div><br></d=
> > > >iv><div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On
> Tue,
> > > O=
> > > >ct 31, 2017 at 11:36 PM, Phil Shafer <span dir=3D"ltr"><<a
> > > href=3D"mailt=
> > > >o:phil@juniper.net" target=3D"_blank">phil@juniper.net</a>></span>
> > > wrote=
> > > >:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
> > > .8ex;border-le=
> > > >ft:1px #ccc solid;padding-left:1ex">Robert Wilton writes:<br>
> > > >>ii) However, as far as I can see, it doesn't make sense for an
> > > acti=
> > > >on to<br>
> > > >>directly affect the contents of any configuration datastore, that
> > > shoul=
> > > >d<br>
> > > >>be done via a purpose built rpc (like edit-config).<br>
> > > ><br>
> > > >An example action would be to retrieve the=C2=A0 fingerprint of an
> ssh<br>
> > > >key.=C2=A0 I might want to get the fingerprint of a key in
> > > <candidate>=
> > > >;<br>
> > > >before I commit it.<br>
> > > ><br>
> > > >Or I could have an action that sets the SNMPv3 auth key to a
> random<br>
> > > >value, and I want to invoke that action against <candidate>.<br>
> > > ><br>
> > > >Seems like <startup> might also be an interesting place to
> > > target<br>
> > > >actions, but I can't think of a good example.<br>
> > > ><br>
> > > >There are always scenarios where something is useful, and the
> problem<br>
> > > >with ruling it out is that it becomes needed at some later point.<br>
> > > >We've a habit of ruling out things and later wishing we had
> them.<br>
> > > ><br>
> > > >Is the easy fix to just put a datastore leaf under rpc/action and<br>
> > > >have it default to operational?=C2=A0 Any specific RPC can define
> its<br>
> > > >own datastore leaf of hard-code the database in the description<br>
> > > >(explicitly or implicitly <operational>), but the <action>
> > > RPC =
> > > >only<br>
> > > >gets this if we make a new parameter for it.<br>
> > > ><br>
> > > >Thanks,<br>
> > > >=C2=A0Phil<br>
> > > ></blockquote></div><br></div></div></div>
> > > >
> > > >--001a11411b0ad2d58d055cee96cb--
> > >
>
- [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Martin Bjorklund
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Juergen Schoenwaelder
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Juergen Schoenwaelder
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Juergen Schoenwaelder
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Robert Wilton
- Re: [netmod] Action and RPC statements Phil Shafer
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Juergen Schoenwaelder
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Juergen Schoenwaelder
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Robert Wilton
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Martin Bjorklund
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Martin Bjorklund
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Andy Bierman
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Martin Bjorklund
- [netmod] Action and RPC statements [was Re: augme… Robert Wilton
- Re: [netmod] augment YANG 1.0 with YANG 1.1 OK? Robert Wilton
- Re: [netmod] Action and RPC statements [was Re: a… Randy Presuhn
- Re: [netmod] Action and RPC statements [was Re: a… Andy Bierman
- Re: [netmod] Action and RPC statements [was Re: a… Randy Presuhn
- Re: [netmod] Action and RPC statements Martin Bjorklund
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- Re: [netmod] Action and RPC statements Kent Watsen
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Andy Bierman
- Re: [netmod] Action and RPC statements Randy Presuhn
- Re: [netmod] Action and RPC statements Andy Bierman
- Re: [netmod] Action and RPC statements Alexander Clemm
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- Re: [netmod] Action and RPC statements Andy Bierman
- Re: [netmod] Action and RPC statements Alexander Clemm
- Re: [netmod] Action and RPC statements Alexander Clemm
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- Re: [netmod] Action and RPC statements Phil Shafer
- Re: [netmod] Action and RPC statements Andy Bierman
- Re: [netmod] Action and RPC statements Martin Bjorklund
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- Re: [netmod] Action and RPC statements Martin Bjorklund
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- [netmod] Reset tags RPC [was Re: Action and RPC s… Robert Wilton
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements Andy Bierman
- Re: [netmod] Action and RPC statements Juergen Schoenwaelder
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements Robert Wilton
- Re: [netmod] Action and RPC statements Lou Berger
- Re: [netmod] Action and RPC statements t.petch