]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Final decomposition of Cisco plugin
authorShweta P <shpadubi@cisco.com>
Thu, 27 Aug 2015 20:53:13 +0000 (16:53 -0400)
committerHenry Gessau <gessau@cisco.com>
Sat, 5 Sep 2015 04:59:08 +0000 (04:59 +0000)
This patch follows the previous patch(listed as dependent) and moves
the remaining cisco db models from neutron to networking-cisco.
The patch deletes l3_model and cisco_router_plugin and their associated
config and helper files from neutron

Change-Id: I5b71e1dfb683e633e1cd11386dfb7c2ed7cc7d62
Partial-Bug: #1489609

16 files changed:
etc/neutron/plugins/cisco/cisco_cfg_agent.ini [deleted file]
etc/neutron/plugins/cisco/cisco_router_plugin.ini [deleted file]
neutron/db/migration/alembic_migrations/cisco_init_ops.py
neutron/db/migration/alembic_migrations/external.py
neutron/db/migration/models/head.py
neutron/plugins/cisco/__init__.py [deleted file]
neutron/plugins/cisco/common/__init__.py [deleted file]
neutron/plugins/cisco/common/cisco_constants.py [deleted file]
neutron/plugins/cisco/db/__init__.py [deleted file]
neutron/plugins/cisco/db/l3/__init__.py [deleted file]
neutron/plugins/cisco/db/l3/l3_models.py [deleted file]
neutron/plugins/cisco/service_plugins/__init__.py [deleted file]
neutron/plugins/cisco/service_plugins/cisco_router_plugin.py [deleted file]
neutron/plugins/cisco/service_plugins/requirements.txt [deleted file]
setup.cfg
tools/check_unit_test_structure.sh

