diff options
author | Steven <sluong@cisco.com> | 2018-03-27 15:04:47 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-03-28 13:40:27 +0000 |
commit | b3caf557300adc6208a7bb6b985a80ef118c5a9d (patch) | |
tree | a588ec74248f4a7a8ba4206409a3883f5a0c9019 /src | |
parent | e17bb715cf19de48748241f2dcfde919ac0ecffa (diff) |
bond: cli rename
rename "enslave interface <slave> to <BondEthernetx>" to
"bond add <BondEthernetx> <slave>
"detach interface <slave>" to
"bond del <slave>"
Change-Id: I1bf8f017517b1f8a823127c7efedd3766e45cd5b
Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/bonding/cli.c | 21 |
1 files 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 <interface> to <BondEthernetx> [passive] [long-timeout]", + .path = "bond add", + .short_help = "bond add <BondEthernetx> <slave-interface> " + "[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 <interface>", + .path = "bond del", + .short_help = "bond del <slave-interface>", .function = detach_interface_command_fn, }; /* *INDENT-ON* */ |