Subject: [Netconf] [netconf] Query about the output of <get-config> from candidate before user executed any <edit-config> to candidate.

From: "Guopeipei (Peipei Guo)" <[email-masked]>
Date: Fri, 23 Jun 2017 07:31:16 +0000

Hi All,

I have one query about RFC6241 candidate datastore:
Before user executed any <edit-config> to candidate, there is no changes to candidate datastore. 
What should be the result of <get-config> from candidate.
     <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <get-config>
         <source>
           <candidate/>
         </source>
       </get-config>
     </rpc>

Result 1: return empty data as below. Base on the reason: user did not configure candidate, so no candidate conent.
     <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <data>
       </data>
     </rpc-reply>

Result 2: return entire configuration data which same as running datastore. Base on the reason: candidate no change, so same as running content.
     <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <data>
         <!-- ... entire set of data returned ... -->
       </data>
     </rpc-reply>

Which one should be correct? RFC6241 does not mention this point clearly.

Thanks.
Peipei Guo

---

From: Vinod Kumar <[email-masked]>
Date: Fri, 23 Jun 2017 19:34:09 +0530

Hi Guo PeiPei,
    As per the description of "Configuration Datastores" in section 5.1, it
states as follows
    *"A configuration datastore is defined as the complete set of
configuration data that is required to get a device from its initial
default state into a desired operational state." *
*     //Since candidate is also a configuration store, it must have a
complete set of configuration, In this case, it must be the running
configuration. *

    Section 8.3.1 has the following description
   * "The candidate configuration is a full configuration data set that
serves as a work place for creating and manipulating configuration data.
Additions, deletions, and changes can be made to this data to construct the
desired configuration data.  A <commit> operation MAY be performed at any
time that causes the device's running configuration to be set to the value
of the candidate configuration."*

*   "The <commit> operation effectively sets the running configuration
to the current contents of the candidate configuration.  While it could be
modeled as a simple copy, it is done as a distinct operation for a number
of reasons"*

*   "The client can discard any uncommitted changes to the candidate
**configuration
by executing the <discard-changes> operation.  This **operation reverts the
contents of the candidate configuration to the*
*   contents of the running configuration."*
   As per this, when no changes are done in candidate it needs to be same
as running.

  In my opinion, we need to have candidate store contents same as running
store, unless any change is done in candidate store. Once any change is
done in the candidate, all the manipulations needs to be maintained in
candidate store.

  So, In my interpretation, we need to return Result 2.

Thanks and Regards,
Vinod Kumar S.

On Fri, Jun 23, 2017 at 1:01 PM, Guopeipei (Peipei Guo) <
[email-masked]> wrote:

> Result 1: return empty data as below. Base on the reason: user did not
> configure candidate, so no candidate conent.
> Result 2: return entire configuration data which same as running
> datastore. Base on the reason: candidate no change, so same as running
> content.
> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>