mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 20:26:36 +00:00
lib: add definitions for vrf xpaths
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
3fa607beba
commit
09b150ef2a
@ -686,8 +686,8 @@ int vrf_handler_create(struct vty *vty, const char *vrfname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vty) {
|
if (vty) {
|
||||||
snprintf(xpath_list, sizeof(xpath_list),
|
snprintf(xpath_list, sizeof(xpath_list), FRR_VRF_KEY_XPATH,
|
||||||
"/frr-vrf:lib/vrf[name='%s']", vrfname);
|
vrfname);
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, xpath_list, NB_OP_CREATE, NULL);
|
nb_cli_enqueue_change(vty, xpath_list, NB_OP_CREATE, NULL);
|
||||||
ret = nb_cli_apply_changes(vty, xpath_list);
|
ret = nb_cli_apply_changes(vty, xpath_list);
|
||||||
@ -821,8 +821,7 @@ DEFUN_YANG (no_vrf,
|
|||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(xpath_list, sizeof(xpath_list), "/frr-vrf:lib/vrf[name='%s']",
|
snprintf(xpath_list, sizeof(xpath_list), FRR_VRF_KEY_XPATH, vrfname);
|
||||||
vrfname);
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, xpath_list, NB_OP_DESTROY, NULL);
|
nb_cli_enqueue_change(vty, xpath_list, NB_OP_DESTROY, NULL);
|
||||||
return nb_cli_apply_changes(vty, xpath_list);
|
return nb_cli_apply_changes(vty, xpath_list);
|
||||||
|
@ -52,6 +52,9 @@ enum { IFLA_VRF_UNSPEC, IFLA_VRF_TABLE, __IFLA_VRF_MAX };
|
|||||||
#define VRF_ALL_CMD_HELP_STR "Specify the VRF\nAll VRFs\n"
|
#define VRF_ALL_CMD_HELP_STR "Specify the VRF\nAll VRFs\n"
|
||||||
#define VRF_FULL_CMD_HELP_STR "Specify the VRF\nThe VRF name\nAll VRFs\n"
|
#define VRF_FULL_CMD_HELP_STR "Specify the VRF\nThe VRF name\nAll VRFs\n"
|
||||||
|
|
||||||
|
#define FRR_VRF_XPATH "/frr-vrf:lib/vrf"
|
||||||
|
#define FRR_VRF_KEY_XPATH "/frr-vrf:lib/vrf[name='%s']"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pass some OS specific data up through
|
* Pass some OS specific data up through
|
||||||
* to the daemons
|
* to the daemons
|
||||||
|
Loading…
Reference in New Issue
Block a user