]> git.puffer.fish Git - matthieu/frr.git/commit
mgmtd: validate candidate yang tree before creating a config diff
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 14 Nov 2023 19:17:24 +0000 (20:17 +0100)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 30 Nov 2023 01:10:09 +0000 (03:10 +0200)
commitc81776c8e9b6d183c46f8a91c7e666467d935b1a
tree9dc8432dfd93943401773eff0a5143af71d52b21
parent4aff978cee928cc0f8e1bf68a10d9c6ebb4b270e
mgmtd: validate candidate yang tree before creating a config diff

The candidate yang tree should be validated before `nb_config_diff` is
called. `nb_config_diff` ignores all prohibited operations and can
provide an empty change list because of this. For example, if a user
deletes a mandatory node from the candidate datastore and tries to make
a commit, they'll receive the "No changes found to be committed!" error,
because such a change is ignored by `nb_config_diff`. Instead, mgmtd
should tell the user that their candidate datastore is not valid and
can't be commited.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
mgmtd/mgmt_txn.c