Browse Source

Set class ovsdb_conection to None

We override ovsdbapp's Backend class to change from using a class
variable for the ovsdb_connection to using an instance variable.
This means we have to override several different methods/properties.
This could be simplified in ovsdbapp by making ovsdb_connection a
property, which in ovsdbapp access a class variable, and in neutron
it is overridden to to store on the instance, so there would be
less to override.

ovsdbapp is adding user-definable indexed columns so things like
lookups by name will be faster. Due to the way it is architected,
the place to generate the indexes would be just before the
connection starts. Since methods like start_connection are
classmethods in ovsdbapp, and instance methods in neutron, this is
hard to do cleanly w/o ovsdb_connection being a property. Without
this change, neutron would fail if that property was defined. With
the change, it should pass with both old and new code.

Change-Id: Idd184807de24c79dd892046f01e3acdd1168ca2d
(cherry picked from commit c05bac8c40)
tags/6.1.1
Terry Wilson 3 months ago
committed by Bernard Cafarelli
parent
commit
9db1fc8977
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      networking_ovn/ovsdb/impl_idl_ovn.py

+ 1
- 0
networking_ovn/ovsdb/impl_idl_ovn.py View File

@@ -57,6 +57,7 @@ class OvnNbTransaction(idl_trans.Transaction):
# and therefor allows networking-ovn to manage connection scope on its own
class Backend(ovs_idl.Backend):
lookup_table = {}
ovsdb_connection = None

def __init__(self, connection):
self.ovsdb_connection = connection


Loading…
Cancel
Save