summaryrefslogtreecommitdiff
path: root/lib/affinitymap_northbound.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-01-18 23:27:56 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-01-19 03:46:56 +0200
commitfdd834b8cc69b1b8c9bdfcfa1f033f35affb4c09 (patch)
treee583ef8ad991140ef214508d1f50ec8cc93e25a9 /lib/affinitymap_northbound.c
parent6103c6251ac7986cda4d538d25efc5fcc2b6d1c7 (diff)
lib: validate affinity-map reference using yang model
Change the type of affinity leaf-list in frr-zebra to a leafref with "require-instance" property set to true. This change tells libyang to automatically check that affinity-map exists before usage and doesn't allow it to be deleted if it's referenced. It allows us to remove all the manual code that is doing the same thing. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/affinitymap_northbound.c')
-rw-r--r--lib/affinitymap_northbound.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/affinitymap_northbound.c b/lib/affinitymap_northbound.c
index 331075f5c1..bee2ebe861 100644
--- a/lib/affinitymap_northbound.c
+++ b/lib/affinitymap_northbound.c
@@ -47,11 +47,6 @@ static int lib_affinity_map_destroy(struct nb_cb_destroy_args *args)
switch (args->event) {
case NB_EV_VALIDATE:
- if (!affinity_map_check_use_hook(name))
- break;
- snprintf(args->errmsg, args->errmsg_len,
- "affinity-map %s is used", name);
- return NB_ERR_VALIDATION;
case NB_EV_PREPARE:
case NB_EV_ABORT:
break;