diff options
Diffstat (limited to 'ovsdb/row.c')
-rw-r--r-- | ovsdb/row.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ovsdb/row.c b/ovsdb/row.c index 40f53b0a5..f93fe2306 100644 --- a/ovsdb/row.c +++ b/ovsdb/row.c @@ -343,6 +343,23 @@ ovsdb_row_to_json(const struct ovsdb_row *row, } return json; } + +void +ovsdb_row_to_string(const struct ovsdb_row *row, struct ds *out) +{ + struct shash_node *node; + + SHASH_FOR_EACH (node, &row->table->schema->columns) { + const struct ovsdb_column *column = node->data; + + ds_put_format(out, "%s:", column->name); + ovsdb_datum_to_string(&row->fields[column->index], &column->type, out); + ds_put_char(out, ','); + } + if (shash_count(&row->table->schema->columns)) { + ds_chomp(out, ','); + } +} void ovsdb_row_set_init(struct ovsdb_row_set *set) |