Fix type for config option bgp_chassis_id
Type List was wrongly used. Type Str should be used instead.
Closes-Bug: #2088057
Change-Id: I26e04725ce419f87b8cde78567e88fe479cee1ae
(cherry picked from commit 4f8fe6adbf
)
This commit is contained in:
parent
855df3a483
commit
3b6bd96e17
@ -231,7 +231,7 @@ local_ovn_cluster_opts = [
|
||||
cfg.ListOpt('provider_networks_pool_prefixes',
|
||||
default=['192.168.0.0/16'],
|
||||
help='List of prefixes for provider networks'),
|
||||
cfg.ListOpt('bgp_chassis_id',
|
||||
cfg.StrOpt('bgp_chassis_id',
|
||||
default='bgp',
|
||||
help='The chassis_id used for the ovn-controller instance'
|
||||
' related to the node-local OVN instance. Used as a'
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from ovsdbapp.schema.open_vswitch import impl_idl as idl_ovs
|
||||
|
||||
from ovn_bgp_agent import constants
|
||||
@ -24,6 +25,9 @@ from ovn_bgp_agent.tests import base as test_base
|
||||
from ovn_bgp_agent.utils import linux_net
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class TestOVS(test_base.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@ -484,7 +488,18 @@ class TestOvsIdl(test_base.TestCase):
|
||||
'Open_vSwitch', '.', 'external_ids')
|
||||
|
||||
def test_get_ovn_bridge_mappings_bridge(self):
|
||||
bridge = 'bgp'
|
||||
bridge = 'bgp1'
|
||||
self.execute_ref.return_value = {
|
||||
'ovn-bridge-mappings-bgp1':
|
||||
'net0:bridge0,net1:bridge1, net2:bridge2'}
|
||||
ret = self.ovs_idl.get_ovn_bridge_mappings(bridge=bridge)
|
||||
self.assertEqual(['net0:bridge0', 'net1:bridge1', 'net2:bridge2'], ret)
|
||||
self.ovs_idl.idl_ovs.db_get.assert_called_once_with(
|
||||
'Open_vSwitch', '.', 'external_ids')
|
||||
|
||||
def test_get_ovn_bridge_mappings_default_bridge(self):
|
||||
# bgp_chassis_id defaults to 'bgp'
|
||||
bridge = CONF.local_ovn_cluster.bgp_chassis_id
|
||||
self.execute_ref.return_value = {
|
||||
'ovn-bridge-mappings-bgp':
|
||||
'net0:bridge0,net1:bridge1, net2:bridge2'}
|
||||
|
Loading…
Reference in New Issue
Block a user