ConfD User Community

With-defaults capability, default value set by server is reported

Hi experts,

When I go through the RFC 6243 (with-default NETCONF capablitiy), I can’t understand below chapter. Could you help?

3.3. ‘explicit’ Retrieval Mode When data is retrieved with a parameter equal to ‘explicit’, a data node that was set by a client to its schema default value MUST be reported. A conceptual data node that would be set by the server to the schema default value MUST NOT be reported. Non-configuration data nodes containing the schema default value MUST be reported.

It’s said, " A conceptual data node that would be set by the server to the schema default value MUST NOT be reported." What’s the use case in ConfD? Is initial configurations under confd-cdb path loaded during confd start belongs to this case?

I did some test with the confd.examples intro/1-2-3, but the initial configurations loaded during confd start is reported. See below:

  1. After ‘make all’, put dhcpd_init.xml under confd-cdb directory, with below initial config set. Note: local7 is the default value of log-facility
     <config xmlns="http://tail-f.com/ns/config/1.0">
       <dhcp xmlns="http://tail-f.com/ns/example/dhcpd">
         <log-facility>local7</log-facility>
       </dhcp>
     </config>
  1. Start ConfD with ‘make start’
  2. Run below NETCONF command:
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <get>
    <filter>
      <dhcp xmlns="http://tail-f.com/ns/example/dhcpd"/>
    </filter>
    <with-defaults xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">explicit</with-defaults>
  </get>
</rpc>
]]>]]>
  1. Get result from ConfD:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"><data><dhcp xmlns="http://tail-f.com/ns/example/dhcpd"><log-facility>local7</log-facility></dhcp></data></rpc-reply>]]>]]>

No, in that case the configuration is understood to have been configured explicitly, hence reported by the server - as you can see in the case of the local7 value.

Hi,

Do you know any cases that the default value set by server side? Thanks!

No, I can’t recall a case that would be understood as “default value set by the server” (for ConfD at least).