ovsdb-client: Make "list-dbs" print the list of databases in sorted order.
authorBen Pfaff <blp@nicira.com>
Thu, 6 Sep 2012 18:11:45 +0000 (11:11 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 21 Sep 2012 16:50:12 +0000 (09:50 -0700)
This makes the command's behavior more predictable when there is more than
one database.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ovsdb/ovsdb-client.c

index 12f34d5..d5d2189 100644 (file)
@@ -405,6 +405,7 @@ do_list_dbs(struct jsonrpc *rpc, const char *database OVS_UNUSED,
 
     svec_init(&dbs);
     fetch_dbs(rpc, &dbs);
+    svec_sort(&dbs);
     SVEC_FOR_EACH (i, db_name, &dbs) {
         puts(db_name);
     }