Re: [netmod] Action and RPC statements

Andy Bierman <andy@yumaworks.com> Wed, 01 November 2017 16:44 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 D3E5A13F70A for <netmod@ietfa.amsl.com>; Wed, 1 Nov 2017 09:44:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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_NONE=-0.0001, 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 xFyKMoGluovI for <netmod@ietfa.amsl.com>; Wed, 1 Nov 2017 09:44:52 -0700 (PDT)
Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (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 A22F113F7D7 for <netmod@ietf.org>; Wed, 1 Nov 2017 09:44:47 -0700 (PDT)
Received: by mail-lf0-x231.google.com with SMTP id a132so3224030lfa.7 for <netmod@ietf.org>; Wed, 01 Nov 2017 09:44:47 -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=HpwkEkzzMmvzwCT2mocnThFI5E4kmoMe/hszpymXMxg=; b=vgVLwicb/6jPKgMs9knEA23H1zDLHeGbMP2U4AKLiIhwKecF2OkVDb8ZFIKRQWgmsY amgwkGrBBGrVhaphxeO/vCGMRskEGfyqydq19YnyZY12iTYKc9KVQBTPzArOzc/BSR6l mjRNWv6mge5895KgTAd+98MRQAlvON8ocvVGVbXJfT8Dssrzox+bLFLSl6xKhTaYI5wi gEmiuqvy6+q01ZZLwAn5f5/O0NeCEjSdMVdPLGbdMMHElcCoxLv4TpKZ+/XRmKO88l/k g0tch/Md4L25oYrnuiktIVE2TOX3CiEKTG8srjQpAzWjexmRj4pwESIhBwAnmE1oo68K CdoA==
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=HpwkEkzzMmvzwCT2mocnThFI5E4kmoMe/hszpymXMxg=; b=Co3G8lAmUzEitbrcfyWPM4LOTWcRP3dw8ZIQEn7TXnPxSD78UN8AS95Mx09TpyRvQr E9Olvsy6F38mN+9tonrv9bkdZH90PkWg8sbb2NeNZCmCfuRf1z2SUT4orReVw8uWH0nT vrJWmazJlM9xy2mzlXJaKZQdsVwFHzaWFuqydfgg1fWjVNAxW4ff4kdq6FzxLRklqTny hFZJyst4Dm3clLR2+yhdciqvNJNT6rAK7OapYGapCjwp5HjRt8R8gZ6R4aTfNCu7tw1N XdyXrKCT9acfUTtoGWlqRxgAJtNO5ofyeQB9TwhdAjg52N5UEoiAsLQeVOXGxItmHECE FJAA==
X-Gm-Message-State: AJaThX42oU2kkyjJUghX8uSxMllhHOeXDYhHgBAd0g1g5feglAGlHN5e AXQJ05eclP6SRCZAwLum10LNjIRHyz5UhF/Z25ExsA==
X-Google-Smtp-Source: ABhQp+TKJE+kvxvNYYSelieG3lxHH6SSHtoNp5JukAcTfjRhkV82nBxEDtxWfUvKTGU8vPX8iIq+qg6DrgVTvlhjsQc=
X-Received: by 10.25.161.201 with SMTP id k192mr146719lfe.45.1509554685917; Wed, 01 Nov 2017 09:44:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.150.198 with HTTP; Wed, 1 Nov 2017 09:44:44 -0700 (PDT)
In-Reply-To: <201711010636.vA16aW1S027622@idle.juniper.net>
References: <d93512fd-0fd7-3ea0-7bee-b855acb42ce7@cisco.com> <201711010636.vA16aW1S027622@idle.juniper.net>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 1 Nov 2017 09:44:44 -0700
Message-ID: <CABCOCHRkpPQ7Udcd7AZDTwYvEP3BOOv8ec6GOUOf2_QZsZApEA@mail.gmail.com>
To: Phil Shafer <phil@juniper.net>
Cc: Robert Wilton <rwilton@cisco.com>, Kent Watsen <kwatsen@juniper.net>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>, Randy Presuhn <randy_presuhn@alumni.stanford.edu>
Content-Type: multipart/alternative; boundary="001a11411b0ad2d58d055cee96cb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/h5YsCJ0jOF2SNknesSgaP6WfXLM>
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: Wed, 01 Nov 2017 16:44:56 -0000

Hi,

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
>