#define PRINT_PATH_LONG "%w %i %d %D %p %t%T %s"
#define PRINT_PATH_INDENT " \\_ %i %d %D %t%T"
#define PRINT_PATH_CHECKER "%i %d %D %p %t%T %C"
-#define PRINT_MAP_FAILBACK "%n %d %F %Q %N %t"
-#define PRINT_MAP_STATS "%w %d %0 %1 %2 %3 %4"
+#define PRINT_MAP_STATUS "%n %F %Q %N %t"
+#define PRINT_MAP_STATS "%n %0 %1 %2 %3 %4"
+#define PRINT_MAP_NAMES "%n %d %w"
#define PRINT_PG_INDENT "\\_ %s [prio=%p]%t"
#define MAX_LINE_LEN 80
r += add_key(keys, "multipath", MAP, 1);
r += add_key(keys, "group", GROUP, 1);
r += add_key(keys, "reconfigure", RECONFIGURE, 0);
+ r += add_key(keys, "status", STATUS, 0);
r += add_key(keys, "stats", STATS, 0);
r += add_key(keys, "topology", TOPOLOGY, 0);
__MAP,
__GROUP,
__RECONFIGURE,
+ __STATUS,
__STATS,
__TOPOLOGY,
};
#define MAP (1 << __MAP)
#define GROUP (1 << __GROUP)
#define RECONFIGURE (1 << __RECONFIGURE)
+#define STATUS (1 << __STATUS)
#define STATS (1 << __STATS)
#define TOPOLOGY (1 << __TOPOLOGY)
condlog(3, "list maps (operator)");
- return show_maps(reply, len, vecs, PRINT_MAP_FAILBACK);
+ return show_maps(reply, len, vecs, PRINT_MAP_NAMES);
+}
+
+int
+cli_list_maps_status (void * v, char ** reply, int * len, void * data)
+{
+ struct vectors * vecs = (struct vectors *)data;
+
+ condlog(3, "list maps status (operator)");
+
+ return show_maps(reply, len, vecs, PRINT_MAP_STATUS);
}
int
{
struct vectors * vecs = (struct vectors *)data;
- condlog(3, "list maps (operator)");
+ condlog(3, "list maps stats (operator)");
return show_maps(reply, len, vecs, PRINT_MAP_STATS);
}
int cli_list_paths (void * v, char ** reply, int * len, void * data);
int cli_list_maps (void * v, char ** reply, int * len, void * data);
+int cli_list_maps_status (void * v, char ** reply, int * len, void * data);
int cli_list_maps_stats (void * v, char ** reply, int * len, void * data);
int cli_list_map_topology (void * v, char ** reply, int * len, void * data);
int cli_list_maps_topology (void * v, char ** reply, int * len, void * data);
add_handler(LIST+PATHS, cli_list_paths);
add_handler(LIST+MAPS, cli_list_maps);
+ add_handler(LIST+MAPS+STATUS, cli_list_maps_status);
add_handler(LIST+MAPS+STATS, cli_list_maps_stats);
add_handler(LIST+MAPS+TOPOLOGY, cli_list_maps_topology);
add_handler(LIST+MAP+TOPOLOGY, cli_list_map_topology);