diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-18 23:27:56 +0200 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-19 03:46:56 +0200 |
| commit | fdd834b8cc69b1b8c9bdfcfa1f033f35affb4c09 (patch) | |
| tree | e583ef8ad991140ef214508d1f50ec8cc93e25a9 /lib/affinitymap.h | |
| parent | 6103c6251ac7986cda4d538d25efc5fcc2b6d1c7 (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.h')
| -rw-r--r-- | lib/affinitymap.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/affinitymap.h b/lib/affinitymap.h index 19edf5a269..5ce233404f 100644 --- a/lib/affinitymap.h +++ b/lib/affinitymap.h @@ -50,7 +50,6 @@ DECLARE_QOBJ_TYPE(affinity_map); struct affinity_maps { struct list *maps; - bool (*check_use_hook)(const char *affmap_name); bool (*check_update_hook)(const char *affmap_name, uint16_t new_pos); void (*update_hook)(const char *affmap_name, uint16_t old_pos, uint16_t new_pos); @@ -66,11 +65,9 @@ void affinity_map_unset(const char *name); struct affinity_map *affinity_map_get(const char *name); char *affinity_map_name_get(const int pos); -bool affinity_map_check_use_hook(const char *affmap_name); bool affinity_map_check_update_hook(const char *affmap_name, uint16_t new_pos); void affinity_map_update_hook(const char *affmap_name, uint16_t new_pos); -void affinity_map_set_check_use_hook(bool (*func)(const char *affmap_name)); void affinity_map_set_check_update_hook(bool (*func)(const char *affmap_name, uint16_t new_pos)); void affinity_map_set_update_hook(void (*func)(const char *affmap_name, |
