Long ago, a <monitor-requests> object in the OVSDB protocol mapped a table name to a single <monitor-request>. Since then, it has mapped a table name to an *array of* <monitor-request> objects, but the OVSDB IDL has never been updated to use the modern form. This commit makes that change.
Reported-by: Anil Jangam <[email protected]> Signed-off-by: Ben Pfaff <[email protected]> --- AUTHORS.rst | 1 + lib/ovsdb-idl.c | 3 ++- python/ovs/db/idl.py | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index f6bf68c91bc0..dc69ba3f3c1f 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -393,6 +393,7 @@ André Ruß [email protected] Andreas Beckmann [email protected] Andrei Andone [email protected] Andrey Korolyov [email protected] +Anil Jangam [email protected] Anshuman Manral [email protected] Anton Matsiuk [email protected] Anup Khadka [email protected] diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index b027f8cad35d..642ce66f9e0f 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1600,7 +1600,8 @@ ovsdb_idl_send_monitor_request__(struct ovsdb_idl *idl, json_object_put(monitor_request, "where", where); table->cond_changed = false; } - json_object_put(monitor_requests, tc->name, monitor_request); + json_object_put(monitor_requests, tc->name, + json_array_create_1(monitor_request)); } } free_schema(schema); diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index 5a4d129c0e13..ddc9cb517352 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -425,10 +425,11 @@ class Idl(object): (table.name in self.readonly) and (column not in self.readonly[table.name])): columns.append(column) - monitor_requests[table.name] = {"columns": columns} + monitor_request = {"columns": columns} if method == "monitor_cond" and table.condition != [True]: - monitor_requests[table.name]["where"] = table.condition + monitor_request["where"] = table.condition table.cond_change = False + monitor_requests[table.name] = [monitor_request] msg = ovs.jsonrpc.Message.create_request( method, [self._db.name, str(self.uuid), monitor_requests]) -- 2.16.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
