From: Francis Dupont Date: Thu, 22 Nov 2018 10:28:57 +0000 (+0100) Subject: [195-document-sample-netconf-operation] Final changes X-Git-Tag: 284-need-dhcp6-example-for-netconf_base~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ec138bf70c214760650f67acdf79bd2f203f09e;p=thirdparty%2Fkea.git [195-document-sample-netconf-operation] Final changes --- diff --git a/doc/guide/netconf.xml b/doc/guide/netconf.xml index 43d0364153..98cab89210 100644 --- a/doc/guide/netconf.xml +++ b/doc/guide/netconf.xml @@ -351,7 +351,8 @@ done in dependency order and reverse dependency order accordingly. monitor any configuration changes as they appear in the sysrepo. Such changes can be done using sysrepocfg tool or remotely using any NETCONF client. For details, please see Sysrepo - documentation. Those tools can be used to modify YANG configurations in + documentation or . + Those tools can be used to modify YANG configurations in the running datastore. Note committed configurations are only updated in the running datastore: to keep them between server reboots they must be copied to the startup datastore. @@ -851,34 +852,34 @@ done in dependency order and reverse dependency order accordingly.
Error handling in Netconf Operation Example - There are 4 ways for a configuration to be bad: + There are 4 ways for a configuration to be bad: - - + + The configuration does not comply with the YANG schema. - - - The configuration can not be translated from YANG to + + + The configuration can not be translated from YANG to the Kea JSON. - - - The configuration is rejected by the Kea server. - - - - - The configuration was validated by the Kea server but + + + The configuration is rejected by the Kea server. + + + + + The configuration was validated by the Kea server but can not be applied. - - - + + + - In the first case the configuration in - the BAD-schema.xml file: + In the first case the configuration in + the BAD-schema.xml file: <config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"> <subnet4> @@ -933,8 +934,8 @@ done in dependency order and reverse dependency order accordingly. - In the third case the configuration is presented to the - Kea DHCPv6 server and fails to validate as in the + In the third case the configuration is presented to the + Kea DHCPv6 server and fails to validate as in the BAD-config.xml file: <config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"> @@ -961,15 +962,18 @@ done in dependency order and reverse dependency order accordingly. In the last case the problem is detected too late and the change must be reverted, for instance using the startup - datastore as a backup. + datastore as a backup, or with other words use the + sysrepocfg / + option (or simlar feature of NETCONF clients) + with care.
Netconf Operation Example with Two Pools - This example adds a second pool to the initial (i.e. startup) - configuration in the twopools.xml file: + This example adds a second pool to the initial (i.e. startup) + configuration in the twopools.xml file: <config xmlns="urn:ietf:params:xml:ns:yang:kea-dhcp6-server"> <subnet6> @@ -1082,7 +1086,7 @@ done in dependency order and reverse dependency order accordingly. - The corresponding Kea configuration in JSON is: + The corresponding Kea configuration in JSON is: { "Dhcp6": { @@ -1109,19 +1113,33 @@ done in dependency order and reverse dependency order accordingly. "loggers": [ { "name": "kea-dhcp6", - "output_options": [ - { - "output": "stderr" - } - ], - "severity": "DEBUG", - "debuglevel": 99 + "output_options": [ + { + "output": "stderr" + } + ], + "severity": "DEBUG", + "debuglevel": 99 } ] } } + + + To finish one of the previous examples can be replayed using + sysrepocfg in edit mode by: + + # sysrepocfg -d running -f xml -e vi kea-dhcp6-server + + or of course using a netconf client like + netopeer2-cli from the + + Netopeer2 NETCONF Toolset. + +