Refactoring config options for plugin macvtap opts

Refactoring neutron ml2 plugin macvtap driver config opts to be in
neutron/conf/plugins/ml2/drivers/macvtap so that all the
configuration options for macvtap drivers reside in a centralized
location. This simplifies the process of looking up the macvtap driver
config opts and provides an easy way to import.

Change-Id: I1768eefb9eadcea19bcb675cbd96a6cb728b4123
Partial-Bug: #1563069
changes/65/352565/12
Anindita Das 6 years ago committed by Kevin Benton
parent cffe2cd1ac
commit 5e1c3c705e
  1. 3
      neutron/conf/plugins/ml2/drivers/macvtap.py
  2. 4
      neutron/opts.py
  3. 4
      neutron/plugins/ml2/drivers/macvtap/agent/macvtap_neutron_agent.py

@ -34,4 +34,5 @@ macvtap_opts = [
]
cfg.CONF.register_opts(macvtap_opts, "macvtap")
def register_macvtap_opts(cfg=cfg.CONF):
cfg.register_opts(macvtap_opts, "macvtap")

@ -35,6 +35,7 @@ import neutron.conf.extensions.allowedaddresspairs
import neutron.conf.plugins.ml2.drivers.agent
import neutron.conf.plugins.ml2.drivers.driver_type
import neutron.conf.plugins.ml2.drivers.linuxbridge
import neutron.conf.plugins.ml2.drivers.macvtap
import neutron.conf.quota
import neutron.conf.service
import neutron.conf.services.metering_agent
@ -52,7 +53,6 @@ import neutron.db.migration.cli
import neutron.extensions.l3
import neutron.extensions.securitygroup
import neutron.plugins.ml2.config
import neutron.plugins.ml2.drivers.macvtap.agent.config
import neutron.plugins.ml2.drivers.mech_sriov.agent.common.config
import neutron.plugins.ml2.drivers.openvswitch.agent.common.config
import neutron.wsgi
@ -206,7 +206,7 @@ def list_l3_agent_opts():
def list_macvtap_opts():
return [
('macvtap',
neutron.plugins.ml2.drivers.macvtap.agent.config.macvtap_opts),
neutron.conf.plugins.ml2.drivers.macvtap.macvtap_opts),
('agent',
neutron.conf.plugins.ml2.drivers.agent.agent_opts),
('securitygroup',

@ -29,10 +29,10 @@ from neutron.agent.linux import ip_lib
from neutron.api.rpc.handlers import securitygroups_rpc as sg_rpc
from neutron.common import config as common_config
from neutron.common import topics
from neutron.conf.plugins.ml2.drivers import macvtap as config
from neutron.plugins.common import constants as p_constants
from neutron.plugins.ml2.drivers.agent import _agent_manager_base as amb
from neutron.plugins.ml2.drivers.agent import _common_agent as ca
from neutron.plugins.ml2.drivers.macvtap.agent import config # noqa
from neutron.plugins.ml2.drivers.macvtap import macvtap_common
LOG = logging.getLogger(__name__)
@ -41,6 +41,8 @@ MACVTAP_AGENT_BINARY = "neutron-macvtap-agent"
MACVTAP_FS = "/sys/class/net/"
EXTENSION_DRIVER_TYPE = 'macvtap'
config.register_macvtap_opts()
class MacvtapRPCCallBack(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
amb.CommonAgentManagerRpcCallBackBase):

Loading…
Cancel
Save