From 862de0d21f31fe1f9ad21ef5f13e183ec764c835 Mon Sep 17 00:00:00 2001 From: Kanzhe Jiang Date: Wed, 21 Oct 2015 22:09:36 -0700 Subject: [PATCH] Remove BigSwitch plugin and driver The BigSwitch Vendor plugin and driver are in openstack/networking-bigswitch repo and will be moved to Openstack bigtent. This patch removes the duplicated code and corresponding entry points. It also moves the bigswitch specific db tables to openstack/networking-bigswitch. Closes-Bug: #1508781 Change-Id: I180d93f3e7da347c9b042fcc3f79f19e9a471f52 --- etc/neutron/plugins/bigswitch/restproxy.ini | 114 ------------------ .../plugins/bigswitch/ssl/ca_certs/README | 3 - .../plugins/bigswitch/ssl/host_certs/README | 6 - .../migration/alembic_migrations/external.py | 10 +- neutron/db/migration/models/head.py | 2 - neutron/plugins/bigswitch/__init__.py | 0 neutron/plugins/bigswitch/agent/__init__.py | 0 .../bigswitch/agent/restproxy_agent.py | 25 ---- neutron/plugins/bigswitch/db/__init__.py | 0 .../plugins/bigswitch/db/consistency_db.py | 30 ----- neutron/plugins/bigswitch/l3_router_plugin.py | 28 ----- neutron/plugins/bigswitch/plugin.py | 24 ---- neutron/plugins/bigswitch/requirements.txt | 1 - neutron/plugins/bigswitch/routerrule_db.py | 38 ------ .../ml2/drivers/mech_bigswitch/__init__.py | 0 .../ml2/drivers/mech_bigswitch/driver.py | 18 --- .../drivers/mech_bigswitch/requirements.txt | 1 - setup.cfg | 10 -- 18 files changed, 9 insertions(+), 301 deletions(-) delete mode 100644 etc/neutron/plugins/bigswitch/restproxy.ini delete mode 100644 etc/neutron/plugins/bigswitch/ssl/ca_certs/README delete mode 100644 etc/neutron/plugins/bigswitch/ssl/host_certs/README delete mode 100644 neutron/plugins/bigswitch/__init__.py delete mode 100644 neutron/plugins/bigswitch/agent/__init__.py delete mode 100644 neutron/plugins/bigswitch/agent/restproxy_agent.py delete mode 100644 neutron/plugins/bigswitch/db/__init__.py delete mode 100644 neutron/plugins/bigswitch/db/consistency_db.py delete mode 100644 neutron/plugins/bigswitch/l3_router_plugin.py delete mode 100644 neutron/plugins/bigswitch/plugin.py delete mode 100644 neutron/plugins/bigswitch/requirements.txt delete mode 100644 neutron/plugins/bigswitch/routerrule_db.py delete mode 100644 neutron/plugins/ml2/drivers/mech_bigswitch/__init__.py delete mode 100644 neutron/plugins/ml2/drivers/mech_bigswitch/driver.py delete mode 100644 neutron/plugins/ml2/drivers/mech_bigswitch/requirements.txt diff --git a/etc/neutron/plugins/bigswitch/restproxy.ini b/etc/neutron/plugins/bigswitch/restproxy.ini deleted file mode 100644 index 256f7855b..000000000 --- a/etc/neutron/plugins/bigswitch/restproxy.ini +++ /dev/null @@ -1,114 +0,0 @@ -# Config file for neutron-proxy-plugin. - -[restproxy] -# All configuration for this plugin is in section '[restproxy]' -# -# The following parameters are supported: -# servers : [,]* (Error if not set) -# server_auth : (default: no auth) -# server_ssl : True | False (default: True) -# ssl_cert_directory : (default: /etc/neutron/plugins/bigswitch/ssl) -# no_ssl_validation : True | False (default: False) -# ssl_sticky : True | False (default: True) -# sync_data : True | False (default: False) -# auto_sync_on_failure : True | False (default: True) -# consistency_interval : (default: 60 seconds) -# server_timeout : (default: 10 seconds) -# neutron_id : (default: neutron-) -# add_meta_server_route : True | False (default: True) -# thread_pool_size : (default: 4) - -# A comma separated list of BigSwitch or Floodlight servers and port numbers. The plugin proxies the requests to the BigSwitch/Floodlight server, which performs the networking configuration. Note that only one server is needed per deployment, but you may wish to deploy multiple servers to support failover. -servers=localhost:8080 - -# The username and password for authenticating against the BigSwitch or Floodlight controller. -# server_auth=username:password - -# Use SSL when connecting to the BigSwitch or Floodlight controller. -# server_ssl=True - -# Directory which contains the ca_certs and host_certs to be used to validate -# controller certificates. -# ssl_cert_directory=/etc/neutron/plugins/bigswitch/ssl/ - -# If a certificate does not exist for a controller, trust and store the first -# certificate received for that controller and use it to validate future -# connections to that controller. -# ssl_sticky=True - -# Do not validate the controller certificates for SSL -# Warning: This will not provide protection against man-in-the-middle attacks -# no_ssl_validation=False - -# Sync data on connect -# sync_data=False - -# If neutron fails to create a resource because the backend controller -# doesn't know of a dependency, automatically trigger a full data -# synchronization to the controller. -# auto_sync_on_failure=True - -# Time between verifications that the backend controller -# database is consistent with Neutron. (0 to disable) -# consistency_interval = 60 - -# Maximum number of seconds to wait for proxy request to connect and complete. -# server_timeout=10 - -# User defined identifier for this Neutron deployment -# neutron_id = - -# Flag to decide if a route to the metadata server should be injected into the VM -# add_meta_server_route = True - -# Number of threads to use to handle large volumes of port creation requests -# thread_pool_size = 4 - -[nova] -# Specify the VIF_TYPE that will be controlled on the Nova compute instances -# options: ivs or ovs -# default: ovs -# vif_type = ovs - -# Overrides for vif types based on nova compute node host IDs -# Comma separated list of host IDs to fix to a specific VIF type -# The VIF type is taken from the end of the configuration item -# node_override_vif_ -# For example, the following would set the VIF type to IVS for -# host-id1 and host-id2 -# node_overrride_vif_ivs=host-id1,host-id2 - -[router] -# Specify the default router rules installed in newly created tenant routers -# Specify multiple times for multiple rules -# Format is ::: -# Optionally, a comma-separated list of nexthops may be included after -# Use an * to specify default for all tenants -# Default is any any allow for all tenants -# tenant_default_router_rule=*:any:any:permit - -# Maximum number of rules that a single router may have -# Default is 200 -# max_router_rules=200 - -[restproxyagent] - -# Specify the name of the bridge used on compute nodes -# for attachment. -# Default: br-int -# integration_bridge=br-int - -# Change the frequency of polling by the restproxy agent. -# Value is seconds -# Default: 5 -# polling_interval=5 - -# Virtual switch type on the compute node. -# Options: ovs or ivs -# Default: ovs -# virtual_switch_type = ovs - -[securitygroup] -# Controls if neutron security group is enabled or not. -# It should be false when you use nova security group. -# enable_security_group = True diff --git a/etc/neutron/plugins/bigswitch/ssl/ca_certs/README b/etc/neutron/plugins/bigswitch/ssl/ca_certs/README deleted file mode 100644 index e7e47a27c..000000000 --- a/etc/neutron/plugins/bigswitch/ssl/ca_certs/README +++ /dev/null @@ -1,3 +0,0 @@ -Certificates in this folder will be used to -verify signatures for any controllers the plugin -connects to. diff --git a/etc/neutron/plugins/bigswitch/ssl/host_certs/README b/etc/neutron/plugins/bigswitch/ssl/host_certs/README deleted file mode 100644 index 8f5f5e77c..000000000 --- a/etc/neutron/plugins/bigswitch/ssl/host_certs/README +++ /dev/null @@ -1,6 +0,0 @@ -Certificates in this folder must match the name -of the controller they should be used to authenticate -with a .pem extension. - -For example, the certificate for the controller -"192.168.0.1" should be named "192.168.0.1.pem". diff --git a/neutron/db/migration/alembic_migrations/external.py b/neutron/db/migration/alembic_migrations/external.py index a0c7215fd..c81e0a302 100644 --- a/neutron/db/migration/alembic_migrations/external.py +++ b/neutron/db/migration/alembic_migrations/external.py @@ -100,8 +100,16 @@ REPO_NEC_TABLES = [ 'packetfilters', ] +# BigSwitch models are in openstack/networking-bigswitch +REPO_BIGSWITCH_TABLES = [ + 'consistencyhashes', + 'routerrules', + 'nexthops', +] + TABLES = (FWAAS_TABLES + LBAAS_TABLES + VPNAAS_TABLES + REPO_ARISTA_TABLES + REPO_CISCO_TABLES + REPO_VMWARE_TABLES + - REPO_NEC_TABLES) + REPO_NEC_TABLES + + REPO_BIGSWITCH_TABLES) diff --git a/neutron/db/migration/models/head.py b/neutron/db/migration/models/head.py index 1a490e46a..fbc7bf27b 100644 --- a/neutron/db/migration/models/head.py +++ b/neutron/db/migration/models/head.py @@ -47,8 +47,6 @@ from neutron.db import rbac_db_models # noqa from neutron.db import securitygroups_db # noqa from neutron.db import servicetype_db # noqa from neutron.ipam.drivers.neutrondb_ipam import db_models # noqa -from neutron.plugins.bigswitch.db import consistency_db # noqa -from neutron.plugins.bigswitch import routerrule_db # noqa from neutron.plugins.brocade.db import models as brocade_models # noqa from neutron.plugins.ml2.drivers.brocade.db import ( # noqa models as ml2_brocade_models) diff --git a/neutron/plugins/bigswitch/__init__.py b/neutron/plugins/bigswitch/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/neutron/plugins/bigswitch/agent/__init__.py b/neutron/plugins/bigswitch/agent/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/neutron/plugins/bigswitch/agent/restproxy_agent.py b/neutron/plugins/bigswitch/agent/restproxy_agent.py deleted file mode 100644 index c11f6bea7..000000000 --- a/neutron/plugins/bigswitch/agent/restproxy_agent.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2014 Big Switch Networks, Inc. -# All Rights Reserved. -# -# Copyright 2011 VMware, Inc. -# All Rights Reserved. -# -# 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. -import eventlet -eventlet.monkey_patch() - -from bsnstacklib.plugins.bigswitch.agent import restproxy_agent - - -if __name__ == "__main__": - restproxy_agent.main() diff --git a/neutron/plugins/bigswitch/db/__init__.py b/neutron/plugins/bigswitch/db/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/neutron/plugins/bigswitch/db/consistency_db.py b/neutron/plugins/bigswitch/db/consistency_db.py deleted file mode 100644 index 0067e423b..000000000 --- a/neutron/plugins/bigswitch/db/consistency_db.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2014, Big Switch Networks -# All Rights Reserved. -# -# 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. -import sqlalchemy as sa - -from neutron.db import model_base - - -class ConsistencyHash(model_base.BASEV2): - ''' - A simple table to store the latest consistency hash - received from a server. - For now we only support one global state so the - hash_id will always be '1' - ''' - __tablename__ = 'consistencyhashes' - hash_id = sa.Column(sa.String(255), - primary_key=True) - hash = sa.Column(sa.String(255), nullable=False) diff --git a/neutron/plugins/bigswitch/l3_router_plugin.py b/neutron/plugins/bigswitch/l3_router_plugin.py deleted file mode 100644 index 2fb1cedd5..000000000 --- a/neutron/plugins/bigswitch/l3_router_plugin.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2014 Big Switch Networks, Inc. -# All Rights Reserved. -# -# 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. -# - -""" -Neutron L3 REST Proxy Plugin for Big Switch and Floodlight Controllers. - -This plugin handles the L3 router calls for Big Switch Floodlight deployments. -It is intended to be used in conjunction with the Big Switch ML2 driver or the -Big Switch core plugin. -""" - -from bsnstacklib.plugins.bigswitch import l3_router_plugin - - -L3RestProxy = l3_router_plugin.L3RestProxy diff --git a/neutron/plugins/bigswitch/plugin.py b/neutron/plugins/bigswitch/plugin.py deleted file mode 100644 index 5c8cdfd57..000000000 --- a/neutron/plugins/bigswitch/plugin.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2012 Big Switch Networks, Inc. -# All Rights Reserved. -# -# 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. - -""" -Neutron REST Proxy Plug-in for Big Switch and FloodLight Controllers. - -See http://github.com/openstack/networking-bigswitch for more information -""" -from bsnstacklib.plugins.bigswitch import plugin - - -NeutronRestProxyV2 = plugin.NeutronRestProxyV2 diff --git a/neutron/plugins/bigswitch/requirements.txt b/neutron/plugins/bigswitch/requirements.txt deleted file mode 100644 index ecbbce6fe..000000000 --- a/neutron/plugins/bigswitch/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -bsnstacklib>=2015.1,<2015.2 diff --git a/neutron/plugins/bigswitch/routerrule_db.py b/neutron/plugins/bigswitch/routerrule_db.py deleted file mode 100644 index 75835994d..000000000 --- a/neutron/plugins/bigswitch/routerrule_db.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2013, Big Switch Networks -# All Rights Reserved. -# -# 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. - -import sqlalchemy as sa -from sqlalchemy import orm - -from neutron.db import model_base - - -class RouterRule(model_base.BASEV2): - id = sa.Column(sa.Integer, primary_key=True) - source = sa.Column(sa.String(64), nullable=False) - destination = sa.Column(sa.String(64), nullable=False) - nexthops = orm.relationship('NextHop', cascade='all,delete') - action = sa.Column(sa.String(10), nullable=False) - router_id = sa.Column(sa.String(36), - sa.ForeignKey('routers.id', - ondelete="CASCADE")) - - -class NextHop(model_base.BASEV2): - rule_id = sa.Column(sa.Integer, - sa.ForeignKey('routerrules.id', - ondelete="CASCADE"), - primary_key=True) - nexthop = sa.Column(sa.String(64), nullable=False, primary_key=True) diff --git a/neutron/plugins/ml2/drivers/mech_bigswitch/__init__.py b/neutron/plugins/ml2/drivers/mech_bigswitch/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py b/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py deleted file mode 100644 index 7a07acdd6..000000000 --- a/neutron/plugins/ml2/drivers/mech_bigswitch/driver.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2014 Big Switch Networks, Inc. -# All Rights Reserved. -# -# 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 bsnstacklib.plugins.ml2.drivers.mech_bigswitch import driver - - -BigSwitchMechanismDriver = driver.BigSwitchMechanismDriver diff --git a/neutron/plugins/ml2/drivers/mech_bigswitch/requirements.txt b/neutron/plugins/ml2/drivers/mech_bigswitch/requirements.txt deleted file mode 100644 index ecbbce6fe..000000000 --- a/neutron/plugins/ml2/drivers/mech_bigswitch/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -bsnstacklib>=2015.1,<2015.2 diff --git a/setup.cfg b/setup.cfg index 1fa527645..6f08553e1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,12 +41,6 @@ data_files = etc/neutron/rootwrap.d/l3.filters etc/neutron/rootwrap.d/linuxbridge-plugin.filters etc/neutron/rootwrap.d/openvswitch-plugin.filters - etc/neutron/plugins/bigswitch = - etc/neutron/plugins/bigswitch/restproxy.ini - etc/neutron/plugins/bigswitch/ssl/ca_certs = - etc/neutron/plugins/bigswitch/ssl/ca_certs/README - etc/neutron/plugins/bigswitch/ssl/host_certs = - etc/neutron/plugins/bigswitch/ssl/host_certs/README etc/neutron/plugins/brocade = etc/neutron/plugins/brocade/brocade.ini etc/neutron/plugins/brocade/brocade_mlx.ini @@ -54,7 +48,6 @@ data_files = etc/neutron/plugins/cisco = etc/neutron/plugins/cisco/cisco_vpn_agent.ini etc/neutron/plugins/ml2 = - etc/neutron/plugins/bigswitch/restproxy.ini etc/neutron/plugins/ml2/linuxbridge_agent.ini etc/neutron/plugins/ml2/ml2_conf.ini etc/neutron/plugins/ml2/ml2_conf_brocade.ini @@ -85,7 +78,6 @@ console_scripts = neutron-openvswitch-agent = neutron.cmd.eventlet.plugins.ovs_neutron_agent:main neutron-ovs-cleanup = neutron.cmd.ovs_cleanup:main neutron-pd-notify = neutron.cmd.pd_notify:main - neutron-restproxy-agent = neutron.plugins.bigswitch.agent.restproxy_agent:main neutron-server = neutron.cmd.eventlet.server:main_wsgi_eventlet neutron-dev-server = neutron.cmd.eventlet.server:main_wsgi_pecan neutron-rpc-server = neutron.cmd.eventlet.server:main_rpc_eventlet @@ -96,14 +88,12 @@ console_scripts = neutron-sriov-nic-agent = neutron.plugins.ml2.drivers.mech_sriov.agent.sriov_nic_agent:main neutron-sanity-check = neutron.cmd.sanity_check:main neutron.core_plugins = - bigswitch = neutron.plugins.bigswitch.plugin:NeutronRestProxyV2 brocade = neutron.plugins.brocade.NeutronPlugin:BrocadePluginV2 ml2 = neutron.plugins.ml2.plugin:Ml2Plugin nuage = neutron.plugins.nuage.plugin:NuagePlugin neutron.service_plugins = dummy = neutron.tests.unit.dummy_plugin:DummyServicePlugin router = neutron.services.l3_router.l3_router_plugin:L3RouterPlugin - bigswitch_l3 = neutron.plugins.bigswitch.l3_router_plugin:L3RestProxy brocade_vyatta_l3 = neutron.services.l3_router.brocade.vyatta.vrouter_neutron_plugin:VyattaVRouterPlugin brocade_mlx_l3 = neutron.services.l3_router.brocade.mlx.l3_router_plugin:BrocadeRouterPlugin firewall = neutron_fwaas.services.firewall.fwaas_plugin:FirewallPlugin -- 2.45.2