diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2019-07-01 11:08:20 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-07-24 12:03:43 +0000 |
commit | 8c1280fd9ade67ecfca35c545fbdcb49d5d4325e (patch) | |
tree | 0e02171ab684cfae02e16ae27a2b50a2ad926491 | |
parent | c5d5327ac59a212ecbdbbcf57e648becd02a702d (diff) |
bonding: print the name on the cli when created
Type: feature
Change-Id: Icd718c98ba2fa900cafaf1a59dfb100ee9914ec9
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
-rw-r--r-- | src/vnet/bonding/cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c index ec779e263a8..9d3b9429ba7 100644 --- a/src/vnet/bonding/cli.c +++ b/src/vnet/bonding/cli.c @@ -422,6 +422,7 @@ bond_create_if (vlib_main_t * vm, bond_create_if_args_t * args) // for return args->sw_if_index = bif->sw_if_index; + args->rv = 0; } static clib_error_t * @@ -439,6 +440,7 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input, args.id = ~0; args.mode = -1; args.lb = BOND_LB_L2; + args.rv = -1; while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { if (unformat (line_input, "mode %U", unformat_bond_mode, &args.mode)) @@ -471,6 +473,10 @@ bond_create_command_fn (vlib_main_t * vm, unformat_input_t * input, bond_create_if (vm, &args); + if (!args.rv) + vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name, + vnet_get_main (), args.sw_if_index); + return args.error; } |