]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Move mlnx agent to be under ml2/drivers/mlnx
authorMoshe Levi <moshele@mellanox.com>
Sun, 8 Mar 2015 13:24:45 +0000 (15:24 +0200)
committerMoshe Levi <moshele@mellanox.com>
Mon, 16 Mar 2015 14:27:13 +0000 (16:27 +0200)
* move the mlnx agent to be under ml2/drivers/mlnx
* update the main entry point to be under cmd
* remove unused vnic_type parameter in agent config

Partially-implements: blueprint core-vendor-decomposition

Change-Id: Ibbb99de3124d5d81bbccbc06b33ce32b19c1daef

etc/neutron/plugins/mlnx/mlnx_conf.ini
neutron/cmd/eventlet/plugins/mlnx_neutron_agent.py [new file with mode: 0644]
neutron/plugins/ml2/drivers/mlnx/README [moved from neutron/plugins/mlnx/README with 72% similarity]
neutron/plugins/ml2/drivers/mlnx/agent/__init__.py [moved from neutron/plugins/mlnx/__init__.py with 100% similarity]
neutron/plugins/ml2/drivers/mlnx/agent/config.py [moved from neutron/plugins/mlnx/agent/config.py with 87% similarity]
neutron/plugins/ml2/drivers/mlnx/agent/eswitch_neutron_agent.py [moved from neutron/plugins/mlnx/agent/eswitch_neutron_agent.py with 91% similarity]
neutron/plugins/ml2/drivers/mlnx/requirements.txt
neutron/plugins/mlnx/agent/__init__.py [deleted file]
setup.cfg

index 552971aed11b5f346b98c330b3acc07e4a9d29a4..1eb7c7c6ddd70f454fd5a46d9b367c554b55f77d 100644 (file)
@@ -9,9 +9,6 @@
 # physical_interface_mappings =
 # Example: physical_interface_mappings = default:eth2
 
-# (StrOpt) Type of Network Interface to allocate for VM:
-# direct or hosdev according to libvirt terminology
-# vnic_type = mlnx_direct
 
 # (StrOpt) Eswitch daemon end point connection url
 # daemon_endpoint = 'tcp://127.0.0.1:60001'
diff --git a/neutron/cmd/eventlet/plugins/mlnx_neutron_agent.py b/neutron/cmd/eventlet/plugins/mlnx_neutron_agent.py
new file mode 100644 (file)
index 0000000..5a3394a
--- /dev/null
@@ -0,0 +1,19 @@
+#    Copyright 2015 Mellanox Technologies, Ltd
+#
+#    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 neutron.plugins.ml2.drivers.mlnx.agent import eswitch_neutron_agent
+
+
+def main():
+    eswitch_neutron_agent.main()
similarity index 72%
rename from neutron/plugins/mlnx/README
rename to neutron/plugins/ml2/drivers/mlnx/README
index e94c5216a1c753b7ad72ba391931168e0f906d11..10fcabae9172221ec6dfb87d9f2349cca5691110 100644 (file)
@@ -1,4 +1,4 @@
-The Neutron Mellanox plugin has removed from the tree in Kilo.
+The Neutron Mellanox plugin has been removed from the tree in Kilo.
 This directory includes Mellanox L2 agent for MLNX mechanism driver.
 For more details, please refer to the following link:
 https://wiki.openstack.org/wiki/Mellanox-Neutron-ML2
\ No newline at end of file
similarity index 87%
rename from neutron/plugins/mlnx/agent/config.py
rename to neutron/plugins/ml2/drivers/mlnx/agent/config.py
index 341553834ecbd7f019e6fa6fbebec35567ad404a..3a022a9bbb3d8272979b1ac573d17951d469143e 100644 (file)
@@ -13,7 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from networking_mlnx.plugins.mlnx.agent import constants
 from oslo_config import cfg
 
 from neutron.agent.common import config
@@ -24,10 +23,6 @@ eswitch_opts = [
     cfg.ListOpt('physical_interface_mappings',
                 default=DEFAULT_INTERFACE_MAPPINGS,
                 help=_("List of <physical_network>:<physical_interface>")),
-    cfg.StrOpt('vnic_type',
-               default=constants.VIF_TYPE_DIRECT,
-               choices=(constants.VIF_TYPE_DIRECT, constants.VIF_TYPE_HOSTDEV),
-               help=_("Type of VM network interface")),
     cfg.StrOpt('daemon_endpoint',
                default='tcp://127.0.0.1:60001',
                help=_('eswitch daemon end point')),
similarity index 91%
rename from neutron/plugins/mlnx/agent/eswitch_neutron_agent.py
rename to neutron/plugins/ml2/drivers/mlnx/agent/eswitch_neutron_agent.py
index 688d7bebf2019caeccd0688f623c23fa052a0d38..046c495e35fb0983597797b14d100c259804d6c1 100644 (file)
 
 import sys
 
-from networking_mlnx.plugins.mlnx.agent import mlnx_eswitch_neutron_agent
+from networking_mlnx.plugins.ml2.drivers.mlnx.agent import (
+    mlnx_eswitch_neutron_agent)
 from oslo_config import cfg
 from oslo_log import log as logging
 
 from neutron.i18n import _LE, _LI
 from neutron.common import config as common_config
 from neutron.common import utils
-from neutron.plugins.mlnx.agent import config  # noqa
+from neutron.plugins.ml2.drivers.mlnx.agent import config  # noqa
 
 LOG = logging.getLogger(__name__)
 
index 0165a4cb7dba8d23e78cf164c1c58c70edb5f7af..dacc9e9103849fc115e8b98264f69e7788fb21b9 100644 (file)
@@ -1,6 +1 @@
-# The order of packages is significant, because pip processes them in the
-# order
-# of appearance. Changing the order has an impact on the overall integration
-# process, which may cause wedges in the gate later.
-
 networking_mlnx
diff --git a/neutron/plugins/mlnx/agent/__init__.py b/neutron/plugins/mlnx/agent/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
index 126fa549debc2194e63e932a3aa2a904044638c1..a446c015e00c1eabd013d77998968d704c9dc0ab 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -96,7 +96,7 @@ console_scripts =
     neutron-l3-agent = neutron.cmd.eventlet.agents.l3:main
     neutron-linuxbridge-agent = neutron.plugins.linuxbridge.agent.linuxbridge_neutron_agent:main
     neutron-metadata-agent = neutron.cmd.eventlet.agents.metadata:main
-    neutron-mlnx-agent = neutron.plugins.mlnx.agent.eswitch_neutron_agent:main
+    neutron-mlnx-agent = neutron.cmd.eventlet.plugins.mlnx_neutron_agent:main
     neutron-nec-agent = neutron.cmd.eventlet.plugins.nec_neutron_agent:main
     neutron-netns-cleanup = neutron.cmd.netns_cleanup:main
     neutron-ns-metadata-proxy = neutron.cmd.eventlet.agents.metadata_proxy:main