diff --git a/ovsdbapp/backend/ovs_idl/command.py b/ovsdbapp/backend/ovs_idl/command.py index 78c036ed..9756de94 100644 --- a/ovsdbapp/backend/ovs_idl/command.py +++ b/ovsdbapp/backend/ovs_idl/command.py @@ -180,7 +180,7 @@ class DbClearCommand(BaseCommand): setattr(record, self.column, value) -class DbGetCommand(BaseCommand): +class DbGetCommand(ReadOnlyCommand): def __init__(self, api, table, record, column): super(DbGetCommand, self).__init__(api) self.table = table @@ -200,7 +200,7 @@ class DbGetCommand(BaseCommand): self.result = result -class DbListCommand(BaseCommand): +class DbListCommand(ReadOnlyCommand): def __init__(self, api, table, records, columns, if_exists, row=False): super(DbListCommand, self).__init__(api) self.table = table @@ -263,7 +263,7 @@ class DbListCommand(BaseCommand): match=records_found[0]) -class DbFindCommand(BaseCommand): +class DbFindCommand(ReadOnlyCommand): def __init__(self, api, table, *conditions, **kwargs): super(DbFindCommand, self).__init__(api) self.table = self.api._tables[table] diff --git a/ovsdbapp/tests/functional/schema/open_vswitch/test_common_db.py b/ovsdbapp/tests/functional/schema/open_vswitch/test_common_db.py index 5f0a106c..66ceb48c 100644 --- a/ovsdbapp/tests/functional/schema/open_vswitch/test_common_db.py +++ b/ovsdbapp/tests/functional/schema/open_vswitch/test_common_db.py @@ -69,6 +69,10 @@ class TestBackendDb(base.FunctionalTestCase): columns=('name', 'datapath_type')).execute(check_error=True) self.assertTrue(all(b in res for b in self.bridges)) + def test_db_list_nested(self): + with self.api.transaction(check_error=True): + self.test_db_list() + def test_db_list_record(self): res = self.api.db_list( 'Bridge', [self.bridges[0]['name']],