}
continue;
}
+ } else if (ovsdb_type_is_map(&column->type) &&
+ column->type.value.type == OVSDB_TYPE_UUID &&
+ column->type.value.u.uuid.refTableName) {
+ struct cmd_show_table *ref_show;
+ size_t j;
+
+ /* Prints the key to ref'ed table name map if the ref'ed table
+ * is also defined in 'cmd_show_tables'. */
+ ref_show = cmd_show_find_table_by_name(
+ column->type.value.u.uuid.refTableName);
+ if (ref_show && ref_show->name_column) {
+ ds_put_char_multiple(&ctx->output, ' ', (level + 1) * 4);
+ ds_put_format(&ctx->output, "%s:\n", column->name);
+ 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->values[j].uuid);
+
+ ds_put_char_multiple(&ctx->output, ' ', (level + 2) * 4);
+ ovsdb_atom_to_string(&datum->keys[j], column->type.key.type,
+ &ctx->output);
+ ds_put_char(&ctx->output, '=');
+ if (ref_row) {
+ const struct ovsdb_datum *ref_datum;
+
+ ref_datum = ovsdb_idl_read(ref_row,
+ ref_show->name_column);
+ ovsdb_datum_to_string(ref_datum,
+ &ref_show->name_column->type,
+ &ctx->output);
+ } else {
+ ds_put_cstr(&ctx->output, "\"<null>\"");
+ }
+ ds_put_char(&ctx->output, '\n');
+ }
+ continue;
+ }
}
if (!ovsdb_datum_is_default(datum, &column->type)) {
[add-port a a1],
[add-ls ls1],
[bind-ls a a1 100 ls1],
- [set Physical_Switch a tunnel_ips=[[1.2.3.4]]])], [0], [ignore], [], [VTEP_CTL_CLEANUP])
+ [set Physical_Switch a management_ips=[[4.3.2.1]] tunnel_ips=[[1.2.3.4]]])], [0], [ignore], [], [VTEP_CTL_CLEANUP])
AT_CHECK([vtep-ctl --timeout=5 -vreconnect:emer --db=unix:socket show | tail -n+2 | sed 's/=[[a-f0-9-]][[a-f0-9-]]*\}/=<ls>\}/' ], [0], [dnl
Manager "tcp:4.5.6.7"
Physical_Switch a
+ management_ips: [["4.3.2.1"]]
tunnel_ips: [["1.2.3.4"]]
Physical_Port "a1"
- vlan_bindings: {100=<ls>}
+ vlan_bindings:
+ 100="ls1"
], [], [VTEP_CTL_CLEANUP])
VTEP_CTL_CLEANUP
{&vteprec_table_physical_switch,
&vteprec_physical_switch_col_name,
- {&vteprec_physical_switch_col_tunnel_ips,
- &vteprec_physical_switch_col_ports,
- NULL},
+ {&vteprec_physical_switch_col_management_ips,
+ &vteprec_physical_switch_col_tunnel_ips,
+ &vteprec_physical_switch_col_ports},
false},
{&vteprec_table_physical_port,
NULL},
false},
+ {&vteprec_table_logical_switch,
+ &vteprec_logical_switch_col_name,
+ {NULL,
+ NULL,
+ NULL},
+ false},
+
{NULL, NULL, {NULL, NULL, NULL}, false}
};