Re: [Netconf] delete-config on candidate

Martin Bjorklund <mbj@tail-f.com> Mon, 17 December 2018 17:05 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4FF07126DBF for <netconf@ietfa.amsl.com>; Mon, 17 Dec 2018 09:05:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 5PkIeYt1Nz2M for <netconf@ietfa.amsl.com>; Mon, 17 Dec 2018 09:05:41 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 9B659130EC6 for <netconf@ietf.org>; Mon, 17 Dec 2018 09:05:41 -0800 (PST)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 873521AE0397; Mon, 17 Dec 2018 18:05:40 +0100 (CET)
Date: Mon, 17 Dec 2018 18:05:40 +0100
Message-Id: <20181217.180540.1115262004271853034.mbj@tail-f.com>
To: jonathan@hansfords.net
Cc: netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <em6adf925f-5933-4fdb-849b-d54aed61e01d@morpheus>
References: <em6adf925f-5933-4fdb-849b-d54aed61e01d@morpheus>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/4Q-s6CZ7LcAKFHGwCzfCfeohnkQ>
Subject: Re: [Netconf] delete-config on candidate
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Dec 2018 17:05:43 -0000

Hi,

"Jonathan Hansford" <jonathan@hansfords.net> wrote:
> Hi,
> 
> In 2009-2010 the question was asked whether the <delete-config>
> operation was allowed on the candidate configuration datastore. In May
> 2010 it was stated "The <delete-config> definition need not list all
> disallowed options. But the section on :candidate does not like (sic)
> <delete-config> as a modified operation.  This means delete-config is
> not allowed." (See Re: [Netconf] delete-config on candidate?
> <https://mailarchive.ietf.org/arch/msg/netconf/k-ioZ8Ev3vc27ky4dHH-cQtTEnY>)
> 
> The implication is that, unless something is explicitly stated as
> being allowed (in this case in RFC 4741 and, presumably, by extension
> RFC 6241), it is not allowed.

Well, the quoted email was from the time when we worked on 4741bis,
aka 6241.

> I have just checked RFC 6241 and, on that basis, come to the following
> conclusions:
> <copy-config> : <running>, <candidate>, <startup> and <url> are
> allowed as sources and targets
>
> <delete-config> : <startup> and <url>
> are allowed as targets; <running> is explicitly excluded; <candidate>
> is implicitly excluded
>
> <edit-config> : <running> and <candidate> are
> allowed as targets; <startup> and <url> are implicitly excluded,
> though <url> can be the config
>
> <get-config> : <candidate> and <startup>
> are allowed as sources; <running> is used in examples and therefore I
> assume this constitutes an implicit inclusion; <url> is implicitly
> excluded
>
> <lock> and <unlock> : <running>, <candidate> and <startup> are
> allowed as targets; <url> is implicitly excluded
>
> <validate> :
> <candidate>, <startup> and <url> are allowed as sources; <running> is
> implicitly excluded
>
> So, in summary:
> <running> is not a valid target for <delete-config> or a valid source
> for <validate>; it is probably a valid source for
> <get-config><candidate> is not a valid target for
> <delete-config><startup> is not a valid target for <edit-config><url>
> is not a valid target for <edit-config> (though it can be the config),
> <lock> or <unlock>, or a valid source for <get-config>
> Is that the general understanding of which operations can be used on
> which datastores?

No; check the YANG module in RFC 6241 and you will see for example:

    rpc get-config {
      ...
      input {
        container source {
          description
            "Particular configuration to retrieve.";

          choice config-source {
            mandatory true;
            description
              "The configuration to retrieve.";
            leaf candidate {
              ...
            }
            leaf running {
              ...
            }


so it is clear that 'running' can be used in get-config.  Similar for
the others in your list.


/martin