Added common config and SR-IOV agent config to sanity check
Added common config and SR-IOV agent config parameters to the sanity check script, to add the following missing configuration parameters: - default.notify_nova_on_port_status_changes - default.notify_nova_on_port_data_changes - sriov_nic.physical_device_mappings Change-Id: I2a5e1fe3dbc6f2f342feaec92f4c122cfccce6d1 Closes-Bug: #1926170
This commit is contained in:
parent
c0e917505e
commit
28cd6c82e9
@ -24,9 +24,12 @@ from neutron.cmd.sanity import checks
|
|||||||
from neutron.common import config
|
from neutron.common import config
|
||||||
from neutron.conf.agent import common as agent_config
|
from neutron.conf.agent import common as agent_config
|
||||||
from neutron.conf.agent import securitygroups_rpc
|
from neutron.conf.agent import securitygroups_rpc
|
||||||
|
from neutron.conf import common as common_config
|
||||||
from neutron.conf.db import l3_hamode_db
|
from neutron.conf.db import l3_hamode_db
|
||||||
from neutron.conf.plugins.ml2 import config as ml2_conf
|
from neutron.conf.plugins.ml2 import config as ml2_conf
|
||||||
from neutron.conf.plugins.ml2.drivers import linuxbridge as lb_conf
|
from neutron.conf.plugins.ml2.drivers import linuxbridge as lb_conf
|
||||||
|
from neutron.conf.plugins.ml2.drivers.mech_sriov import agent_common as \
|
||||||
|
sriov_conf
|
||||||
from neutron.conf.plugins.ml2.drivers import ovs_conf
|
from neutron.conf.plugins.ml2.drivers import ovs_conf
|
||||||
|
|
||||||
|
|
||||||
@ -36,10 +39,12 @@ LOG = logging.getLogger(__name__)
|
|||||||
def setup_conf():
|
def setup_conf():
|
||||||
ovs_conf.register_ovs_agent_opts(cfg.CONF)
|
ovs_conf.register_ovs_agent_opts(cfg.CONF)
|
||||||
lb_conf.register_linuxbridge_opts(cfg.CONF)
|
lb_conf.register_linuxbridge_opts(cfg.CONF)
|
||||||
|
sriov_conf.register_agent_sriov_nic_opts(cfg.CONF)
|
||||||
ml2_conf.register_ml2_plugin_opts(cfg.CONF)
|
ml2_conf.register_ml2_plugin_opts(cfg.CONF)
|
||||||
securitygroups_rpc.register_securitygroups_opts(cfg.CONF)
|
securitygroups_rpc.register_securitygroups_opts(cfg.CONF)
|
||||||
dhcp_agent.register_options(cfg.CONF)
|
dhcp_agent.register_options(cfg.CONF)
|
||||||
l3_hamode_db.register_db_l3_hamode_opts(cfg.CONF)
|
l3_hamode_db.register_db_l3_hamode_opts(cfg.CONF)
|
||||||
|
common_config.register_core_common_config_opts(cfg.CONF)
|
||||||
|
|
||||||
|
|
||||||
class BoolOptCallback(cfg.BoolOpt):
|
class BoolOptCallback(cfg.BoolOpt):
|
||||||
|
@ -23,8 +23,11 @@ from neutron.tests import base
|
|||||||
|
|
||||||
class TestSanityCheck(base.BaseTestCase):
|
class TestSanityCheck(base.BaseTestCase):
|
||||||
|
|
||||||
def test_setup_conf(self):
|
def test_setup_conf_and_enable_test_from_config(self):
|
||||||
# verify that configuration can be successfully imported
|
# Verify that configuration can be successfully imported and tests are
|
||||||
with mock.patch.object(sanity_check.cfg, 'CONF',
|
# correctly loaded, based on the registered configuration parameters.
|
||||||
return_value=cfg.ConfigOpts()):
|
with mock.patch.object(sanity_check, 'cfg') as mock_cfg:
|
||||||
|
mock_cfg.CONF = cfg.ConfigOpts()
|
||||||
|
sanity_check.cfg.CONF.register_cli_opts(sanity_check.OPTS)
|
||||||
sanity_check.setup_conf()
|
sanity_check.setup_conf()
|
||||||
|
sanity_check.enable_tests_from_config()
|
||||||
|
Loading…
Reference in New Issue
Block a user