Subject: [Netconf] delete-config on candidate

From: "Jonathan Hansford" <[email-masked]>
Date: Mon, 17 Dec 2018 16:40:18 +0000

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.

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?

Thanks,

Jonathan

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 17 Dec 2018 18:05:40 +0100 (CET)

Hi,

"Jonathan Hansford" <[email-masked]> wrote:
> 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.

> <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:
> <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),

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