From b3caf557300adc6208a7bb6b985a80ef118c5a9d Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 27 Mar 2018 15:04:47 -0700 Subject: bond: cli rename rename "enslave interface to " to "bond add "detach interface " to "bond del " Change-Id: I1bf8f017517b1f8a823127c7efedd3766e45cd5b Signed-off-by: Steven --- src/vnet/bonding/cli.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c index 7919b5765ef..901032e7c4c 100644 --- a/src/vnet/bonding/cli.c +++ b/src/vnet/bonding/cli.c @@ -505,12 +505,10 @@ enslave_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, args.group = ~0; while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { - if (unformat (line_input, "interface %U", + if (unformat (line_input, "%U %U", + unformat_vnet_sw_interface, vnm, &args.group, unformat_vnet_sw_interface, vnm, &args.slave)) ; - else if (unformat (line_input, "to %U", unformat_vnet_sw_interface, vnm, - &args.group)) - ; else if (unformat (line_input, "passive")) args.is_passive = 1; else if (unformat (line_input, "long-timeout")) @@ -529,7 +527,7 @@ enslave_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, if (args.group == ~0) return clib_error_return (0, "Missing bond interface"); if (args.slave == ~0) - return clib_error_return (0, "please specify valid interface name"); + return clib_error_return (0, "please specify valid slave interface name"); bond_enslave (vm, &args); @@ -538,8 +536,9 @@ enslave_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (enslave_interface_command, static) = { - .path = "enslave", - .short_help = "enslave interface to [passive] [long-timeout]", + .path = "bond add", + .short_help = "bond add " + "[passive] [long-timeout]", .function = enslave_interface_command_fn, }; /* *INDENT-ON* */ @@ -576,7 +575,7 @@ detach_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, args.slave = ~0; while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { - if (unformat (line_input, "interface %U", + if (unformat (line_input, "%U", unformat_vnet_sw_interface, vnm, &args.slave)) ; else @@ -591,7 +590,7 @@ detach_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, if (args.error) return args.error; if (args.slave == ~0) - return clib_error_return (0, "please specify valid interface name"); + return clib_error_return (0, "please specify valid slave interface name"); bond_detach_slave (vm, &args); @@ -600,8 +599,8 @@ detach_interface_command_fn (vlib_main_t * vm, unformat_input_t * input, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (detach_interface_command, static) = { - .path = "detach", - .short_help = "detach interface ", + .path = "bond del", + .short_help = "bond del ", .function = detach_interface_command_fn, }; /* *INDENT-ON* */ -- cgit 1.2.3-korg