Browse Source

Agent common config

Refactoring Neutron configuration options for agent common config to be
in neutron/conf/agent/common. This will allow centralization of all
configuration options and provide an easy way to import.

Partial-Bug: #1563069
Change-Id: Iebac0cdd3bcfd0135349128921b7ad7a1a939ab8
Needed-By: Ib676003bbe909b5a9013a3178b12dbe291d936af
tags/11.0.0.0b1
John Perkins 2 years ago
parent
commit
7f23ccce23
38 changed files with 51 additions and 49 deletions
  1. 1
    1
      neutron/agent/common/utils.py
  2. 1
    1
      neutron/agent/dhcp_agent.py
  3. 1
    1
      neutron/agent/l3_agent.py
  4. 2
    1
      neutron/agent/linux/external_process.py
  5. 1
    1
      neutron/agent/linux/iptables_manager.py
  6. 1
    1
      neutron/agent/linux/utils.py
  7. 1
    1
      neutron/agent/metadata_agent.py
  8. 1
    1
      neutron/cmd/netns_cleanup.py
  9. 1
    1
      neutron/cmd/ovs_cleanup.py
  10. 1
    1
      neutron/conf/agent/common.py
  11. 1
    1
      neutron/conf/agent/l3/config.py
  12. 1
    1
      neutron/debug/shell.py
  13. 12
    11
      neutron/opts.py
  14. 1
    1
      neutron/plugins/ml2/drivers/agent/config.py
  15. 1
    1
      neutron/plugins/ml2/drivers/mech_sriov/agent/common/config.py
  16. 1
    1
      neutron/plugins/ml2/drivers/openvswitch/agent/common/config.py
  17. 1
    1
      neutron/services/metering/agents/metering_agent.py
  18. 1
    1
      neutron/services/metering/drivers/iptables/iptables_driver.py
  19. 1
    1
      neutron/tests/common/net_helpers.py
  20. 1
    1
      neutron/tests/functional/agent/l2/base.py
  21. 1
    1
      neutron/tests/functional/agent/l3/framework.py
  22. 1
    1
      neutron/tests/functional/agent/linux/test_dhcp.py
  23. 1
    1
      neutron/tests/functional/agent/linux/test_ip_lib.py
  24. 1
    1
      neutron/tests/functional/agent/test_dhcp_agent.py
  25. 1
    1
      neutron/tests/functional/base.py
  26. 1
    1
      neutron/tests/unit/agent/common/test_ovs_lib.py
  27. 1
    1
      neutron/tests/unit/agent/common/test_utils.py
  28. 1
    1
      neutron/tests/unit/agent/dhcp/test_agent.py
  29. 1
    1
      neutron/tests/unit/agent/l3/test_agent.py
  30. 1
    1
      neutron/tests/unit/agent/l3/test_dvr_local_router.py
  31. 2
    2
      neutron/tests/unit/agent/l3/test_router_info.py
  32. 1
    1
      neutron/tests/unit/agent/linux/test_dhcp.py
  33. 1
    1
      neutron/tests/unit/agent/linux/test_interface.py
  34. 2
    2
      neutron/tests/unit/agent/linux/test_iptables_firewall.py
  35. 1
    1
      neutron/tests/unit/agent/metadata/test_driver.py
  36. 0
    0
      neutron/tests/unit/conf/agent/__init__.py
  37. 1
    1
      neutron/tests/unit/conf/agent/test_common.py
  38. 1
    1
      neutron/tests/unit/debug/test_commands.py

+ 1
- 1
neutron/agent/common/utils.py View File

@@ -20,8 +20,8 @@ from oslo_log import log as logging
20 20
 from oslo_utils import timeutils
21 21
 
22 22
 from neutron._i18n import _LE
23
-from neutron.agent.common import config
24 23
 from neutron.common import utils as neutron_utils
24
+from neutron.conf.agent import common as config
25 25
 from neutron.conf.agent.database import agents_db
26 26
 
27 27
 

+ 1
- 1
neutron/agent/dhcp_agent.py View File

