Deprecate classic drivers
this patch deprecates classic drivers defined by ironic_staging_drivers package in favor of hardware types. A proper warning is shown on classic drivers init. DevStack plugin no longer enables any classic driver from staging drivers, and only hardware types are tested. Change-Id: Ic53b71c94287804f3c66f5e9a6249f605c234211
This commit is contained in:
parent
fff783fed1
commit
7cbb03074d
@ -46,17 +46,8 @@ function update_ironic_enabled_drivers {
|
||||
# NOTE(vsaienko) if ironic-staging-drivers are called after ironic
|
||||
# setting IRONIC_ENABLED_* will not take affect. Update ironic
|
||||
# configuration explicitly for each option.
|
||||
local staging_drivers
|
||||
local staging_hw_types
|
||||
|
||||
staging_drivers=$($IRONIC_STAGING_LIST_EP_CMD -t ironic.drivers)
|
||||
if [[ -z "$IRONIC_ENABLED_DRIVERS" ]]; then
|
||||
IRONIC_ENABLED_DRIVERS="$staging_drivers"
|
||||
else
|
||||
IRONIC_ENABLED_DRIVERS+=",$staging_drivers"
|
||||
fi
|
||||
iniset $IRONIC_CONF_FILE DEFAULT enabled_drivers "$IRONIC_ENABLED_DRIVERS"
|
||||
|
||||
# hardware types
|
||||
staging_hw_types=$($IRONIC_STAGING_LIST_EP_CMD -t ironic.hardware.types)
|
||||
if [[ -z "$IRONIC_ENABLED_HARDWARE_TYPES" ]]; then
|
||||
|
@ -19,13 +19,17 @@ from ironic.drivers import generic
|
||||
from ironic.drivers.modules import agent
|
||||
from ironic.drivers.modules import fake
|
||||
from ironic.drivers.modules import pxe
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
|
||||
|
||||
from ironic_staging_drivers.amt import deploy as amt_deploy
|
||||
from ironic_staging_drivers.amt import management as amt_management
|
||||
from ironic_staging_drivers.amt import power as amt_power
|
||||
from ironic_staging_drivers.common.i18n import _
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# NOTE(lintan) There is a strange behavior for tox if put below classes
|
||||
# in __init__.py. It will reload pywsman and set it to None. So place
|
||||
@ -50,7 +54,11 @@ class PXEAndAMTISCSIDriver(base.BaseDriver):
|
||||
deployment. Implementations are in those respective classes; this
|
||||
class is merely the glue between them.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-amt' hardware type instead.")
|
||||
if not importutils.try_import('pywsman'):
|
||||
raise ironic_exception.DriverLoadError(
|
||||
driver=self.__class__.__name__,
|
||||
@ -71,7 +79,11 @@ class PXEAndAMTAgentDriver(base.BaseDriver):
|
||||
deployment. Implementations are in those respective classes; this
|
||||
class is merely the glue between them.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-amt' hardware type instead.")
|
||||
if not importutils.try_import('pywsman'):
|
||||
raise ironic_exception.DriverLoadError(
|
||||
driver=self.__class__.__name__,
|
||||
|
@ -15,15 +15,21 @@ from ironic.drivers import ipmi
|
||||
from ironic.drivers.modules import fake
|
||||
from ironic.drivers.modules import ipmitool
|
||||
from ironic.drivers.modules import pxe
|
||||
from oslo_log import log as logging
|
||||
|
||||
from ironic_staging_drivers.ansible import deploy as ansible_deploy
|
||||
from ironic_staging_drivers.libvirt import power as libvirt_power
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AnsibleAndIPMIToolDriver(base.BaseDriver):
|
||||
"""Ansible + Ipmitool driver."""
|
||||
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-ansible-ipmi' hardware type instead.")
|
||||
self.power = ipmitool.IPMIPower()
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.deploy = ansible_deploy.AnsibleDeploy()
|
||||
@ -48,6 +54,9 @@ class AnsibleAndLibvirtDriver(base.BaseDriver):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-libvirt' hardware type instead.")
|
||||
self.power = libvirt_power.LibvirtPower()
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.deploy = ansible_deploy.AnsibleDeploy()
|
||||
|
@ -22,10 +22,13 @@ from ironic.drivers.modules import agent
|
||||
from ironic.drivers.modules import fake
|
||||
from ironic.drivers.modules import iscsi_deploy
|
||||
from ironic.drivers.modules import pxe
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
|
||||
from ironic_staging_drivers.iboot import power as iboot_power
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FakeIBootFakeDriver(base.BaseDriver):
|
||||
"""Fake iBoot driver."""
|
||||
@ -51,6 +54,9 @@ class PXEIBootISCSIDriver(base.BaseDriver):
|
||||
this class is merely the glue between them.
|
||||
"""
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-iboot' hardware type instead.")
|
||||
if not importutils.try_import('iboot'):
|
||||
raise ironic_exception.DriverLoadError(
|
||||
driver=self.__class__.__name__,
|
||||
@ -71,6 +77,9 @@ class PXEIBootAgentDriver(base.BaseDriver):
|
||||
this class is merely the glue between them.
|
||||
"""
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-iboot' hardware type instead.")
|
||||
if not importutils.try_import('iboot'):
|
||||
raise ironic_exception.DriverLoadError(
|
||||
driver=self.__class__.__name__,
|
||||
|
@ -18,9 +18,12 @@ from ironic.drivers.modules import inspector
|
||||
from ironic.drivers.modules import ipmitool
|
||||
from ironic.drivers.modules import pxe
|
||||
from ironic.drivers import utils
|
||||
from oslo_log import log as logging
|
||||
|
||||
from ironic_staging_drivers.intel_nm import nm_vendor
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FakeIntelNMDriver(base.BaseDriver):
|
||||
"""Fake Intel NM driver."""
|
||||
@ -34,6 +37,9 @@ class FakeIntelNMDriver(base.BaseDriver):
|
||||
class AgentAndIPMIToolIntelNMDriver(base.BaseDriver):
|
||||
"""Agent + IPMITool driver with Intel NM policies."""
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-nm' hardware type instead.")
|
||||
self.power = ipmitool.IPMIPower()
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.deploy = agent.AgentDeploy()
|
||||
|
@ -16,10 +16,13 @@ from ironic.drivers.modules import agent
|
||||
from ironic.drivers.modules import fake
|
||||
from ironic.drivers.modules import iscsi_deploy
|
||||
from ironic.drivers.modules import pxe
|
||||
from oslo_log import log as logging
|
||||
|
||||
from ironic_staging_drivers.ansible import deploy as ansible_deploy
|
||||
from ironic_staging_drivers.libvirt import power
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FakeLibvirtFakeDriver(base.BaseDriver):
|
||||
"""Example implementation of a Driver."""
|
||||
@ -44,6 +47,9 @@ class PXELibvirtAgentDriver(base.BaseDriver):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-libvirt' hardware type instead.")
|
||||
self.power = power.LibvirtPower()
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.deploy = agent.AgentDeploy()
|
||||
@ -63,6 +69,9 @@ class PXELibvirtISCSIDriver(base.BaseDriver):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-libvirt' hardware type instead.")
|
||||
self.power = power.LibvirtPower()
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.deploy = iscsi_deploy.ISCSIDeploy()
|
||||
|
@ -19,9 +19,12 @@ from ironic.drivers.modules import agent
|
||||
from ironic.drivers.modules import fake
|
||||
from ironic.drivers.modules import iscsi_deploy
|
||||
from ironic.drivers.modules import pxe
|
||||
from oslo_log import log as logging
|
||||
|
||||
from ironic_staging_drivers.wol import power as wol_power
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FakeWakeOnLanFakeDriver(base.BaseDriver):
|
||||
"""Fake Wake-On-Lan driver."""
|
||||
@ -44,6 +47,9 @@ class PXEWakeOnLanISCSIDriver(base.BaseDriver):
|
||||
|
||||
"""
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-wol' hardware type instead.")
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.power = wol_power.WakeOnLanPower()
|
||||
self.deploy = iscsi_deploy.ISCSIDeploy()
|
||||
@ -61,6 +67,9 @@ class PXEWakeOnLanAgentDriver(base.BaseDriver):
|
||||
|
||||
"""
|
||||
def __init__(self):
|
||||
LOG.warning("This driver is deprecated and will be removed "
|
||||
"in the Rocky release. "
|
||||
"Use 'staging-wol' hardware type instead.")
|
||||
self.boot = pxe.PXEBoot()
|
||||
self.power = wol_power.WakeOnLanPower()
|
||||
self.deploy = agent.AgentDeploy()
|
||||
|
@ -0,0 +1,20 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
Classic ironic drivers defined by ``ironic-staging-drivers`` package
|
||||
are deprecated and will be removed in the Rocky release.
|
||||
Operators are suggested to use new, dynamic ironic drivers (hardware types)
|
||||
instead::
|
||||
|
||||
- ``pxe_amt_iscsi`` -> ``staging-amt`` hw type with ``staging-amt`` deploy interface
|
||||
- ``pxe_amt_agent`` -> ``staging-amt`` hw type with ``direct`` deploy interface
|
||||
- ``pxe_ipmitool_ansible`` -> ``staging-ansible-ipmi`` hw type with ``staging-ansible`` deploy interface
|
||||
- ``pxe_libvirt_ansible`` -> ``staging-libvirt`` hw type with ``staging-ansible`` deploy interface
|
||||
- ``pxe_iboot_agent`` -> ``staging-iboot`` hw type with ``direct`` deploy interface
|
||||
- ``pxe_iboot_iscsi`` -> ``staging-iboot`` hw type with ``iscsi`` deploy interface
|
||||
- ``agent_ipmitool_nm`` -> ``staging-nm`` hw type with ``staging-nm`` vendor interface
|
||||
- ``pxe_libvirt_agent`` -> ``staging-libvirt`` hw type with ``direct`` deploy interface
|
||||
- ``pxe_libvirt_iscsi`` -> ``staging-libvirt`` hw type with ``iscsi`` deploy interface
|
||||
- ``pxe_wol_iscsi`` -> ``staging-wol`` hw type with ``iscsi`` deploy interface
|
||||
- ``pxe_wol_agent`` -> ``staging-wol`` hw type with ``direct`` deploy interface
|
||||
|
Loading…
Reference in New Issue
Block a user