diff --git a/etc/neutron/plugins/cisco/cisco_cfg_agent.ini b/etc/neutron/plugins/cisco/cisco_cfg_agent.ini
deleted file mode 100644 (file)
index d99e838..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[cfg_agent]
-# (IntOpt) Interval in seconds for processing of service updates.
-# That is when the config agent's process_services() loop executes
-# and it lets each service helper to process its service resources.
-# rpc_loop_interval = 10
-
-# (StrOpt) Period-separated module path to the routing service helper class.
-# routing_svc_helper_class = neutron.plugins.cisco.cfg_agent.service_helpers.routing_svc_helper.RoutingServiceHelper
-
-# (IntOpt) Timeout value in seconds for connecting to a hosting device.
-# device_connection_timeout = 30
-
-# (IntOpt) The time in seconds until a backlogged hosting device is
-# presumed dead or booted to an error state.
-# hosting_device_dead_timeout = 300
diff --git a/etc/neutron/plugins/cisco/cisco_router_plugin.ini b/etc/neutron/plugins/cisco/cisco_router_plugin.ini
deleted file mode 100644 (file)
index 3ef271d..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-[general]
-#(IntOpt) Time in seconds between renewed scheduling attempts of non-scheduled routers
-# backlog_processing_interval = 10
-
-#(StrOpt) Name of the L3 admin tenant
-# l3_admin_tenant = L3AdminTenant
-
-#(StrOpt) Name of management network for hosting device configuration
-# management_network = osn_mgmt_nw
-
-#(StrOpt) Default security group applied on management port
-# default_security_group = mgmt_sec_grp
-
-#(IntOpt) Seconds of no status update until a cfg agent is considered down
-# cfg_agent_down_time = 60
-
-#(StrOpt) Path to templates for hosting devices
-# templates_path = /opt/stack/data/neutron/cisco/templates
-
-#(StrOpt) Path to config drive files for service VM instances
-# service_vm_config_path = /opt/stack/data/neutron/cisco/config_drive
-
-#(BoolOpt) Ensure that Nova is running before attempting to create any VM
-# ensure_nova_running = True
-
-[hosting_devices]
-# Settings coupled to CSR1kv VM devices
-# -------------------------------------
-#(StrOpt) Name of Glance image for CSR1kv
-# csr1kv_image = csr1kv_openstack_img
-
-#(StrOpt) UUID of Nova flavor for CSR1kv
-# csr1kv_flavor = 621
-
-#(StrOpt) Plugging driver for CSR1kv
-# csr1kv_plugging_driver = neutron.plugins.cisco.l3.plugging_drivers.n1kv_trunking_driver.N1kvTrunkingPlugDriver
-
-#(StrOpt) Hosting device driver for CSR1kv
-# csr1kv_device_driver = neutron.plugins.cisco.l3.hosting_device_drivers.csr1kv_hd_driver.CSR1kvHostingDeviceDriver
-
-#(StrOpt) Config agent router service driver for CSR1kv
-# csr1kv_cfgagent_router_driver = neutron.plugins.cisco.cfg_agent.device_drivers.csr1kv.csr1kv_routing_driver.CSR1kvRoutingDriver
-
-#(StrOpt) Configdrive template file for CSR1kv
-# csr1kv_configdrive_template = csr1kv_cfg_template
-
-#(IntOpt) Booting time in seconds before a CSR1kv becomes operational
-# csr1kv_booting_time = 420
-
-#(StrOpt) Username to use for CSR1kv configurations
-# csr1kv_username = stack
-
-#(StrOpt) Password to use for CSR1kv configurations
-# csr1kv_password = cisco
-
-[n1kv]
-# Settings coupled to inter-working with N1kv plugin
-# --------------------------------------------------
-#(StrOpt) Name of N1kv port profile for management ports
-# management_port_profile = osn_mgmt_pp
-
-#(StrOpt) Name of N1kv port profile for T1 ports (i.e., ports carrying traffic
-# from VXLAN segmented networks).
-# t1_port_profile = osn_t1_pp
-
-#(StrOpt) Name of N1kv port profile for T2 ports (i.e., ports carrying traffic
-# from VLAN segmented networks).
-# t2_port_profile = osn_t2_pp
-
-#(StrOpt) Name of N1kv network profile for T1 networks (i.e., trunk networks
-# for VXLAN segmented traffic).
-# t1_network_profile = osn_t1_np
-
-#(StrOpt) Name of N1kv network profile for T2 networks (i.e., trunk networks
-# for VLAN segmented traffic).
-# t2_network_profile = osn_t2_np
index 3c99f7b933e5038bcc65be778b49cb06dcd8e74c..9df1bccc182b6d3414bb242373e5aeae77100093 100644 (file)
@@ -18,8 +18,6 @@
 from alembic import op
 import sqlalchemy as sa
 
-from neutron.plugins.cisco.common import cisco_constants
-
 segment_type = sa.Enum('vlan', 'overlay', 'trunk', 'multi-segment',
                        name='segment_type')
 profile_type = sa.Enum('network', 'policy', name='profile_type')
@@ -93,7 +91,7 @@ def upgrade():
         'cisco_n1kv_profile_bindings',
         sa.Column('profile_type', profile_type, nullable=True),
         sa.Column('tenant_id', sa.String(length=36), nullable=False,
-                  server_default=cisco_constants.TENANT_ID_NOT_SET),
+                  server_default='TENANT_ID_NOT_SET'),
         sa.Column('profile_id', sa.String(length=36), nullable=False),
         sa.PrimaryKeyConstraint('tenant_id', 'profile_id'))
 
index cd63c2f72263d3c05a2754ee413fb1a129d80f80..49855b82f5095e87d764ad41fc8f6da476837b61 100644 (file)
@@ -48,6 +48,9 @@ REPO_CISCO_TABLES = [
     'ml2_nexus_vxlan_allocations',
     'ml2_nexus_vxlan_mcast_groups',
     'ml2_ucsm_port_profiles',
+    'cisco_hosting_devices',
+    'cisco_port_mappings',
+    'cisco_router_mappings',
 ]
 
 # VMware-NSX models moved to openstack/vmware-nsx
