Re: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-06-07 Thread Ilya Maximets
On 6/6/24 20:55, Terry Wilson wrote:
> On Thu, Jun 6, 2024 at 10:41 AM Dumitru Ceara  wrote:
>>
>> On 5/27/24 23:39, Ilya Maximets wrote:
>>> When a row is modified, python IDL doesn't perform any operations on
>>> existing client-side indexes.  This means that if the column on which
>>> index is created changes, the old value will remain in the index and
>>> the new one will not be added to the index.  Beside lookup failures
>>> this is also causing inability to remove modified rows, because the
>>> new column value doesn't exist in the index causing an exception on
>>> attempt to remove it:
>>>
>>>  Traceback (most recent call last):
>>>File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
>>>  self.idl.run()
>>>File "ovs/db/idl.py", line 465, in run
>>>  self.__parse_update(msg.params[2], OVSDB_UPDATE3)
>>>File "ovs/db/idl.py", line 924, in __parse_update
>>>  self.__do_parse_update(update, version, self.tables)
>>>File "ovs/db/idl.py", line 964, in __do_parse_update
>>>  changes = self.__process_update2(table, uuid, row_update)
>>>File "ovs/db/idl.py", line 991, in __process_update2
>>>  del table.rows[uuid]
>>>File "ovs/db/custom_index.py", line 102, in __delitem__
>>>  index.remove(val)
>>>File "ovs/db/custom_index.py", line 66, in remove
>>>  self.values.remove(self.index_entry_from_row(row))
>>>File "sortedcontainers/sortedlist.py", line 2015, in remove
>>>  raise ValueError('{0!r} not in list'.format(value))
>>>  ValueError: Datapath_Binding(
>>>uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
>>>tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
>>>
>>> Fix that by always removing an existing row from indexes before
>>> modification and adding back afterwards.  This ensures that old
>>> values are removed from the index and new ones are added.
>>>
>>> This behavior is consistent with the C implementation.
>>>
>>> The new test that reproduces the removal issue is added.  Some extra
>>> testing infrastructure added to be able to handle and print out the
>>> 'indexed' table from the idltest schema.
>>>
>>> Fixes: 13973bc41524 ("Add multi-column index support for the Python IDL")
>>> Reported-at: 
>>> https://mail.openvswitch.org/pipermail/ovs-discuss/2024-May/053159.html
>>> Reported-by: Roberto Bartzen Acosta 
>>> Signed-off-by: Ilya Maximets 
>>> ---
>>
>> Looks good to me:
>>
>> Acked-by: Dumitru Ceara 
>>
>> Regards,
>> Dumitru
>>
> 
> Looks good to me. I don't like that my code for IndexedRows strongly
> implies that it behaves exactly like a dict, and in this case it
> doesn't. Maybe some comments explaining why a delete has to be done
> for posterity would be helpful.
> 
> Acked-by: Terry Wilson 
> 

Thanks, Terry, Mike and Dumitru for reviews and Roberto and Vladislav
for testing!

I think, we can try to make the interfaces better, this ties a little
with the persistent uuid discussion.  But for now, applied this fix
and backported down to 2.17.

Best regards, Ilya Maximets.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-06-06 Thread Terry Wilson
On Thu, Jun 6, 2024 at 10:41 AM Dumitru Ceara  wrote:
>
> On 5/27/24 23:39, Ilya Maximets wrote:
> > When a row is modified, python IDL doesn't perform any operations on
> > existing client-side indexes.  This means that if the column on which
> > index is created changes, the old value will remain in the index and
> > the new one will not be added to the index.  Beside lookup failures
> > this is also causing inability to remove modified rows, because the
> > new column value doesn't exist in the index causing an exception on
> > attempt to remove it:
> >
> >  Traceback (most recent call last):
> >File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
> >  self.idl.run()
> >File "ovs/db/idl.py", line 465, in run
> >  self.__parse_update(msg.params[2], OVSDB_UPDATE3)
> >File "ovs/db/idl.py", line 924, in __parse_update
> >  self.__do_parse_update(update, version, self.tables)
> >File "ovs/db/idl.py", line 964, in __do_parse_update
> >  changes = self.__process_update2(table, uuid, row_update)
> >File "ovs/db/idl.py", line 991, in __process_update2
> >  del table.rows[uuid]
> >File "ovs/db/custom_index.py", line 102, in __delitem__
> >  index.remove(val)
> >File "ovs/db/custom_index.py", line 66, in remove
> >  self.values.remove(self.index_entry_from_row(row))
> >File "sortedcontainers/sortedlist.py", line 2015, in remove
> >  raise ValueError('{0!r} not in list'.format(value))
> >  ValueError: Datapath_Binding(
> >uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
> >tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
> >
> > Fix that by always removing an existing row from indexes before
> > modification and adding back afterwards.  This ensures that old
> > values are removed from the index and new ones are added.
> >
> > This behavior is consistent with the C implementation.
> >
> > The new test that reproduces the removal issue is added.  Some extra
> > testing infrastructure added to be able to handle and print out the
> > 'indexed' table from the idltest schema.
> >
> > Fixes: 13973bc41524 ("Add multi-column index support for the Python IDL")
> > Reported-at: 
> > https://mail.openvswitch.org/pipermail/ovs-discuss/2024-May/053159.html
> > Reported-by: Roberto Bartzen Acosta 
> > Signed-off-by: Ilya Maximets 
> > ---
>
> Looks good to me:
>
> Acked-by: Dumitru Ceara 
>
> Regards,
> Dumitru
>

Looks good to me. I don't like that my code for IndexedRows strongly
implies that it behaves exactly like a dict, and in this case it
doesn't. Maybe some comments explaining why a delete has to be done
for posterity would be helpful.

Acked-by: Terry Wilson 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-06-06 Thread Dumitru Ceara
On 5/27/24 23:39, Ilya Maximets wrote:
> When a row is modified, python IDL doesn't perform any operations on
> existing client-side indexes.  This means that if the column on which
> index is created changes, the old value will remain in the index and
> the new one will not be added to the index.  Beside lookup failures
> this is also causing inability to remove modified rows, because the
> new column value doesn't exist in the index causing an exception on
> attempt to remove it:
> 
>  Traceback (most recent call last):
>File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
>  self.idl.run()
>File "ovs/db/idl.py", line 465, in run
>  self.__parse_update(msg.params[2], OVSDB_UPDATE3)
>File "ovs/db/idl.py", line 924, in __parse_update
>  self.__do_parse_update(update, version, self.tables)
>File "ovs/db/idl.py", line 964, in __do_parse_update
>  changes = self.__process_update2(table, uuid, row_update)
>File "ovs/db/idl.py", line 991, in __process_update2
>  del table.rows[uuid]
>File "ovs/db/custom_index.py", line 102, in __delitem__
>  index.remove(val)
>File "ovs/db/custom_index.py", line 66, in remove
>  self.values.remove(self.index_entry_from_row(row))
>File "sortedcontainers/sortedlist.py", line 2015, in remove
>  raise ValueError('{0!r} not in list'.format(value))
>  ValueError: Datapath_Binding(
>uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
>tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
> 
> Fix that by always removing an existing row from indexes before
> modification and adding back afterwards.  This ensures that old
> values are removed from the index and new ones are added.
> 
> This behavior is consistent with the C implementation.
> 
> The new test that reproduces the removal issue is added.  Some extra
> testing infrastructure added to be able to handle and print out the
> 'indexed' table from the idltest schema.
> 
> Fixes: 13973bc41524 ("Add multi-column index support for the Python IDL")
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-discuss/2024-May/053159.html
> Reported-by: Roberto Bartzen Acosta 
> Signed-off-by: Ilya Maximets 
> ---

Looks good to me:

Acked-by: Dumitru Ceara 

Regards,
Dumitru

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-06-05 Thread Mike Pattrick
On Mon, May 27, 2024 at 5:39 PM Ilya Maximets  wrote:
>
> When a row is modified, python IDL doesn't perform any operations on
> existing client-side indexes.  This means that if the column on which
> index is created changes, the old value will remain in the index and
> the new one will not be added to the index.  Beside lookup failures
> this is also causing inability to remove modified rows, because the
> new column value doesn't exist in the index causing an exception on
> attempt to remove it:
>
>  Traceback (most recent call last):
>File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
>  self.idl.run()
>File "ovs/db/idl.py", line 465, in run
>  self.__parse_update(msg.params[2], OVSDB_UPDATE3)
>File "ovs/db/idl.py", line 924, in __parse_update
>  self.__do_parse_update(update, version, self.tables)
>File "ovs/db/idl.py", line 964, in __do_parse_update
>  changes = self.__process_update2(table, uuid, row_update)
>File "ovs/db/idl.py", line 991, in __process_update2
>  del table.rows[uuid]
>File "ovs/db/custom_index.py", line 102, in __delitem__
>  index.remove(val)
>File "ovs/db/custom_index.py", line 66, in remove
>  self.values.remove(self.index_entry_from_row(row))
>File "sortedcontainers/sortedlist.py", line 2015, in remove
>  raise ValueError('{0!r} not in list'.format(value))
>  ValueError: Datapath_Binding(
>uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
>tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
>
> Fix that by always removing an existing row from indexes before
> modification and adding back afterwards.  This ensures that old
> values are removed from the index and new ones are added.
>
> This behavior is consistent with the C implementation.
>
> The new test that reproduces the removal issue is added.  Some extra
> testing infrastructure added to be able to handle and print out the
> 'indexed' table from the idltest schema.
>
> Fixes: 13973bc41524 ("Add multi-column index support for the Python IDL")
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-discuss/2024-May/053159.html
> Reported-by: Roberto Bartzen Acosta 
> Signed-off-by: Ilya Maximets 

I've tested this a bit and it seems like a reasonable solution.

Acked-by: Mike Pattrick 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-05-29 Thread Roberto Bartzen Acosta
Hi Ilya,

Thanks for the patch!  LGTM+

works perfectly for the use case of inclusion/removal of ovn-ic
transit-switches with active monitoring of the Datapath_Binding table via
python-idl client (ovsdbapp).

Hey @Terry Wilson , since you were interested in
ovn-ic, take a look at this to avoid problems with
neutron-ovn-metadata-agent.

Kind regards,
Roberto

Em ter., 28 de mai. de 2024 às 09:23, Vladislav Odintsov 
escreveu:

> Hi Ilya,
>
> Thanks for the fix!
> Some time ago we internally noticed a problem with index updates, which
> was not a real issue, but I tried your fix and it fixes our original issue.
>
> How we observed that issue:
>
> In terminal one:
> ovn-nbctl ls-add test
>
> In terminal two:
> Run python, load IDL and query the name for the created object (ls "test")
> (we use ovsdbapp, so example uses it as well):
>
> >>> from ovsdbapp.backend.ovs_idl import connection, idlutils
> >>> import ovsdbapp.schema.ovn_northbound.impl_idl as nb_idl
> >>>
> >>> idl = connection.OvsdbIdl.from_server("tcp:127.0.0.1:6641",
> "OVN_Northbound")
> >>> api_idl = nb_idl.OvnNbApiIdlImpl(connection.Connection(idl, 100))
> >>>
> >>> sw = api_idl.ls_get("test").execute().name
> >>> 'test'
>
> Than switch back to first terminal and change ls 'name' (which is an
> indexed field):
>
> ovn-nbctl set logical-switch test name=test2
>
> Switch back to python terminal and try to get the name again.
> In case of affected python-ovs the old instance "test" returns new name
> "test2" from "test" instance and "test2" instance is not accessible:
>
> >>> sw = api_idl.ls_get("test").execute().name
> >>> 'test2'
> >>> sw = api_idl.ls_get("test2").execute().name
> Traceback (most recent call last):
>   File "", line 1, in 
> AttributeError: 'NoneType' object has no attribute 'name'
>
> With your patch it works as expected:
>
> >>> sw = api_idl.ls_get("test").execute().name
> Traceback (most recent call last):
>   File "", line 1, in 
> AttributeError: 'NoneType' object has no attribute 'name'
> >>> sw = api_idl.ls_get("test2").execute().name
> >>> 'test2'
>
> I just wanted to share our experience with this problem and patch.
> You can add this to OVS python tests, if you consider it's worth it.
>
> Thanks again :)
>
> regards,
>
> Vladislav Odintsov
>
> -Original Message-
> From: dev  on behalf of Ilya Maximets <
> i.maxim...@ovn.org>
> Date: Tuesday, 28 May 2024 at 00:39
> To: "ovs-dev@openvswitch.org" 
> Cc: Ilya Maximets , Dumitru Ceara 
> Subject: [ovs-dev] [PATCH] python: idl: Fix index not being updated on
> row  modification.
>
> When a row is modified, python IDL doesn't perform any operations on
> existing client-side indexes.  This means that if the column on which
> index is created changes, the old value will remain in the index and
> the new one will not be added to the index.  Beside lookup failures
> this is also causing inability to remove modified rows, because the
> new column value doesn't exist in the index causing an exception on
> attempt to remove it:
>
>  Traceback (most recent call last):
>File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
>  self.idl.run()
>File "ovs/db/idl.py", line 465, in run
>  self.__parse_update(msg.params[2], OVSDB_UPDATE3)
>File "ovs/db/idl.py", line 924, in __parse_update
>  self.__do_parse_update(update, version, self.tables)
>File "ovs/db/idl.py", line 964, in __do_parse_update
>  changes = self.__process_update2(table, uuid, row_update)
>File "ovs/db/idl.py", line 991, in __process_update2
>  del table.rows[uuid]
>File "ovs/db/custom_index.py", line 102, in __delitem__
>  index.remove(val)
>File "ovs/db/custom_index.py", line 66, in remove
>  self.values.remove(self.index_entry_from_row(row))
>File "sortedcontainers/sortedlist.py", line 2015, in remove
>  raise ValueError('{0!r} not in list'.format(value))
>  ValueError: Datapath_Binding(
>uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
>tunnel_key=16711683, load_balancers=[], external_ids={}) not in list
>
> Fix that by always removing an existing row from indexes before
> modification and adding back afterwards.  This ensures that old
>

Re: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-05-28 Thread Vladislav Odintsov
Hi Ilya,

Thanks for the fix!
Some time ago we internally noticed a problem with index updates, which was not 
a real issue, but I tried your fix and it fixes our original issue.

How we observed that issue:

In terminal one:
ovn-nbctl ls-add test

In terminal two:
Run python, load IDL and query the name for the created object (ls "test") (we 
use ovsdbapp, so example uses it as well): 

>>> from ovsdbapp.backend.ovs_idl import connection, idlutils
>>> import ovsdbapp.schema.ovn_northbound.impl_idl as nb_idl
>>>
>>> idl = connection.OvsdbIdl.from_server("tcp:127.0.0.1:6641", 
>>> "OVN_Northbound")
>>> api_idl = nb_idl.OvnNbApiIdlImpl(connection.Connection(idl, 100))
>>>
>>> sw = api_idl.ls_get("test").execute().name
>>> 'test'

Than switch back to first terminal and change ls 'name' (which is an indexed 
field):

ovn-nbctl set logical-switch test name=test2

Switch back to python terminal and try to get the name again.
In case of affected python-ovs the old instance "test" returns new name "test2" 
from "test" instance and "test2" instance is not accessible:

>>> sw = api_idl.ls_get("test").execute().name
>>> 'test2'
>>> sw = api_idl.ls_get("test2").execute().name
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'NoneType' object has no attribute 'name'

With your patch it works as expected:

>>> sw = api_idl.ls_get("test").execute().name
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'NoneType' object has no attribute 'name'
>>> sw = api_idl.ls_get("test2").execute().name
>>> 'test2'

I just wanted to share our experience with this problem and patch.
You can add this to OVS python tests, if you consider it's worth it.

Thanks again :)

regards,
 
Vladislav Odintsov

-Original Message-
From: dev  on behalf of Ilya Maximets 

Date: Tuesday, 28 May 2024 at 00:39
To: "ovs-dev@openvswitch.org" 
Cc: Ilya Maximets , Dumitru Ceara 
Subject: [ovs-dev] [PATCH] python: idl: Fix index not being updated on row  
modification.

When a row is modified, python IDL doesn't perform any operations on
existing client-side indexes.  This means that if the column on which
index is created changes, the old value will remain in the index and
the new one will not be added to the index.  Beside lookup failures
this is also causing inability to remove modified rows, because the
new column value doesn't exist in the index causing an exception on
attempt to remove it:

 Traceback (most recent call last):
   File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
 self.idl.run()
   File "ovs/db/idl.py", line 465, in run
 self.__parse_update(msg.params[2], OVSDB_UPDATE3)
   File "ovs/db/idl.py", line 924, in __parse_update
 self.__do_parse_update(update, version, self.tables)
   File "ovs/db/idl.py", line 964, in __do_parse_update
 changes = self.__process_update2(table, uuid, row_update)
   File "ovs/db/idl.py", line 991, in __process_update2
 del table.rows[uuid]
   File "ovs/db/custom_index.py", line 102, in __delitem__
 index.remove(val)
   File "ovs/db/custom_index.py", line 66, in remove
 self.values.remove(self.index_entry_from_row(row))
   File "sortedcontainers/sortedlist.py", line 2015, in remove
 raise ValueError('{0!r} not in list'.format(value))
 ValueError: Datapath_Binding(
   uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
   tunnel_key=16711683, load_balancers=[], external_ids={}) not in list

Fix that by always removing an existing row from indexes before
modification and adding back afterwards.  This ensures that old
values are removed from the index and new ones are added.

This behavior is consistent with the C implementation.

The new test that reproduces the removal issue is added.  Some extra
testing infrastructure added to be able to handle and print out the
'indexed' table from the idltest schema.

Fixes: 13973bc41524 ("Add multi-column index support for the Python IDL")
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2024-May/053159.html
Reported-by: Roberto Bartzen Acosta 
Signed-off-by: Ilya Maximets 
---
 python/ovs/db/idl.py | 13 --
 tests/ovsdb-idl.at   | 95 +++-
 tests/test-ovsdb.c   | 43 
 tests/test-ovsdb.py  | 15 +++
 4 files changed, 160 insertions(+), 6 deletions(-)

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index a80da84e7..a

[ovs-dev] [PATCH] python: idl: Fix index not being updated on row modification.

2024-05-27 Thread Ilya Maximets
When a row is modified, python IDL doesn't perform any operations on
existing client-side indexes.  This means that if the column on which
index is created changes, the old value will remain in the index and
the new one will not be added to the index.  Beside lookup failures
this is also causing inability to remove modified rows, because the
new column value doesn't exist in the index causing an exception on
attempt to remove it:

 Traceback (most recent call last):
   File "ovsdbapp/backend/ovs_idl/connection.py", line 110, in run
 self.idl.run()
   File "ovs/db/idl.py", line 465, in run
 self.__parse_update(msg.params[2], OVSDB_UPDATE3)
   File "ovs/db/idl.py", line 924, in __parse_update
 self.__do_parse_update(update, version, self.tables)
   File "ovs/db/idl.py", line 964, in __do_parse_update
 changes = self.__process_update2(table, uuid, row_update)
   File "ovs/db/idl.py", line 991, in __process_update2
 del table.rows[uuid]
   File "ovs/db/custom_index.py", line 102, in __delitem__
 index.remove(val)
   File "ovs/db/custom_index.py", line 66, in remove
 self.values.remove(self.index_entry_from_row(row))
   File "sortedcontainers/sortedlist.py", line 2015, in remove
 raise ValueError('{0!r} not in list'.format(value))
 ValueError: Datapath_Binding(
   uuid=UUID('498e66a2-70bc-4587-a66f-0433baf82f60'),
   tunnel_key=16711683, load_balancers=[], external_ids={}) not in list

Fix that by always removing an existing row from indexes before
modification and adding back afterwards.  This ensures that old
values are removed from the index and new ones are added.

This behavior is consistent with the C implementation.

The new test that reproduces the removal issue is added.  Some extra
testing infrastructure added to be able to handle and print out the
'indexed' table from the idltest schema.

Fixes: 13973bc41524 ("Add multi-column index support for the Python IDL")
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2024-May/053159.html
Reported-by: Roberto Bartzen Acosta 
Signed-off-by: Ilya Maximets 
---
 python/ovs/db/idl.py | 13 --
 tests/ovsdb-idl.at   | 95 +++-
 tests/test-ovsdb.c   | 43 
 tests/test-ovsdb.py  | 15 +++
 4 files changed, 160 insertions(+), 6 deletions(-)

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index a80da84e7..ae4cfe7e2 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -1013,7 +1013,9 @@ class Idl(object):
 if not row:
 raise error.Error('Modify non-existing row')
 
+del table.rows[uuid]
 old_row = self.__apply_diff(table, row, row_update['modify'])
+table.rows[uuid] = row
 return Notice(ROW_UPDATE, row, Row(self, table, uuid, old_row))
 else:
 raise error.Error(' unknown operation',
@@ -1044,9 +1046,10 @@ class Idl(object):
 op = ROW_UPDATE
 vlog.warn("cannot add existing row %s to table %s"
   % (uuid, table.name))
+del table.rows[uuid]
+
 changed |= self.__row_update(table, row, new)
-if op == ROW_CREATE:
-table.rows[uuid] = row
+table.rows[uuid] = row
 if changed:
 return Notice(ROW_CREATE, row)
 else:
@@ -1058,9 +1061,11 @@ class Idl(object):
 # XXX rate-limit
 vlog.warn("cannot modify missing row %s in table %s"
   % (uuid, table.name))
+else:
+del table.rows[uuid]
+
 changed |= self.__row_update(table, row, new)
-if op == ROW_CREATE:
-table.rows[uuid] = row
+table.rows[uuid] = row
 if changed:
 return Notice(op, row, Row.from_json(self, table, uuid, old))
 return False
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
index c9e36d678..34f3902e0 100644
--- a/tests/ovsdb-idl.at
+++ b/tests/ovsdb-idl.at
@@ -167,8 +167,17 @@ m4_define([OVSDB_CHECK_IDL_REGISTER_COLUMNS_PY],
OVSDB_START_IDLTEST
m4_if([$2], [], [],
  [AT_CHECK([ovsdb-client transact unix:socket $2], [0], [ignore], 
[ignore])])
-   AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py  -t10 idl 
$srcdir/idltest.ovsschema unix:socket 
?simple:b,ba,i,ia,r,ra,s,sa,u,ua?simple3:name,uset,uref?simple4:name?simple6:name,weak_ref?link1:i,k,ka,l2?link2:i,l1?singleton:name
 $3],
-[0], [stdout], [ignore])
+   m4_define([REGISTER], m4_joinall([?], [],
+ [simple:b,ba,i,ia,r,ra,s,sa,u,ua],
+ [simple3:name,uset,uref],
+ [simple4:name],
+ [simple6:name,weak_ref],
+ [link1:i,k,ka,l2],
+ [link2:i,l1],
+ [indexed:i],
+ [singleton:name]))
+   AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py -t10 idl $srcdir/idltest.ovsschema 
\
+unix:socket REGISTER $3], [0], [stdout], [ignore])
AT_CHECK([sort stdout |