bonding: print the name on the cli when created

Type: feature

Change-Id: Icd718c98ba2fa900cafaf1a59dfb100ee9914ec9
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vnet/bonding/cli.c b/src/vnet/bonding/cli.c
index ec779e2..9d3b942 100644
--- a/src/vnet/bonding/cli.c
+++ b/src/vnet/bonding/cli.c
@@ -422,6 +422,7 @@
 
   // for return
   args->sw_if_index = bif->sw_if_index;
+  args->rv = 0;
 }
 
 static clib_error_t *
@@ -439,6 +440,7 @@
   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_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;
 }