@@ -19,10 +19,10 @@ import sys
19 19
 from oslo_config import cfg
20 20
 from oslo_service import service
21 21
 
22
-from neutron.agent.common import config
23 22
 from neutron.agent.linux import interface
24 23
 from neutron.common import config as common_config
25 24
 from neutron.common import topics
25
+from neutron.conf.agent import common as config
26 26
 from neutron.conf.agent import dhcp as dhcp_config
27 27
 from neutron.conf.agent.metadata import config as meta_conf
28 28
 from neutron import service as neutron_service

+ 1
- 1
neutron/agent/l3_agent.py View File

@@ -19,13 +19,13 @@ import sys
19 19
 from oslo_config import cfg
20 20
 from oslo_service import service
21 21
 
22
-from neutron.agent.common import config
23 22
 from neutron.agent.linux import external_process
24 23
 from neutron.agent.linux import interface
25 24
 from neutron.agent.linux import pd
26 25
 from neutron.agent.linux import ra
27 26
 from neutron.common import config as common_config
28 27
 from neutron.common import topics
28
+from neutron.conf.agent import common as config
29 29
 from neutron.conf.agent.l3 import config as l3_config
30 30
 from neutron.conf.agent.l3 import ha as ha_conf
31 31
 from neutron.conf.agent.metadata import config as meta_conf

+ 2
- 1
neutron/agent/linux/external_process.py View File

@@ -24,10 +24,11 @@ from oslo_utils import fileutils
24 24
 import six
25 25
 
26 26
 from neutron._i18n import _, _LW, _LE
27
-from neutron.agent.common import config as agent_cfg
28 27
 from neutron.agent.linux import ip_lib
29 28
 from neutron.agent.linux import utils
30 29
 
30
+from neutron.conf.agent import common as agent_cfg
31
+
31 32
 LOG = logging.getLogger(__name__)
32 33
 
33 34
 

+ 1
- 1
neutron/agent/linux/iptables_manager.py View File

@@ -32,11 +32,11 @@ from oslo_utils import excutils
32 32
 import six
33 33
 
34 34
 from neutron._i18n import _, _LE, _LW
35
-from neutron.agent.common import config
36 35
 from neutron.agent.linux import iptables_comments as ic
37 36
 from neutron.agent.linux import utils as linux_utils
38 37
 from neutron.common import exceptions as n_exc
39 38
 from neutron.common import utils
39
+from neutron.conf.agent import common as config
40 40
 
41 41
 LOG = logging.getLogger(__name__)
42 42
 

+ 1
- 1
neutron/agent/linux/utils.py View File

@@ -34,9 +34,9 @@ from oslo_utils import fileutils
34 34
 from six.moves import http_client as httplib
35 35
 
36 36
 from neutron._i18n import _, _LE
37
-from neutron.agent.common import config
38 37
 from neutron.agent.linux import xenapi_root_helper
39 38
 from neutron.common import utils
39
+from neutron.conf.agent import common as config
40 40
 from neutron import wsgi
41 41
 
42 42
 

+ 1
- 1
neutron/agent/metadata_agent.py View File

@@ -17,11 +17,11 @@ import sys
17 17
 from oslo_config import cfg
18 18
 from oslo_log import log as logging
19 19
 
20
-from neutron.agent.common import config as agent_conf
21 20
 from neutron.agent.metadata import agent
22 21
 from neutron.common import cache_utils as cache
23 22
 from neutron.common import config
24 23
 from neutron.common import utils
24
+from neutron.conf.agent import common as agent_conf
25 25
 from neutron.conf.agent.metadata import config as meta
26 26
 
27 27
 LOG = logging.getLogger(__name__)

+ 1
- 1
neutron/cmd/netns_cleanup.py View File

@@ -24,7 +24,6 @@ from oslo_log import log as logging
24 24
 from oslo_utils import importutils
25 25
 
26 26
 from neutron._i18n import _LE, _LW
27
-from neutron.agent.common import config as agent_config
28 27
 from neutron.agent.common import ovs_lib
