From: Romil Gupta Date: Mon, 19 Oct 2015 13:17:04 +0000 (-0700) Subject: Remove SUPPORTED_AGENT_TYPES for l2pop X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=07aa19b2236976229971b13e9ece80b862d298b2;p=openstack-build%2Fneutron-build.git Remove SUPPORTED_AGENT_TYPES for l2pop In a world where agents can be out of tree, this check seems no longer necessary. As part of networking-vsphere project which runs ovsvapp agent on each ESXi host inside service VM, which talk to neutron-server having l2pop enabled in a multi-hypervisor mode like KVM, ESXi. The tunnels are not getting established between KVM compute node and ESXi host. The l2pop mech_driver needs to embrace ovsvapp agent to form the tunnels. Hence, this patch-set addresses the issue by removing the SUPPORTED_AGENT_TYPES for l2pop. Closes-Bug: #1507684 Change-Id: I93ca5736e4aad41b851d2b7b082b4bb69d1632fb --- diff --git a/neutron/plugins/ml2/drivers/l2pop/constants.py b/neutron/plugins/ml2/drivers/l2pop/constants.py deleted file mode 100644 index c12ab3c02..000000000 --- a/neutron/plugins/ml2/drivers/l2pop/constants.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2013 OpenStack Foundation. -# 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 neutron.common import constants - -SUPPORTED_AGENT_TYPES = [constants.AGENT_TYPE_OVS, - constants.AGENT_TYPE_LINUXBRIDGE, - constants.AGENT_TYPE_OFA] diff --git a/neutron/plugins/ml2/drivers/l2pop/db.py b/neutron/plugins/ml2/drivers/l2pop/db.py index 3cdfb1dd9..8023434c4 100644 --- a/neutron/plugins/ml2/drivers/l2pop/db.py +++ b/neutron/plugins/ml2/drivers/l2pop/db.py @@ -20,7 +20,6 @@ from neutron.common import constants as const from neutron.db import agents_db from neutron.db import common_db_mixin as base_db from neutron.db import models_v2 -from neutron.plugins.ml2.drivers.l2pop import constants as l2_const from neutron.plugins.ml2 import models as ml2_models @@ -50,9 +49,7 @@ class L2populationDbMixin(base_db.CommonDbMixin): def get_agent_by_host(self, session, agent_host): with session.begin(subtransactions=True): query = session.query(agents_db.Agent) - query = query.filter(agents_db.Agent.host == agent_host, - agents_db.Agent.agent_type.in_( - l2_const.SUPPORTED_AGENT_TYPES)) + query = query.filter(agents_db.Agent.host == agent_host) return query.first() def _get_active_network_ports(self, session, network_id): @@ -65,9 +62,7 @@ class L2populationDbMixin(base_db.CommonDbMixin): query = query.join(models_v2.Port) query = query.filter(models_v2.Port.network_id == network_id, models_v2.Port.status == - const.PORT_STATUS_ACTIVE, - agents_db.Agent.agent_type.in_( - l2_const.SUPPORTED_AGENT_TYPES)) + const.PORT_STATUS_ACTIVE) return query def get_nondvr_active_network_ports(self, session, network_id): @@ -87,9 +82,7 @@ class L2populationDbMixin(base_db.CommonDbMixin): models_v2.Port.status == const.PORT_STATUS_ACTIVE, models_v2.Port.device_owner == - const.DEVICE_OWNER_DVR_INTERFACE, - agents_db.Agent.agent_type.in_( - l2_const.SUPPORTED_AGENT_TYPES)) + const.DEVICE_OWNER_DVR_INTERFACE) return query def get_agent_network_active_port_count(self, session, agent_host,