index c4ca5e2f3ac6556ad875fa946dc15df2b6ecaf3c..1a490e46affaf29689af7bf040f4c758988a424c 100644 (file)
@@ -50,7 +50,6 @@ 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.cisco.db.l3 import l3_models  # noqa
 from neutron.plugins.ml2.drivers.brocade.db import (  # noqa
     models as ml2_brocade_models)
 from neutron.plugins.ml2.drivers import type_flat  # noqa
diff --git a/neutron/plugins/cisco/__init__.py b/neutron/plugins/cisco/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/neutron/plugins/cisco/common/__init__.py b/neutron/plugins/cisco/common/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/neutron/plugins/cisco/common/cisco_constants.py b/neutron/plugins/cisco/common/cisco_constants.py
deleted file mode 100644 (file)
index 43e6e46..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2011 Cisco Systems, 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.
-
-
-TENANT_ID_NOT_SET = 'TENANT_ID_NOT_SET'
-
-# Type and topic for Cisco cfg agent
-# ==================================
-AGENT_TYPE_CFG = 'Cisco cfg agent'
-
-# Topic for Cisco configuration agent
-CFG_AGENT = 'cisco_cfg_agent'
-# Topic for routing service helper in Cisco configuration agent
-CFG_AGENT_L3_ROUTING = 'cisco_cfg_agent_l3_routing'
diff --git a/neutron/plugins/cisco/db/__init__.py b/neutron/plugins/cisco/db/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/neutron/plugins/cisco/db/l3/__init__.py b/neutron/plugins/cisco/db/l3/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/neutron/plugins/cisco/db/l3/l3_models.py b/neutron/plugins/cisco/db/l3/l3_models.py
deleted file mode 100644 (file)
index 62a0dee..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 2014 Cisco Systems, 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 sqlalchemy as sa
-from sqlalchemy import orm
-
-from neutron.db import agents_db
-from neutron.db import l3_db
-from neutron.db import model_base
-from neutron.db import models_v2
-
-
-class HostingDevice(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):
-    """Represents an appliance hosting Neutron router(s).
-
-       When the hosting device is a Nova VM 'id' is uuid of that VM.
-    """
-    __tablename__ = 'cisco_hosting_devices'
-
-    # complementary id to enable identification of associated Neutron resources
-    complementary_id = sa.Column(sa.String(36))
-    # manufacturer id of the device, e.g., its serial number
-    device_id = sa.Column(sa.String(255))
-    admin_state_up = sa.Column(sa.Boolean, nullable=False, default=True)
-    # 'management_port_id' is the Neutron Port used for management interface
-    management_port_id = sa.Column(sa.String(36),
-                                   sa.ForeignKey('ports.id',
-                                                 ondelete="SET NULL"))
-    management_port = orm.relationship(models_v2.Port)
-    # 'protocol_port' is udp/tcp port of hosting device. May be empty.
-    protocol_port = sa.Column(sa.Integer)
-    cfg_agent_id = sa.Column(sa.String(36),
-                             sa.ForeignKey('agents.id'),
-                             nullable=True)
-    cfg_agent = orm.relationship(agents_db.Agent)
-    # Service VMs take time to boot so we store creation time
-    # so we can give preference to older ones when scheduling
-    created_at = sa.Column(sa.DateTime, nullable=False)
-    status = sa.Column(sa.String(16))
-
-
-class HostedHostingPortBinding(model_base.BASEV2):
-    """Represents binding of logical resource's port to its hosting port."""
-    __tablename__ = 'cisco_port_mappings'
-
-    logical_resource_id = sa.Column(sa.String(36), primary_key=True)
-    logical_port_id = sa.Column(sa.String(36),
-                                sa.ForeignKey('ports.id',
-                                              ondelete="CASCADE"),
-                                primary_key=True)
-    logical_port = orm.relationship(
-        models_v2.Port,
-        primaryjoin='Port.id==HostedHostingPortBinding.logical_port_id',
-        backref=orm.backref('hosting_info', cascade='all', uselist=False))
-    # type of hosted port, e.g., router_interface, ..._gateway, ..._floatingip
-    port_type = sa.Column(sa.String(32))
-    # type of network the router port belongs to
-    network_type = sa.Column(sa.String(32))
-    hosting_port_id = sa.Column(sa.String(36),
-                                sa.ForeignKey('ports.id',
-                                              ondelete='CASCADE'))
-    hosting_port = orm.relationship(
-        models_v2.Port,
-        primaryjoin='Port.id==HostedHostingPortBinding.hosting_port_id')
-    # VLAN tag for trunk ports
-    segmentation_id = sa.Column(sa.Integer, autoincrement=False)
-
-
-class RouterHostingDeviceBinding(model_base.BASEV2):
-    """Represents binding between Neutron routers and their hosting devices."""
-    __tablename__ = 'cisco_router_mappings'
-
-    router_id = sa.Column(sa.String(36),
-                          sa.ForeignKey('routers.id', ondelete='CASCADE'),
-                          primary_key=True)
-    router = orm.relationship(
-        l3_db.Router,
-        backref=orm.backref('hosting_info', cascade='all', uselist=False))
-    # If 'auto_schedule' is True then router is automatically scheduled
-    # if it lacks a hosting device or its hosting device fails.
-    auto_schedule = sa.Column(sa.Boolean, default=True, nullable=False)
-    # id of hosting device hosting this router, None/NULL if unscheduled.
-    hosting_device_id = sa.Column(sa.String(36),
-                                  sa.ForeignKey('cisco_hosting_devices.id',
-                                                ondelete='SET NULL'))
-    hosting_device = orm.relationship(HostingDevice)
diff --git a/neutron/plugins/cisco/service_plugins/__init__.py b/neutron/plugins/cisco/service_plugins/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/neutron/plugins/cisco/service_plugins/cisco_router_plugin.py b/neutron/plugins/cisco/service_plugins/cisco_router_plugin.py
deleted file mode 100644 (file)
index 783578a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2015 Cisco Systems, 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 networking_cisco.plugins.cisco.service_plugins import cisco_router_plugin
-
-
-class CiscoRouterPluginRpcCallbacks(
-    cisco_router_plugin.CiscoRouterPluginRpcCallbacks):
-    pass
-
-
-class CiscoRouterPlugin(cisco_router_plugin.CiscoRouterPlugin):
-    pass
diff --git a/neutron/plugins/cisco/service_plugins/requirements.txt b/neutron/plugins/cisco/service_plugins/requirements.txt
deleted file mode 100644 (file)
index ef631a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-networking-cisco
index 6015ced5a9d2aae26d729d3bb47d3b3b0d2ec7c6..f1e2db29dd48f9cab7024ee59cf827035bf00193 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -51,8 +51,6 @@ data_files =
         etc/neutron/plugins/brocade/brocade_mlx.ini
     etc/neutron/plugins/brocade/vyatta = etc/neutron/plugins/brocade/vyatta/vrouter.ini
     etc/neutron/plugins/cisco =
-        etc/neutron/plugins/cisco/cisco_cfg_agent.ini
-        etc/neutron/plugins/cisco/cisco_router_plugin.ini
         etc/neutron/plugins/cisco/cisco_vpn_agent.ini
     etc/neutron/plugins/embrane = etc/neutron/plugins/embrane/heleos_conf.ini
     etc/neutron/plugins/midonet = etc/neutron/plugins/midonet/midonet.ini
index 191c86a8aec5edfe162de44dc5cc8612b2e28c32..b5304c8d181e478e7c447ca925d2f12d56a155ca 100755 (executable)
@@ -14,7 +14,6 @@ ignore_regexes=(
     # The following vendor plugins are not required to confrm to the
     # structural requirements.
     "^plugins/brocade.*$"
-    "^plugins/cisco.*$"
     "^plugins/embrane.*$"
     "^plugins/ibm.*$"
     "^plugins/oneconvergence.*$"