29 28
 from neutron.agent.l3 import dvr_fip_ns
30 29
 from neutron.agent.l3 import dvr_snat_ns
@@ -36,6 +35,7 @@ from neutron.agent.linux import ip_lib
36 35
 from neutron.agent.linux import utils
37 36
 from neutron.common import config
38 37
 from neutron.conf.agent import cmd
38
+from neutron.conf.agent import common as agent_config
39 39
 from neutron.conf.agent import dhcp as dhcp_config
40 40
 
41 41
 

+ 1
- 1
neutron/cmd/ovs_cleanup.py View File

@@ -17,12 +17,12 @@ from oslo_config import cfg
17 17
 from oslo_log import log as logging
18 18
 
19 19
 from neutron._i18n import _LI
20
-from neutron.agent.common import config as agent_config
21 20
 from neutron.agent.common import ovs_lib
22 21
 from neutron.agent.linux import interface
23 22
 from neutron.agent.linux import ip_lib
24 23
 from neutron.common import config
25 24
 from neutron.conf.agent import cmd
25
+from neutron.conf.agent import common as agent_config
26 26
 from neutron.conf.agent.l3 import config as l3_config
27 27
 
28 28
 

neutron/agent/common/config.py → neutron/conf/agent/common.py View File

@@ -131,7 +131,7 @@ def get_log_args(conf, log_file_name, **kwargs):
131 131
     return cmd_args
132 132
 
133 133
 
134
-def register_root_helper(conf):
134
+def register_root_helper(conf=cfg.CONF):
135 135
     conf.register_opts(ROOT_HELPER_OPTS, 'AGENT')
136 136
 
137 137
 

+ 1
- 1
neutron/conf/agent/l3/config.py View File

@@ -18,7 +18,7 @@ from neutron_lib import constants
18 18
 from oslo_config import cfg
19 19
 
20 20
 from neutron._i18n import _
21
-from neutron.agent.common import config
21
+from neutron.conf.agent import common as config
22 22
 
23 23
 
24 24
 OPTS = [

+ 1
- 1
neutron/debug/shell.py View File

@@ -20,9 +20,9 @@ from oslo_utils import importutils
20 20
 
21 21
 from neutron._i18n import _
22 22
 from neutron._i18n import _LW
23
-from neutron.agent.common import config
24 23
 from neutron.agent.common import utils
25 24
 from neutron.agent.linux import interface
25
+from neutron.conf.agent import common as config
26 26
 from neutron.debug import debug_agent
27 27
 from neutronclient.common import exceptions as exc
28 28
 from neutronclient import shell

+ 12
- 11
neutron/opts.py View File

@@ -17,7 +17,7 @@ import operator
17 17
 from keystoneauth1 import loading as ks_loading
18 18
 from oslo_config import cfg
19 19
 
20
-import neutron.agent.common.config
20
+import neutron.agent.agent_extensions_manager
21 21
 import neutron.agent.linux.interface
22 22
 import neutron.agent.linux.pd
23 23
 import neutron.agent.linux.ra
@@ -25,6 +25,7 @@ import neutron.agent.ovsdb.api
25 25
 import neutron.agent.securitygroups_rpc
26 26
 import neutron.common.cache_utils
27 27
 import neutron.conf.agent.agent_extensions_manager
28
+import neutron.conf.agent.common
28 29
 import neutron.conf.agent.dhcp
29 30
 import neutron.conf.agent.l3.config
30 31
 import neutron.conf.agent.l3.ha
@@ -80,15 +81,15 @@ def list_agent_opts():
80 81
     return [
81 82
         ('agent',
82 83
          itertools.chain(
83
-             neutron.agent.common.config.ROOT_HELPER_OPTS,
84
-             neutron.agent.common.config.AGENT_STATE_OPTS,
85
-             neutron.agent.common.config.IPTABLES_OPTS,
86
-             neutron.agent.common.config.PROCESS_MONITOR_OPTS,
87
-             neutron.agent.common.config.AVAILABILITY_ZONE_OPTS)
84
+             neutron.conf.agent.common.ROOT_HELPER_OPTS,
85
+             neutron.conf.agent.common.AGENT_STATE_OPTS,
86
+             neutron.conf.agent.common.IPTABLES_OPTS,
87
+             neutron.conf.agent.common.PROCESS_MONITOR_OPTS,
88
+             neutron.conf.agent.common.AVAILABILITY_ZONE_OPTS)
88 89
          ),
89 90
         ('DEFAULT',
90 91
          itertools.chain(
91
-             neutron.agent.common.config.INTERFACE_DRIVER_OPTS,
92
+             neutron.conf.agent.common.INTERFACE_DRIVER_OPTS,
92 93
              neutron.conf.agent.metadata.config.SHARED_OPTS)
93 94
          )
94 95
     ]
