X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-ovsdb.py;h=b0e42a35dc764ea3d1ae8a28006e73b9eec21744;hb=ae490a5642978cd52b698583c62c3e7a52f6a92f;hp=df29fdb0503f5b2bff2900728e2d9ce9498e1e49;hpb=26bb0f31299d3f8eb06551d6a219846929c27149;p=openvswitch diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py index df29fdb0..b0e42a35 100644 --- a/tests/test-ovsdb.py +++ b/tests/test-ovsdb.py @@ -320,8 +320,9 @@ def idl_set(idl, commands, step): def do_idl(schema_file, remote, *commands): - schema = ovs.db.schema.DbSchema.from_json(ovs.json.from_file(schema_file)) - idl = ovs.db.idl.Idl(remote, schema) + schema_helper = ovs.db.idl.SchemaHelper(schema_file) + schema_helper.register_all() + idl = ovs.db.idl.Idl(remote, schema_helper) if commands: error, stream = ovs.stream.Stream.open_block( @@ -375,6 +376,11 @@ def do_idl(schema_file, remote, *commands): sys.stderr.write("jsonrpc transaction failed: %s" % os.strerror(error)) sys.exit(1) + elif reply.error is not None: + sys.stderr.write("jsonrpc transaction failed: %s" + % reply.error) + sys.exit(1) + sys.stdout.write("%03d: " % step) sys.stdout.flush() step += 1