X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fovsdb-idl.c;h=e1b53f4eb3730de0aaf3ec3f1153722d20847d17;hb=9bc9a30b991f628bade1e7ddea60eded6dcdadb7;hp=911d7b8860ebefc0bb0e2c70fe2eac67a17d9c29;hpb=565556847b764ae3ebdebab3ee2cf3d8f44667a2;p=sliver-openvswitch.git diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 911d7b886..e1b53f4eb 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1397,12 +1397,16 @@ ovsdb_idl_txn_commit(struct ovsdb_idl_txn *txn) if (row->old == row->new) { continue; } else if (!row->new) { - struct json *op = json_object_create(); - json_object_put_string(op, "op", "delete"); - json_object_put_string(op, "table", class->name); - json_object_put(op, "where", where_uuid_equals(&row->uuid)); - json_array_add(operations, op); - any_updates = true; + if (class->is_root) { + struct json *op = json_object_create(); + json_object_put_string(op, "op", "delete"); + json_object_put_string(op, "table", class->name); + json_object_put(op, "where", where_uuid_equals(&row->uuid)); + json_array_add(operations, op); + any_updates = true; + } else { + /* Let ovsdb-server decide whether to really delete it. */ + } } else { struct json *row_json; struct json *op;