@@ -154,17 +155,17 @@ def list_base_agent_opts():
154 155
         ('DEFAULT',
155 156
          itertools.chain(
156 157
              neutron.agent.linux.interface.OPTS,
157
-             neutron.agent.common.config.INTERFACE_DRIVER_OPTS,
158
+             neutron.conf.agent.common.INTERFACE_DRIVER_OPTS,
158 159
              neutron.conf.agent.ovs_conf.OPTS)
159 160
          ),
160
-        ('agent', neutron.agent.common.config.AGENT_STATE_OPTS),
161
+        ('agent', neutron.conf.agent.common.AGENT_STATE_OPTS),
161 162
         ('ovs', neutron.agent.ovsdb.api.OPTS),
162 163
     ]
163 164
 
164 165
 
165 166
 def list_az_agent_opts():
166 167
     return [
167
-        ('agent', neutron.agent.common.config.AVAILABILITY_ZONE_OPTS),
168
+        ('agent', neutron.conf.agent.common.AVAILABILITY_ZONE_OPTS),
168 169
     ]
169 170
 
170 171
 
@@ -231,7 +232,7 @@ def list_metadata_agent_opts():
231 232
              meta_conf.UNIX_DOMAIN_METADATA_PROXY_OPTS,
232 233
              neutron.conf.cache_utils.cache_opts)
233 234
          ),
234
-        ('agent', neutron.agent.common.config.AGENT_STATE_OPTS)
235
+        ('agent', neutron.conf.agent.common.AGENT_STATE_OPTS)
235 236
     ]
236 237
 
237 238
 

+ 1
- 1
neutron/plugins/ml2/drivers/agent/config.py View File

@@ -16,7 +16,7 @@
16 16
 
17 17
 from oslo_config import cfg
18 18
 
19
-from neutron.agent.common import config
19
+from neutron.conf.agent import common as config
20 20
 from neutron.conf.plugins.ml2.drivers import agent
21 21
 
22 22
 agent.register_agent_opts()

+ 1
- 1
neutron/plugins/ml2/drivers/mech_sriov/agent/common/config.py View File

@@ -17,7 +17,7 @@
17 17
 from oslo_config import cfg
18 18
 
19 19
 from neutron._i18n import _
20
-from neutron.agent.common import config
20
+from neutron.conf.agent import common as config
21 21
 from neutron.conf.plugins.ml2.drivers.mech_sriov import agent_common as \
22 22
      agent_common_config
23 23
 

+ 1
- 1
neutron/plugins/ml2/drivers/openvswitch/agent/common/config.py View File

@@ -14,7 +14,7 @@
14 14
 
15 15
 from oslo_config import cfg
16 16
 
17
-from neutron.agent.common import config
17
+from neutron.conf.agent import common as config
18 18
 from neutron.conf.plugins.ml2.drivers import ovs_conf
19 19
 
20 20
 ovs_conf.register_ovs_agent_opts()

+ 1
- 1
neutron/services/metering/agents/metering_agent.py View File

@@ -26,13 +26,13 @@ from oslo_utils import importutils
26 26
 from oslo_utils import timeutils
27 27
 
28 28
 from neutron._i18n import _, _LE, _LI, _LW
