build: archive make install-ext-deps build logs in ci
[vpp.git] / src / plugins / vrrp / vrrp_cli.c
index 447b474..fb52da4 100644 (file)
@@ -102,7 +102,7 @@ vrrp_vr_add_del_command_fn (vlib_main_t * vm,
   vr_conf.adv_interval = (u16) interval;
   vr_conf.vr_addrs = addrs;
 
-  rv = vrrp_vr_add_del (is_add, &vr_conf);
+  rv = vrrp_vr_add_del (is_add, &vr_conf, NULL);
 
   switch (rv)
     {
@@ -151,7 +151,6 @@ vrrp_vr_add_command_fn (vlib_main_t * vm, unformat_input_t * input,
   return vrrp_vr_add_del_command_fn (vm, input, cmd, 1 /* is_add */ );
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (vrrp_vr_add_command, static) =
 {
   .path = "vrrp vr add",
@@ -159,7 +158,6 @@ VLIB_CLI_COMMAND (vrrp_vr_add_command, static) =
   "vrrp vr add <interface> [vr_id <n>] [ipv6] [priority <value>] [interval <value>] [no_preempt] [accept_mode] [unicast] [<ip_addr> ...]",
   .function = vrrp_vr_add_command_fn,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 vrrp_vr_del_command_fn (vlib_main_t * vm, unformat_input_t * input,
@@ -168,14 +166,12 @@ vrrp_vr_del_command_fn (vlib_main_t * vm, unformat_input_t * input,
   return vrrp_vr_add_del_command_fn (vm, input, cmd, 0 /* is_add */ );
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (vrrp_vr_del_command, static) =
 {
   .path = "vrrp vr del",
   .short_help = "vrrp vr del <interface> [vr_id <n>] [ipv6]",
   .function = vrrp_vr_del_command_fn,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 vrrp_show_vr_command_fn (vlib_main_t * vm,
@@ -196,20 +192,18 @@ vrrp_show_vr_command_fn (vlib_main_t * vm,
        break;
     }
 
-  pool_foreach (vr, vmp->vrs, (
-                               {
+  pool_foreach (vr, vmp->vrs)
+  {
 
-                               if (sw_if_index && (sw_if_index != ~0) &&
-                                   (sw_if_index != vr->config.sw_if_index))
-                               continue;
-                               vlib_cli_output (vm, "%U", format_vrrp_vr,
-                                                vr);}
-               ));
+    if (sw_if_index && (sw_if_index != ~0) &&
+       (sw_if_index != vr->config.sw_if_index))
+      continue;
+    vlib_cli_output (vm, "%U", format_vrrp_vr, vr);
+  }
 
   return 0;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (vrrp_show_vr_command, static) =
 {
   .path = "show vrrp vr",
@@ -217,7 +211,6 @@ VLIB_CLI_COMMAND (vrrp_show_vr_command, static) =
   "show vrrp vr [(<intf_name>|sw_if_index <n>)]",
   .function = vrrp_show_vr_command_fn,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 vrrp_proto_start_stop_command_fn (vlib_main_t * vm,
@@ -243,6 +236,8 @@ vrrp_proto_start_stop_command_fn (vlib_main_t * vm,
       if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main,
                    &sw_if_index))
        ;
+      else if (unformat (input, "sw_if_index %u", &sw_if_index))
+       ;
       else if (unformat (input, "vr_id %u", &vr_id))
        ;
       else if (unformat (input, "ipv6"))
@@ -312,6 +307,8 @@ vrrp_peers_command_fn (vlib_main_t * vm, unformat_input_t * input,
       if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main,
                    &sw_if_index))
        ;
+      else if (unformat (input, "sw_if_index %u", &sw_if_index))
+       ;
       else if (unformat (input, "vr_id %u", &vr_id))
        ;
       else if (unformat (input, "ipv6"))
@@ -374,7 +371,6 @@ done:
   return ret;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (vrrp_proto_start_stop_command, static) =
 {
   .path = "vrrp proto",
@@ -382,9 +378,7 @@ VLIB_CLI_COMMAND (vrrp_proto_start_stop_command, static) =
   "vrrp proto (start|stop) (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6]",
   .function = vrrp_proto_start_stop_command_fn,
 };
-/* *INDENT-ON* */
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (vrrp_peers_command, static) =
 {
   .path = "vrrp peers",
@@ -392,7 +386,6 @@ VLIB_CLI_COMMAND (vrrp_peers_command, static) =
   "vrrp peers (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6] <peer1_addr> [<peer2_addr> ...]",
   .function = vrrp_peers_command_fn,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 vrrp_vr_track_if_command_fn (vlib_main_t * vm,
@@ -419,6 +412,8 @@ vrrp_vr_track_if_command_fn (vlib_main_t * vm,
       if (unformat (input, "%U", unformat_vnet_sw_interface, vmp->vnet_main,
                    &sw_if_index))
        ;
+      else if (unformat (input, "sw_if_index %u", &sw_if_index))
+       ;
       else if (unformat (input, "add"))
        is_add = 1;
       else if (unformat (input, "del"))
@@ -488,7 +483,6 @@ done:
   return ret;
 }
 
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (vrrp_vr_track_if_command, static) =
 {
   .path = "vrrp vr track-if",
@@ -496,7 +490,6 @@ VLIB_CLI_COMMAND (vrrp_vr_track_if_command, static) =
   "vrrp vr track-if (add|del) (<intf_name>|sw_if_index <n>) vr_id <n> [ipv6] track-index <n> priority <n> [ track-index <n> priority <n> ...]",
   .function = vrrp_vr_track_if_command_fn,
 };
-/* *INDENT-ON* */
 
 /*
  * fd.io coding-style-patch-verification: ON