Adjusted docstring and variable names according to previous code changes; Fixed grammar "a attribute" > "an attribute".
Fixes: bf42f674 (idl: Convert python daemons to utilize SchemaHelper) Signed-off-by: Toms Atteka <[email protected]> --- python/ovs/db/idl.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py index 26421f2..64eb1a8 100644 --- a/python/ovs/db/idl.py +++ b/python/ovs/db/idl.py @@ -95,20 +95,21 @@ class Idl(object): IDL_S_MONITOR_REQUESTED = 1 IDL_S_MONITOR_COND_REQUESTED = 2 - def __init__(self, remote, schema, probe_interval=None): + def __init__(self, remote, schema_helper, probe_interval=None): """Creates and returns a connection to the database named 'db_name' on 'remote', which should be in a form acceptable to ovs.jsonrpc.session.open(). The connection will maintain an in-memory replica of the remote database. - 'schema' should be the schema for the remote database. The caller may - have cut it down by removing tables or columns that are not of - interest. The IDL will only replicate the tables and columns that - remain. The caller may also add a attribute named 'alert' to selected - remaining columns, setting its value to False; if so, then changes to - those columns will not be considered changes to the database for the - purpose of the return value of Idl.run() and Idl.change_seqno. This is - useful for columns that the IDL's client will write but not read. + 'schema_helper' should be an instance of the SchemaHelper class which + generates schema for the remote database. The caller may have cut it + down by removing tables or columns that are not of interest. The IDL + will only replicate the tables and columns that remain. The caller may + also add an attribute named 'alert' to selected remaining columns, + setting its value to False; if so, then changes to those columns will + not be considered changes to the database for the purpose of the return + value of Idl.run() and Idl.change_seqno. This is useful for columns + that the IDL's client will write but not read. As a convenience to users, 'schema' may also be an instance of the SchemaHelper class. @@ -120,8 +121,8 @@ class Idl(object): milliseconds. If None it will just use the default value in OVS. """ - assert isinstance(schema, SchemaHelper) - schema = schema.get_idl_schema() + assert isinstance(schema_helper, SchemaHelper) + schema = schema_helper.get_idl_schema() self.tables = schema.tables self.readonly = schema.readonly -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
