session: more rules unit tests and cli improvements

Change-Id: I7e5545297ab9f2db8d7d07e44c744bdb0a0874a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/application_namespace.c b/src/vnet/session/application_namespace.c
index 21c1cbc..8bd5b65 100644
--- a/src/vnet/session/application_namespace.c
+++ b/src/vnet/session/application_namespace.c
@@ -248,9 +248,8 @@
 format_app_namespace (u8 * s, va_list * args)
 {
   app_namespace_t *app_ns = va_arg (*args, app_namespace_t *);
-  s = format (s, "%-20v%-10u%-20lu%-20u", app_ns->ns_id,
-	      app_namespace_index (app_ns), app_ns->ns_secret,
-	      app_ns->sw_if_index);
+  s = format (s, "%-10u%-20lu%-20u%-50v", app_namespace_index (app_ns),
+	      app_ns->ns_secret, app_ns->sw_if_index, app_ns->ns_id);
   return s;
 }
 
@@ -303,8 +302,8 @@
     }
 
 do_ns_list:
-  vlib_cli_output (vm, "%-20s%-10s%-20s%-20s", "Namespace", "Index", "Secret",
-		   "sw_if_index");
+  vlib_cli_output (vm, "%-10s%-20s%-20s%-50s", "Index", "Secret",
+		   "sw_if_index", "Name");
 
   /* *INDENT-OFF* */
   pool_foreach (app_ns, app_namespace_pool, ({