clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
215 stars 72 forks source link

Netconf With-defaults Capability #262

Closed pheller closed 2 years ago

pheller commented 3 years ago

It is desirable to support https://datatracker.ietf.org/doc/html/rfc6243 such that elements within a configuration datastore can be identified as default or non-default without the need for schema awareness. For example:

    <config xmlns:nc2="urn:ietf:params:xml:ns:netconf:default:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <sys:system xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
        <sys:ntp>
          <sys:enabled nc2:default="true">true</sys:enabled>
        </sys:ntp>
      </sys:system>
    </config>

With this supported, subsequent features can be supported, like show configuration | display defaults, and thus show configuration could omit defaults for a more terse display.

olofhagsand commented 2 years ago

feature implemented and merged: https://github.com/clicon/clixon/commit/e39d18d59fb61f39f005f51f5ba9f8e3b575bc2a

pheller commented 2 years ago

Tested NETCONF, RESTCONF, and CLI - looks good to me, thanks!