+ struct cmd_show_table *show = cmd_show_find_table_by_row(row);
+ size_t i;
+
+ ds_put_char_multiple(&ctx->output, ' ', level * 4);
+ if (show && show->name_column) {
+ const struct ovsdb_datum *datum;
+
+ ds_put_format(&ctx->output, "%s ", show->table->name);
+ datum = ovsdb_idl_read(row, show->name_column);
+ ovsdb_datum_to_string(datum, &show->name_column->type, &ctx->output);
+ } else {
+ ds_put_format(&ctx->output, UUID_FMT, UUID_ARGS(&row->uuid));
+ }
+ ds_put_char(&ctx->output, '\n');
+
+ if (!show || show->recurse) {
+ return;
+ }
+
+ show->recurse = true;
+ for (i = 0; i < ARRAY_SIZE(show->columns); i++) {
+ const struct ovsdb_idl_column *column = show->columns[i];
+ const struct ovsdb_datum *datum;
+
+ if (!column) {
+ break;
+ }
+
+ datum = ovsdb_idl_read(row, column);
+ if (column->type.key.type == OVSDB_TYPE_UUID &&
+ column->type.key.u.uuid.refTableName) {
+ struct cmd_show_table *ref_show;
+ size_t j;
+
+ ref_show = cmd_show_find_table_by_name(
+ column->type.key.u.uuid.refTableName);
+ if (ref_show) {
+ for (j = 0; j < datum->n; j++) {
+ const struct ovsdb_idl_row *ref_row;
+
+ ref_row = ovsdb_idl_get_row_for_uuid(ctx->idl,
+ ref_show->table,
+ &datum->keys[j].uuid);
+ if (ref_row) {
+ cmd_show_row(ctx, ref_row, level + 1);
+ }
+ }
+ continue;
+ }
+ }
+
+ if (!ovsdb_datum_is_default(datum, &column->type)) {
+ ds_put_char_multiple(&ctx->output, ' ', (level + 1) * 4);
+ ds_put_format(&ctx->output, "%s: ", column->name);
+ ovsdb_datum_to_string(datum, &column->type, &ctx->output);
+ ds_put_char(&ctx->output, '\n');
+ }
+ }
+ show->recurse = false;
+}
+
+static void
+cmd_show(struct vsctl_context *ctx)
+{
+ const struct ovsdb_idl_row *row;
+
+ for (row = ovsdb_idl_first_row(ctx->idl, cmd_show_tables[0].table);
+ row; row = ovsdb_idl_next_row(row)) {
+ cmd_show_row(ctx, row, 0);
+ }
+}
+
+static void
+pre_cmd_emer_reset(struct vsctl_context *ctx)
+{
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_manager_options);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_open_vswitch_col_ssl);
+
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_controller);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_fail_mode);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_mirrors);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_netflow);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_sflow);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_flood_vlans);
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_bridge_col_other_config);
+
+ ovsdb_idl_add_column(ctx->idl, &ovsrec_port_col_other_config);
+
+ ovsdb_idl_add_column(ctx->idl,
+ &ovsrec_interface_col_ingress_policing_rate);
+ ovsdb_idl_add_column(ctx->idl,
+ &ovsrec_interface_col_ingress_policing_burst);