Files
neutron/neutron/plugins/hyperv/agent/security_groups_driver.py
Gary Kotton 1b22c0e1ea Hyper-V: remove driver from the neutron tree
The hyperv drivers and code should be part of the networking-hyperv
project (https://github.com/openstack/networking-hyperv).

A few changes are necessary in order to prevent Hyper-V deployments from
breaking, especially when upgrading to Mitaka.

Hyper-V deployments are configured to use the in-branch HyperVSecurityGroupsDriver.
Removing it will cause the Hyper-V Neutron Agent to fail. If the agent is
configured to use the old driver, the networking_hyperv's driver must be used
instead and the users must be warned to update their configuration files to
use the networking_hyperv's security groups driver.

Removes the neutron-hyperv-agent entry point from setup.cfg.
Removes the hyperv mechanism_driver from setup.cfg
Moves the in-tree HyperVSecurityGroupsDriver to the networking_hyperv equivalent.
Logs a warning if the in-tree HyperVSecurityGroupsDriver is used.
Removes pywin32 and wmi requirements, as they've been included in networking_hyperv
and they are Hyper-V specific requirements.
Adds release note regarding the deprecated security groups driver.

Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>

Depends-On: I3a25f18b4f3a0621cb92b44eb61e434fa87e0aab

Change-Id: I32451cba6933e88306a4308a07f3f0d1b81f626c
Closes-bug: #1520054
2015-12-03 06:11:59 -08:00

35 lines
1.3 KiB
Python

#Copyright 2014 Cloudbase Solutions SRL
#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 debtcollector import moves
from hyperv.neutron import security_groups_driver as sg_driver
from oslo_log import log as logging
from neutron.i18n import _LW
LOG = logging.getLogger(__name__)
# TODO(claudiub): Remove this module at the beginning of the O cycle.
new_driver = 'hyperv.neutron.security_groups_driver.HyperVSecurityGroupsDriver'
LOG.warn(_LW("You are using the deprecated firewall driver: %(deprecated)s. "
"Use the recommended driver %(new)s instead."),
{'deprecated': '%s.HyperVSecurityGroupsDriver' % __name__,
'new': new_driver})
HyperVSecurityGroupsDriver = moves.moved_class(
sg_driver.HyperVSecurityGroupsDriver,
'HyperVSecurityGroupsDriver', __name__)