Files
ovn-octavia-provider/ovn_octavia_provider/common/config.py
Maciej Józefczyk 000049c15d Move OVN Octavia Provider driver code to this repository
This code moves OVN Octavia provider driver from networking-ovn
(branch master) repository to this repository.

For first step lets move code and unit tests.

Previous paths in networking-ovn tree:
./networking_ovn/octavia/ovn_driver.py -> ./ovn_octavia_provider/driver.py
./networking_ovn/tests/unit/octavia/test_ovn_driver ->
   ./ovn_octavia_provider/tests/unit/test_driver.py

There are a few files taken directly from neutron
repository that could be removed when neutron-lib
including those will be released:
./ovn_octavia_provider/ovsdb/impl_idl_ovn.py
./ovn_octavia_provider/ovsdb/ovsdb_monitor.py

Co-Authored-By: Brian Haley <bhaley@redhat.com>
Co-Authored-By: Carlos Goncalves <cgoncalves@redhat.com>
Co-Authored-By: Frode Nordahl <frode.nordahl@canonical.com>
Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>
Co-Authored-By: Maciej Józefczyk <mjozefcz@redhat.com>
Co-Authored-By: Numan Siddique <nusiddiq@redhat.com>
Co-Authored-By: Reedip Banerjee <rbanerje@redhat.com>
Co-Authored-By: Terry Wilson <twilson@redhat.com>
Co-Authored-By: Yunxiang Tao <taoyunxiang@cmss.chinamobile.com>
Co-Authored-By: zhufl <zhu.fanglei@zte.com.cn>

Change-Id: I9b562c4ed5f74df2c3d600356758f4648ac7770b
Related-Blueprint: neutron-ovn-merge
2020-02-18 16:23:54 +00:00

95 lines
3.2 KiB
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
from oslo_log import log as logging
from ovn_octavia_provider.i18n import _
LOG = logging.getLogger(__name__)
ovn_opts = [
cfg.StrOpt('ovn_nb_connection',
default='tcp:127.0.0.1:6641',
help=_('The connection string for the OVN_Northbound OVSDB.\n'
'Use tcp:IP:PORT for TCP connection.\n'
'Use ssl:IP:PORT for SSL connection. The '
'ovn_nb_private_key, ovn_nb_certificate and '
'ovn_nb_ca_cert are mandatory.\n'
'Use unix:FILE for unix domain socket connection.')),
cfg.StrOpt('ovn_nb_private_key',
default='',
help=_('The PEM file with private key for SSL connection to '
'OVN-NB-DB')),
cfg.StrOpt('ovn_nb_certificate',
default='',
help=_('The PEM file with certificate that certifies the '
'private key specified in ovn_nb_private_key')),
cfg.StrOpt('ovn_nb_ca_cert',
default='',
help=_('The PEM file with CA certificate that OVN should use to'
' verify certificates presented to it by SSL peers')),
cfg.IntOpt('ovsdb_connection_timeout',
default=180,
help=_('Timeout in seconds for the OVSDB '
'connection transaction')),
cfg.IntOpt('ovsdb_retry_max_interval',
default=180,
help=_('Max interval in seconds between '
'each retry to get the OVN NB and SB IDLs')),
cfg.IntOpt('ovsdb_probe_interval',
min=0,
default=60000,
help=_('The probe interval in for the OVSDB session in '
'milliseconds. If this is zero, it disables the '
'connection keepalive feature. If non-zero the value '
'will be forced to at least 1000 milliseconds. Defaults '
'to 60 seconds.')),
]
cfg.CONF.register_opts(ovn_opts, group='ovn')
def list_opts():
return [
('ovn', ovn_opts),
]
def get_ovn_nb_connection():
return cfg.CONF.ovn.ovn_nb_connection
def get_ovn_nb_private_key():
return cfg.CONF.ovn.ovn_nb_private_key
def get_ovn_nb_certificate():
return cfg.CONF.ovn.ovn_nb_certificate
def get_ovn_nb_ca_cert():
return cfg.CONF.ovn.ovn_nb_ca_cert
def get_ovn_ovsdb_timeout():
return cfg.CONF.ovn.ovsdb_connection_timeout
def get_ovn_ovsdb_retry_max_interval():
return cfg.CONF.ovn.ovsdb_retry_max_interval
def get_ovn_ovsdb_probe_interval():
return cfg.CONF.ovn.ovsdb_probe_interval