mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-01 04:09:01 +00:00
Merge pull request #9744 from idryzhov/isis-redist-cli
isisd: fix redistribute CLI
This commit is contained in:
commit
1365d3e2f5
@ -1330,11 +1330,14 @@ void cli_show_isis_def_origin_ipv6(struct vty *vty, struct lyd_node *dnode,
|
|||||||
* XPath: /frr-isisd:isis/instance/redistribute
|
* XPath: /frr-isisd:isis/instance/redistribute
|
||||||
*/
|
*/
|
||||||
DEFPY_YANG(isis_redistribute, isis_redistribute_cmd,
|
DEFPY_YANG(isis_redistribute, isis_redistribute_cmd,
|
||||||
"[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR
|
"[no] redistribute <ipv4$ip " PROTO_IP_REDIST_STR "$proto|ipv6$ip "
|
||||||
"$proto <level-1|level-2>$level [{metric (0-16777215)|route-map WORD}]",
|
PROTO_IP6_REDIST_STR "$proto> <level-1|level-2>$level"
|
||||||
|
"[{metric (0-16777215)|route-map WORD}]",
|
||||||
NO_STR REDIST_STR
|
NO_STR REDIST_STR
|
||||||
"Redistribute IPv4 routes\n"
|
"Redistribute IPv4 routes\n"
|
||||||
"Redistribute IPv6 routes\n" PROTO_REDIST_HELP
|
PROTO_IP_REDIST_HELP
|
||||||
|
"Redistribute IPv6 routes\n"
|
||||||
|
PROTO_IP6_REDIST_HELP
|
||||||
"Redistribute into level-1\n"
|
"Redistribute into level-1\n"
|
||||||
"Redistribute into level-2\n"
|
"Redistribute into level-2\n"
|
||||||
"Metric for redistributed routes\n"
|
"Metric for redistributed routes\n"
|
||||||
|
@ -543,12 +543,13 @@ void isis_redist_area_finish(struct isis_area *area)
|
|||||||
#ifdef FABRICD
|
#ifdef FABRICD
|
||||||
DEFUN (isis_redistribute,
|
DEFUN (isis_redistribute,
|
||||||
isis_redistribute_cmd,
|
isis_redistribute_cmd,
|
||||||
"redistribute <ipv4|ipv6> " PROTO_REDIST_STR
|
"redistribute <ipv4 " PROTO_IP_REDIST_STR "|ipv6 " PROTO_IP6_REDIST_STR ">"
|
||||||
" [{metric (0-16777215)|route-map WORD}]",
|
" [{metric (0-16777215)|route-map WORD}]",
|
||||||
REDIST_STR
|
REDIST_STR
|
||||||
"Redistribute IPv4 routes\n"
|
"Redistribute IPv4 routes\n"
|
||||||
|
PROTO_IP_REDIST_HELP
|
||||||
"Redistribute IPv6 routes\n"
|
"Redistribute IPv6 routes\n"
|
||||||
PROTO_REDIST_HELP
|
PROTO_IP6_REDIST_HELP
|
||||||
"Metric for redistributed routes\n"
|
"Metric for redistributed routes\n"
|
||||||
"ISIS default metric\n"
|
"ISIS default metric\n"
|
||||||
"Route map reference\n"
|
"Route map reference\n"
|
||||||
@ -599,12 +600,13 @@ DEFUN (isis_redistribute,
|
|||||||
|
|
||||||
DEFUN (no_isis_redistribute,
|
DEFUN (no_isis_redistribute,
|
||||||
no_isis_redistribute_cmd,
|
no_isis_redistribute_cmd,
|
||||||
"no redistribute <ipv4|ipv6> " PROTO_REDIST_STR,
|
"no redistribute <ipv4 " PROTO_IP_REDIST_STR "|ipv6 " PROTO_IP6_REDIST_STR ">",
|
||||||
NO_STR
|
NO_STR
|
||||||
REDIST_STR
|
REDIST_STR
|
||||||
"Redistribute IPv4 routes\n"
|
"Redistribute IPv4 routes\n"
|
||||||
|
PROTO_IP_REDIST_HELP
|
||||||
"Redistribute IPv6 routes\n"
|
"Redistribute IPv6 routes\n"
|
||||||
PROTO_REDIST_HELP)
|
PROTO_IP6_REDIST_HELP)
|
||||||
{
|
{
|
||||||
int idx_afi = 2;
|
int idx_afi = 2;
|
||||||
int idx_protocol = 3;
|
int idx_protocol = 3;
|
||||||
|
@ -46,7 +46,11 @@ static const bool fabricd = true;
|
|||||||
#define PROTO_NAME "openfabric"
|
#define PROTO_NAME "openfabric"
|
||||||
#define PROTO_HELP "OpenFabric routing protocol\n"
|
#define PROTO_HELP "OpenFabric routing protocol\n"
|
||||||
#define PROTO_REDIST_STR FRR_REDIST_STR_FABRICD
|
#define PROTO_REDIST_STR FRR_REDIST_STR_FABRICD
|
||||||
|
#define PROTO_IP_REDIST_STR FRR_IP_REDIST_STR_FABRICD
|
||||||
|
#define PROTO_IP6_REDIST_STR FRR_IP6_REDIST_STR_FABRICD
|
||||||
#define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_FABRICD
|
#define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_FABRICD
|
||||||
|
#define PROTO_IP_REDIST_HELP FRR_IP_REDIST_HELP_STR_FABRICD
|
||||||
|
#define PROTO_IP6_REDIST_HELP FRR_IP6_REDIST_HELP_STR_FABRICD
|
||||||
#define ROUTER_NODE OPENFABRIC_NODE
|
#define ROUTER_NODE OPENFABRIC_NODE
|
||||||
#else
|
#else
|
||||||
static const bool fabricd = false;
|
static const bool fabricd = false;
|
||||||
@ -54,7 +58,11 @@ static const bool fabricd = false;
|
|||||||
#define PROTO_NAME "isis"
|
#define PROTO_NAME "isis"
|
||||||
#define PROTO_HELP "IS-IS routing protocol\n"
|
#define PROTO_HELP "IS-IS routing protocol\n"
|
||||||
#define PROTO_REDIST_STR FRR_REDIST_STR_ISISD
|
#define PROTO_REDIST_STR FRR_REDIST_STR_ISISD
|
||||||
|
#define PROTO_IP_REDIST_STR FRR_IP_REDIST_STR_ISISD
|
||||||
|
#define PROTO_IP6_REDIST_STR FRR_IP6_REDIST_STR_ISISD
|
||||||
#define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_ISISD
|
#define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_ISISD
|
||||||
|
#define PROTO_IP_REDIST_HELP FRR_IP_REDIST_HELP_STR_ISISD
|
||||||
|
#define PROTO_IP6_REDIST_HELP FRR_IP6_REDIST_HELP_STR_ISISD
|
||||||
#define ROUTER_NODE ISIS_NODE
|
#define ROUTER_NODE ISIS_NODE
|
||||||
extern void isis_cli_init(void);
|
extern void isis_cli_init(void);
|
||||||
#endif
|
#endif
|
||||||
|
@ -435,6 +435,8 @@ if __name__ == "__main__":
|
|||||||
macros.load(os.path.join(basepath, "bgpd/bgp_vty.h"))
|
macros.load(os.path.join(basepath, "bgpd/bgp_vty.h"))
|
||||||
# sigh :(
|
# sigh :(
|
||||||
macros["PROTO_REDIST_STR"] = "FRR_REDIST_STR_ISISD"
|
macros["PROTO_REDIST_STR"] = "FRR_REDIST_STR_ISISD"
|
||||||
|
macros["PROTO_IP_REDIST_STR"] = "FRR_IP_REDIST_STR_ISISD"
|
||||||
|
macros["PROTO_IP6_REDIST_STR"] = "FRR_IP6_REDIST_STR_ISISD"
|
||||||
|
|
||||||
errors = process_file(args.cfile, ofd, dumpfd, args.all_defun, macros)
|
errors = process_file(args.cfile, ofd, dumpfd, args.all_defun, macros)
|
||||||
if errors != 0:
|
if errors != 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user