29
-from neutron.agent.common import config
30 29
 from neutron.agent import rpc as agent_rpc
31 30
 from neutron.common import config as common_config
32 31
 from neutron.common import constants as n_const
33 32
 from neutron.common import rpc as n_rpc
34 33
 from neutron.common import topics
35 34
 from neutron.common import utils
35
+from neutron.conf.agent import common as config
36 36
 from neutron.conf.services import metering_agent
37 37
 from neutron import manager
38 38
 from neutron import service as neutron_service

+ 1
- 1
neutron/services/metering/drivers/iptables/iptables_driver.py View File

@@ -19,7 +19,6 @@ from oslo_utils import importutils
19 19
 import six
20 20
 
21 21
 from neutron._i18n import _, _LE, _LI
22
-from neutron.agent.common import config
23 22
 from neutron.agent.l3 import dvr_snat_ns
24 23
 from neutron.agent.l3 import namespaces
25 24
 from neutron.agent.linux import interface
@@ -27,6 +26,7 @@ from neutron.agent.linux import ip_lib
27 26
 from neutron.agent.linux import iptables_manager
28 27
 from neutron.common import constants
29 28
 from neutron.common import ipv6_utils
29
+from neutron.conf.agent import common as config
30 30
 from neutron.services.metering.drivers import abstract_driver
31 31
 
32 32
 

+ 1
- 1
neutron/tests/common/net_helpers.py View File

@@ -33,7 +33,6 @@ from oslo_config import cfg
33 33
 from oslo_utils import uuidutils
34 34
 import six
35 35
 
36
-from neutron.agent.common import config
37 36
 from neutron.agent.common import ovs_lib
38 37
 from neutron.agent.linux import bridge_lib
39 38
 from neutron.agent.linux import interface
@@ -41,6 +40,7 @@ from neutron.agent.linux import ip_lib
41 40
 from neutron.agent.linux import iptables_firewall
42 41
 from neutron.agent.linux import utils
43 42
 from neutron.common import utils as common_utils
43
+from neutron.conf.agent import common as config
44 44
 from neutron.db import db_base_plugin_common
45 45
 from neutron.plugins.ml2.drivers.linuxbridge.agent import \
46 46
     linuxbridge_neutron_agent as linuxbridge_agent

+ 1
- 1
neutron/tests/functional/agent/l2/base.py View File

@@ -23,12 +23,12 @@ from neutron_lib.utils import net
23 23
 from oslo_config import cfg
24 24
 from oslo_utils import uuidutils
25 25
 
26
-from neutron.agent.common import config as agent_config
27 26
 from neutron.agent.common import ovs_lib
28 27
 from neutron.agent.l2 import l2_agent_extensions_manager as ext_manager
29 28
 from neutron.agent.linux import interface
30 29
 from neutron.agent.linux import polling
31 30
 from neutron.common import utils
31
+from neutron.conf.agent import common as agent_config
32 32
 from neutron.conf import common as common_config
33 33
 from neutron.conf.plugins.ml2.drivers import ovs_conf
34 34
 from neutron.plugins.common import constants as p_const

+ 1
- 1
neutron/tests/functional/agent/l3/framework.py View File

@@ -25,7 +25,6 @@ from oslo_utils import uuidutils
25 25
 import testtools
26 26
 import textwrap
27 27
 
28
-from neutron.agent.common import config as agent_config
29 28
 from neutron.agent.common import ovs_lib
30 29
 from neutron.agent.l3 import agent as neutron_l3_agent
31 30
 from neutron.agent.l3 import namespaces
@@ -35,6 +34,7 @@ from neutron.agent.linux import external_process
35 34
 from neutron.agent.linux import ip_lib
36 35
 from neutron.agent.linux import keepalived
37 36
 from neutron.common import utils as common_utils
37
+from neutron.conf.agent import common as agent_config
38 38
 from neutron.conf import common as common_config
39 39
 from neutron.tests.common import l3_test_common
40 40
 from neutron.tests.common import net_helpers

+ 1
- 1
neutron/tests/functional/agent/linux/test_dhcp.py View File

