Add support for specifying ovsdbconnection string

Change-Id: I66e18198f68517ecffbacfbcd9b729b1300d4bcf
This commit is contained in:
Luis Tomas Bolivar 2022-03-09 11:08:18 +01:00
parent 44f5fca0cb
commit 2619f98e49
4 changed files with 7 additions and 3 deletions

View File

@ -30,6 +30,11 @@ agent_opts = [
cfg.StrOpt('driver',
help='Driver to be used',
default='ovn_bgp_driver'),
cfg.StrOpt('ovsdb_connection',
default='unix:/usr/local/var/run/openvswitch/db.sock',
help=_('The connection string for the native OVSDB backend.\n'
'Use tcp:IP:PORT for TCP connection.\n'
'Use unix:FILE for unix domain socket connection.')),
cfg.StrOpt('ovn_sb_private_key',
default='/etc/pki/tls/private/ovn_controller.key',
help='The PEM file with private key for SSL connection to '

View File

@ -23,7 +23,6 @@ OVN_LOCALNET_VIF_PORT_TYPE = "localnet"
OVN_BGP_NIC = "ovn"
OVN_BGP_VRF = "ovn-bgp-vrf"
OVN_BGP_VRF_TABLE = 10
OVS_CONNECTION_STRING = "unix:/var/run/openvswitch/db.sock"
OVS_RULE_COOKIE = "999"
OVS_VRF_RULE_COOKIE = "998"

View File

@ -70,7 +70,7 @@ class OVNBGPDriver(driver_api.AgentDriverBase):
frr.vrf_leak(constants.OVN_BGP_VRF, CONF.bgp_AS, CONF.bgp_router_id)
self.ovs_idl = ovs.OvsIdl()
self.ovs_idl.start(constants.OVS_CONNECTION_STRING)
self.ovs_idl.start(CONF.ovsdb_connection)
self.chassis = self.ovs_idl.get_own_chassis_name()
self.ovn_remote = self.ovs_idl.get_ovn_remote()
LOG.debug("Loaded chassis %s.", self.chassis)

View File

@ -66,7 +66,7 @@ class OVNEVPNDriver(driver_api.AgentDriverBase):
def start(self):
self.ovs_idl = ovs.OvsIdl()
self.ovs_idl.start(constants.OVS_CONNECTION_STRING)
self.ovs_idl.start(CONF.ovsdb_connection)
self.chassis = self.ovs_idl.get_own_chassis_name()
self.ovn_remote = self.ovs_idl.get_ovn_remote()
LOG.debug("Loaded chassis %s.", self.chassis)