-static struct ovsdb_error *
-ovsdb_execute_declare(struct ovsdb_execution *x, struct ovsdb_parser *parser,
- struct json *result)
-{
- const struct json *uuid_name;
- struct uuid uuid;
-
- uuid_name = ovsdb_parser_member(parser, "uuid-name", OP_ID);
- if (!uuid_name) {
- return NULL;
- }
-
- if (ovsdb_symbol_table_get(x->symtab, json_string(uuid_name))) {
- return ovsdb_syntax_error(uuid_name, "duplicate uuid-name",
- "This \"uuid-name\" appeared on an "
- "earlier \"declare\" or \"insert\" "
- "operation.");
- }
-
- uuid_generate(&uuid);
- ovsdb_symbol_table_put(x->symtab, json_string(uuid_name), &uuid, false);
- json_object_put(result, "uuid",
- json_array_create_2(
- json_string_create("uuid"),
- json_string_create_nocopy(
- xasprintf(UUID_FMT, UUID_ARGS(&uuid)))));
- return NULL;
-}
-