<get-config>

A <get-config> operation is supported on the <candidate> datastore.

The <get-config> requests on the <candidate> datastore return only XML-formatted content. If no filter is specified for the <candidate> datastore, SR OS returns only the Nokia SR OS configurations.

For the Nokia SR OS YANG modules, <get-config> requests that specify a nonexistent list node or presence container result in an <rpc-error> response.

For the ‟report-all” value with the <with-defaults> tag (RFC 6243) in an XML- content layer, <get-config> returns the equivalent of the CLI command info detail (the returned data includes attributes that are set to their default values).

Subtree filtering is supported for <get-config> (and <get> requests). The following is the subtree filtering behavior.

The <get-config> operation returns data nodes set by a client to their default Nokia SR OS model values (the ‟explicit” mode as described in RFC 6243).

To retrieve BOF configurations, the ‟bof” <configuration-region> must be specified within the <get-config> <source>. For example:

<?xml version="1.0" encoding="UTF-8"?> 
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
  <source>
     <configuration-region>bof</configuration-region>
     <running/>
  </source>
    <filter>
        <bof xmlns="urn:nokia.com:sros:ns:yang:sr:bof-conf">
        </bof>
    </filter>
</get-config>
</rpc>
]]>]]>

To retrieve LI configurations, the ‟li” <configuration-region> must be specified within the <get-config> <source>. For example:

<get-config>
  <source>
    <configuration-region>li</configuration-region>
    <candidate/>
  </source>
    <filter>
       …
    </filter>
</get-config>

Alternatively, the <source> can be specified in the format of ‟configuration-region”-”datastore”. For example:

<get-config>
  <source>
    <li-candidate/>
  </source>
    <filter>
       …
    </filter>
</get-config>

When both the <configuration-region> and the ‟configuration-region”-‟datastore” format are used, SR OS applies the last tag used in the XML request. For example:

<get-config>
  <source>
    <configuration-region>configure</configuration-region>
      <li-candidate/>
  </source>
    <filter>
      …
    </filter>
</get-config>

In the preceding example, the <get-config> is used to retrieve the ‟li” configuration data from the ‟li” candidate datastore.

When a mismatched namespace or <configuration-region> combination is specified, SR OS returns an empty <data>.

See Table: Protocol operations and level of support in Nokia SR OS NETCONF servers for more details.

If present, configuration annotations are encoded with the nokia-attr:comment attribute. In the following example, configure system name is annotated with the comment "This is a comment on the system name." in the RPC reply:

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <data>
        <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes">
            <system>
                <name nokia-attr:comment="This is a comment on the system name."> node2</name>
            </system>
        </configure>
    </data>
</rpc-reply>

The optional proprietary <format> argument is supported. See Output format selection for more information.

The following sections contain examples of <get-config> request and response messages.