@@ -15,11 +15,11 @@
15 15
 import mock
16 16
 from oslo_config import cfg
17 17
 
18
-from neutron.agent.common import config
19 18
 from neutron.agent.linux import dhcp
20 19
 from neutron.agent.linux import interface
21 20
 from neutron.agent.linux import ip_lib
22 21
 from neutron.common import utils as common_utils
22
+from neutron.conf.agent import common as config
23 23
 from neutron.conf.agent import dhcp as dhcp_conf
24 24
 from neutron.conf import common as common_conf
25 25
 from neutron.tests import base as tests_base

+ 1
- 1
neutron/tests/functional/agent/linux/test_ip_lib.py View File

@@ -23,10 +23,10 @@ from oslo_log import log as logging
23 23
 from oslo_utils import importutils
24 24
 import testtools
25 25
 
26
-from neutron.agent.common import config
27 26
 from neutron.agent.linux import interface
28 27
 from neutron.agent.linux import ip_lib
29 28
 from neutron.common import utils
29
+from neutron.conf.agent import common as config
30 30
 from neutron.tests.common import net_helpers
31 31
 from neutron.tests.functional import base as functional_base
32 32
 

+ 1
- 1
neutron/tests/functional/agent/test_dhcp_agent.py View File

@@ -24,7 +24,6 @@ from neutron_lib import constants as lib_const
24 24
 from oslo_config import fixture as fixture_config
25 25
 from oslo_utils import uuidutils
26 26
 
27
-from neutron.agent.common import config
28 27
 from neutron.agent.common import ovs_lib
29 28
 from neutron.agent.dhcp import agent
30 29
 from neutron.agent import dhcp_agent
@@ -34,6 +33,7 @@ from neutron.agent.linux import interface
34 33
 from neutron.agent.linux import ip_lib
35 34
 from neutron.agent.linux import utils
36 35
 from neutron.common import utils as common_utils
36
+from neutron.conf.agent import common as config
37 37
 from neutron.tests.common import net_helpers
38 38
 from neutron.tests.functional.agent.linux import helpers
39 39
 from neutron.tests.functional import base

+ 1
- 1
neutron/tests/functional/base.py View File

@@ -17,8 +17,8 @@ import os
17 17
 
18 18
 from oslo_config import cfg
19 19
 
20
-from neutron.agent.common import config
21 20
 from neutron.agent.linux import utils
21
+from neutron.conf.agent import common as config
22 22
 from neutron.tests import base
23 23
 from neutron.tests.common import base as common_base
24 24
 from neutron.tests.common import helpers

+ 1
- 1
neutron/tests/unit/agent/common/test_ovs_lib.py View File

@@ -21,9 +21,9 @@ from oslo_utils import uuidutils
21 21
 import tenacity
22 22
 import testtools
23 23
 
24
-from neutron.agent.common import config
25 24
 from neutron.agent.common import ovs_lib
26 25
 from neutron.agent.common import utils
26
+from neutron.conf.agent import common as config
27 27
 from neutron.plugins.common import constants
28 28
 from neutron.plugins.ml2.drivers.openvswitch.agent.common \
29 29
     import constants as p_const

+ 1
- 1
neutron/tests/unit/agent/common/test_utils.py View File

@@ -15,9 +15,9 @@
15 15
 
16 16
 import mock
17 17
 
18
-from neutron.agent.common import config
19 18
 from neutron.agent.common import utils
20 19
 from neutron.agent.linux import interface
20
+from neutron.conf.agent import common as config
21 21
 from neutron.tests import base
22 22
 from neutron.tests.unit import testlib_api
23 23
 

+ 1
- 1
neutron/tests/unit/agent/dhcp/test_agent.py View File

@@ -26,7 +26,6 @@ from oslo_config import cfg
26 26
 import oslo_messaging
27 27
 import testtools
28 28
 
29
-from neutron.agent.common import config
30 29
 from neutron.agent.dhcp import agent as dhcp_agent
31 30
 from neutron.agent import dhcp_agent as entry
