diff --git a/src/vnet/lisp-cp/lisp_cli.c b/src/vnet/lisp-cp/lisp_cli.c
index 5cd1834..31b2ca8 100644
--- a/src/vnet/lisp-cp/lisp_cli.c
+++ b/src/vnet/lisp-cp/lisp_cli.c
@@ -418,14 +418,16 @@
   return error;
 }
 
-VLIB_CLI_COMMAND (lisp_add_del_remote_mapping_command) =
-{
-.path = "lisp remote-mapping",.short_help =
-    "lisp remote-mapping add|del [del-all] vni <vni> "
-    "eid <est-eid> [action <no-action|natively-forward|"
-    "send-map-request|drop>] rloc <dst-locator> p <prio> w <weight> "
-    "[rloc <dst-locator> ... ]",.function =
-    lisp_add_del_remote_mapping_command_fn,};
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (lisp_add_del_remote_mapping_command) = {
+    .path = "lisp remote-mapping",
+    .short_help = "lisp remote-mapping add|del [del-all] vni <vni> "
+		  "eid <est-eid> [action <no-action|natively-forward|"
+		  "send-map-request|drop>] rloc <dst-locator> p <prio> "
+		  "w <weight> [rloc <dst-locator> ... ]",
+    .function = lisp_add_del_remote_mapping_command_fn,
+};
+/* *INDENT-ON* */
 
 /**
  * Handler for add/del adjacency CLI.
@@ -892,54 +894,44 @@
 
 
 static clib_error_t *
-lisp_enable_disable_command_fn (vlib_main_t * vm, unformat_input_t * input,
-				vlib_cli_command_t * cmd)
+lisp_enable_command_fn (vlib_main_t * vm, unformat_input_t * input,
+			vlib_cli_command_t * cmd)
 {
-  unformat_input_t _line_input, *line_input = &_line_input;
-  u8 is_enabled = 0;
-  u8 is_set = 0;
-  clib_error_t *error = NULL;
+  if (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    return clib_error_return (0, "parse error: '%U'", format_unformat_error,
+			      input);
 
-  /* Get a line of input. */
-  if (!unformat_user (input, unformat_line_input, line_input))
-    return clib_error_return (0, "expected enable | disable");
+  vnet_lisp_enable_disable (1);
 
-  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (line_input, "enable"))
-	{
-	  is_set = 1;
-	  is_enabled = 1;
-	}
-      else if (unformat (line_input, "disable"))
-	is_set = 1;
-      else
-	{
-	  error = clib_error_return (0, "parse error: '%U'",
-				     format_unformat_error, line_input);
-	  goto done;
-	}
-    }
-
-  if (!is_set)
-    {
-      error = clib_error_return (0, "state not set");
-      goto done;
-    }
-
-  vnet_lisp_enable_disable (is_enabled);
-
-done:
-  unformat_free (line_input);
-
-  return error;
+  return 0;
 }
 
 /* *INDENT-OFF* */
-VLIB_CLI_COMMAND (lisp_cp_enable_disable_command) = {
-    .path = "lisp",
-    .short_help = "lisp [enable|disable]",
-    .function = lisp_enable_disable_command_fn,
+VLIB_CLI_COMMAND (lisp_cp_enable_command) = {
+    .path = "lisp enable",
+    .short_help = "lisp enable",
+    .function = lisp_enable_command_fn,
+};
+/* *INDENT-ON* */
+
+static clib_error_t *
+lisp_disable_command_fn (vlib_main_t * vm, unformat_input_t * input,
+			 vlib_cli_command_t * cmd)
+{
+  if (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    return clib_error_return (0, "parse error: '%U'", format_unformat_error,
+			      input);
+
+  vnet_lisp_enable_disable (0);
+
+  return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (lisp_cp_disable_command) = {
+    .path = "lisp disable",
+    .short_help = "lisp disable",
+    .function = lisp_disable_command_fn,
 };
 /* *INDENT-ON* */
 
@@ -1163,7 +1155,7 @@
 
   /* Get a line of input. */
   if (!unformat_user (input, unformat_line_input, line_input))
-    return 0;
+    return clib_error_return (0, "missing parameters");
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
diff --git a/src/vnet/lisp-cp/one_cli.c b/src/vnet/lisp-cp/one_cli.c
index d5a0ee0..e44632f 100644
--- a/src/vnet/lisp-cp/one_cli.c
+++ b/src/vnet/lisp-cp/one_cli.c
@@ -1369,54 +1369,44 @@
 /* *INDENT-ON* */
 
 static clib_error_t *
-lisp_enable_disable_command_fn (vlib_main_t * vm, unformat_input_t * input,
-				vlib_cli_command_t * cmd)
+one_enable_command_fn (vlib_main_t * vm, unformat_input_t * input,
+		       vlib_cli_command_t * cmd)
 {
-  unformat_input_t _line_input, *line_input = &_line_input;
-  u8 is_enabled = 0;
-  u8 is_set = 0;
-  clib_error_t *error = NULL;
+  if (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    return clib_error_return (0, "parse error: '%U'", format_unformat_error,
+			      input);
 
-  /* Get a line of input. */
-  if (!unformat_user (input, unformat_line_input, line_input))
-    return clib_error_return (0, "expected enable | disable");
+  vnet_lisp_enable_disable (1);
 
-  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (line_input, "enable"))
-	{
-	  is_set = 1;
-	  is_enabled = 1;
-	}
-      else if (unformat (line_input, "disable"))
-	is_set = 1;
-      else
-	{
-	  error = clib_error_return (0, "parse error: '%U'",
-				     format_unformat_error, line_input);
-	  goto done;
-	}
-    }
-
-  if (!is_set)
-    {
-      error = clib_error_return (0, "state not set");
-      goto done;
-    }
-
-  vnet_lisp_enable_disable (is_enabled);
-
-done:
-  unformat_free (line_input);
-
-  return error;
+  return 0;
 }
 
 /* *INDENT-OFF* */
-VLIB_CLI_COMMAND (one_cp_enable_disable_command) = {
-    .path = "one",
-    .short_help = "one [enable|disable]",
-    .function = lisp_enable_disable_command_fn,
+VLIB_CLI_COMMAND (one_cp_enable_command) = {
+    .path = "one enable",
+    .short_help = "one enable",
+    .function = one_enable_command_fn,
+};
+/* *INDENT-ON* */
+
+static clib_error_t *
+one_disable_command_fn (vlib_main_t * vm, unformat_input_t * input,
+			vlib_cli_command_t * cmd)
+{
+  if (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    return clib_error_return (0, "parse error: '%U'", format_unformat_error,
+			      input);
+
+  vnet_lisp_enable_disable (0);
+
+  return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (one_cp_disable_command) = {
+    .path = "one disable",
+    .short_help = "one disable",
+    .function = one_disable_command_fn,
 };
 /* *INDENT-ON* */
 
