mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
lib: sort prefix-list commands by sequence-number in running-config
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
ae253f502e
commit
73695730f5
@ -239,6 +239,7 @@ extern void access_list_show(struct vty *vty, struct lyd_node *dnode,
|
||||
bool show_defaults);
|
||||
extern void access_list_remark_show(struct vty *vty, struct lyd_node *dnode,
|
||||
bool show_defaults);
|
||||
extern int prefix_list_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2);
|
||||
extern void prefix_list_show(struct vty *vty, struct lyd_node *dnode,
|
||||
bool show_defaults);
|
||||
extern void prefix_list_remark_show(struct vty *vty, struct lyd_node *dnode,
|
||||
|
@ -1701,6 +1701,14 @@ ALIAS(
|
||||
ACCESS_LIST_REMARK_STR
|
||||
ACCESS_LIST_REMARK_LINE_STR)
|
||||
|
||||
int prefix_list_cmp(struct lyd_node *dnode1, struct lyd_node *dnode2)
|
||||
{
|
||||
uint32_t seq1 = yang_dnode_get_uint32(dnode1, "./sequence");
|
||||
uint32_t seq2 = yang_dnode_get_uint32(dnode2, "./sequence");
|
||||
|
||||
return seq1 - seq2;
|
||||
}
|
||||
|
||||
void prefix_list_show(struct vty *vty, struct lyd_node *dnode,
|
||||
bool show_defaults)
|
||||
{
|
||||
|
@ -1691,6 +1691,7 @@ const struct frr_yang_module_info frr_filter_info = {
|
||||
.cbs = {
|
||||
.create = lib_prefix_list_entry_create,
|
||||
.destroy = lib_prefix_list_entry_destroy,
|
||||
.cli_cmp = prefix_list_cmp,
|
||||
.cli_show = prefix_list_show,
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user