32 31
 from neutron.agent.linux import dhcp
@@ -35,6 +34,7 @@ from neutron.agent.metadata import driver as metadata_driver
35 34
 from neutron.common import config as common_config
36 35
 from neutron.common import constants as n_const
37 36
 from neutron.common import utils
37
+from neutron.conf.agent import common as config
38 38
 from neutron.conf.agent import dhcp as dhcp_config
39 39
 from neutron.tests import base
40 40
 

+ 1
- 1
neutron/tests/unit/agent/l3/test_agent.py View File

@@ -30,7 +30,6 @@ from oslo_utils import uuidutils
30 30
 import six
31 31
 from testtools import matchers
32 32
 
33
-from neutron.agent.common import config as agent_config
34 33
 from neutron.agent.l3 import agent as l3_agent
35 34
 from neutron.agent.l3 import dvr_edge_router as dvr_router
36 35
 from neutron.agent.l3 import dvr_snat_ns
@@ -49,6 +48,7 @@ from neutron.agent.metadata import driver as metadata_driver
49 48
 from neutron.agent import rpc as agent_rpc
50 49
 from neutron.common import constants as n_const
51 50
 from neutron.common import exceptions as n_exc
51
+from neutron.conf.agent import common as agent_config
52 52
 from neutron.conf.agent.l3 import config as l3_config
53 53
 from neutron.conf.agent.l3 import ha as ha_conf
54 54
 from neutron.conf import common as base_config

+ 1
- 1
neutron/tests/unit/agent/l3/test_dvr_local_router.py View File

@@ -19,7 +19,6 @@ from oslo_config import cfg
19 19
 from oslo_log import log
20 20
 from oslo_utils import uuidutils
21 21
 
22
-from neutron.agent.common import config as agent_config
23 22
 from neutron.agent.l3 import agent as l3_agent
24 23
 from neutron.agent.l3 import dvr_local_router as dvr_router
25 24
 from neutron.agent.l3 import link_local_allocator as lla
@@ -29,6 +28,7 @@ from neutron.agent.linux import interface
29 28
 from neutron.agent.linux import ip_lib
30 29
 from neutron.common import constants as n_const
31 30
 from neutron.common import utils as common_utils
31
+from neutron.conf.agent import common as agent_config
32 32
 from neutron.conf.agent.l3 import config as l3_config
33 33
 from neutron.conf.agent.l3 import ha as ha_conf
34 34
 from neutron.conf import common as base_config

+ 2
- 2
neutron/tests/unit/agent/l3/test_router_info.py View File

@@ -14,10 +14,10 @@ import mock
14 14
 from neutron_lib import constants as lib_constants
15 15
 from oslo_utils import uuidutils
16 16
 
17
-from neutron.agent.common import config as agent_config
18 17
 from neutron.agent.l3 import router_info
19 18
 from neutron.agent.linux import ip_lib
20 19
 from neutron.common import exceptions as n_exc
20
+from neutron.conf.agent import common as config
21 21
 from neutron.tests import base
22 22
 
23 23
 
@@ -28,7 +28,7 @@ class TestRouterInfo(base.BaseTestCase):
28 28
     def setUp(self):
29 29
         super(TestRouterInfo, self).setUp()
30 30
 
31
-        conf = agent_config.setup_conf()
31
+        conf = config.setup_conf()
32 32
 
33 33
         self.ip_cls_p = mock.patch('neutron.agent.linux.ip_lib.IPWrapper')
34 34
         ip_cls = self.ip_cls_p.start()

+ 1
- 1
neutron/tests/unit/agent/linux/test_dhcp.py View File

@@ -23,10 +23,10 @@ import oslo_messaging
23 23
 from oslo_utils import fileutils
24 24
 import testtools
25 25
 
26
-from neutron.agent.common import config
27 26
 from neutron.agent.linux import dhcp
28 27
 from neutron.agent.linux import external_process
29 28
 from neutron.common import constants as n_const
29
+from neutron.conf.agent import common as config
30 30
 from neutron.conf.agent import dhcp as dhcp_config
31 31
 from neutron.conf import common as base_config
32 32
 from neutron.extensions import extra_dhcp_opt as edo_ext

+ 1
- 1
neutron/tests/unit/agent/linux/test_interface.py View File

@@ -16,11 +16,11 @@
16 16
 import mock
17 17
 from neutron_lib import constants
18 18
 
19
-from neutron.agent.common import config
20 19
 from neutron.agent.common import ovs_lib
21 20
 from neutron.agent.linux import interface
22 21
 from neutron.agent.linux import ip_lib
23 22
 from neutron.agent.linux import utils
23
+from neutron.conf.agent import common as config
24 24
 from neutron.tests import base
25 25
 
26 26
 

+ 2
- 2
neutron/tests/unit/agent/linux/test_iptables_firewall.py View File

@@ -21,7 +21,6 @@ from oslo_config import cfg
21 21
 import six
22 22
 import testtools
23 23
 
24
-from neutron.agent.common import config as a_cfg
25 24
 from neutron.agent import firewall
26 25
 from neutron.agent.linux import ip_conntrack
27 26
 from neutron.agent.linux import ipset_manager
@@ -29,6 +28,7 @@ from neutron.agent.linux import iptables_comments as ic
29 28
 from neutron.agent.linux import iptables_firewall
30 29
 from neutron.common import exceptions as n_exc
31 30
 from neutron.common import utils
31
+from neutron.conf.agent import common as agent_config
32 32
 from neutron.conf.agent import securitygroups_rpc as security_config
33 33
 from neutron.tests import base
34 34
 from neutron.tests.unit.api.v2 import test_base
@@ -71,8 +71,8 @@ COMMIT
71 71
 class BaseIptablesFirewallTestCase(base.BaseTestCase):
72 72
     def setUp(self):
73 73
         super(BaseIptablesFirewallTestCase, self).setUp()
74
-        cfg.CONF.register_opts(a_cfg.ROOT_HELPER_OPTS, 'AGENT')
75 74
         security_config.register_securitygroups_opts()
75
+        agent_config.register_root_helper(cfg.CONF)
76 76
         cfg.CONF.set_override('comment_iptables_rules', False, 'AGENT')
77 77
         self.utils_exec_p = mock.patch(
78 78
             'neutron.agent.linux.utils.execute')

+ 1
- 1
neutron/tests/unit/agent/metadata/test_driver.py View File

@@ -19,11 +19,11 @@ import mock
19 19
 from oslo_config import cfg
20 20
 from oslo_utils import uuidutils
21 21
 
22
-from neutron.agent.common import config as agent_config
23 22
 from neutron.agent.l3 import agent as l3_agent
24 23
 from neutron.agent.l3 import router_info
25 24
 from neutron.agent.metadata import driver as metadata_driver
26 25
 from neutron.common import constants
26
+from neutron.conf.agent import common as agent_config
27 27
 from neutron.conf.agent.l3 import config as l3_config
28 28
 from neutron.conf.agent.l3 import ha as ha_conf
29 29
 from neutron.conf.agent.metadata import config as meta_conf

+ 0
- 0
neutron/tests/unit/conf/agent/__init__.py View File


neutron/tests/unit/agent/common/test_config.py → neutron/tests/unit/conf/agent/test_common.py View File

@@ -13,7 +13,7 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
-from neutron.agent.common import config
16
+from neutron.conf.agent import common as config
17 17
 from neutron.tests import base
18 18
 
19 19
 

+ 1
- 1
neutron/tests/unit/debug/test_commands.py View File

@@ -18,9 +18,9 @@ import socket
18 18
 import mock
19 19
 from oslo_config import cfg
20 20
 
21
-from neutron.agent.common import config
22 21
 from neutron.agent.linux import interface
23 22
 from neutron.common import config as common_config
23
+from neutron.conf.agent import common as config
24 24
 from neutron.debug import commands
25 25
 from neutron.debug import debug_agent
26 26
 from neutron.extensions import portbindings

Loading…
Cancel
Save