Merge "Remove the "fake" and "fake_soft_power" classic drivers"

This commit is contained in:
Zuul 2018-06-09 00:53:27 +00:00 committed by Gerrit Code Review
commit 30a9872cf6
9 changed files with 18 additions and 46 deletions

View File

@ -157,7 +157,12 @@ if [[ -n "$IRONIC_DEFAULT_API_VERSION" ]]; then
fi
# driver / hardware type options
IRONIC_ENABLED_DRIVERS=${IRONIC_ENABLED_DRIVERS:-fake,pxe_ipmitool,agent_ipmitool}
IRONIC_ENABLED_DRIVERS=${IRONIC_ENABLED_DRIVERS:-pxe_ipmitool,agent_ipmitool}
# NOTE(dtantsur): some places (I'm looking at you, devstack-gate) still
# hardcode "fake", and we cannot fix them without breaking stable branches.
# This ugly hack is only needed until we delete IRONIC_ENABLED_DRIVERS
# in the near future.
IRONIC_ENABLED_DRIVERS=$(echo $IRONIC_ENABLED_DRIVERS | sed -r 's/fake,?//')
IRONIC_ENABLED_HARDWARE_TYPES=${IRONIC_ENABLED_HARDWARE_TYPES:-"ipmi,fake-hardware"}
# list of all available driver interfaces types
IRONIC_DRIVER_INTERFACE_TYPES="bios boot power management deploy console inspect raid rescue storage network vendor"

View File

@ -0,0 +1,5 @@
function configure_ironic_upgrade {
# Remove the fake driver from the configuration (forced by devstack-gate)
drivers=$(iniget $IRONIC_CONF_FILE DEFAULT enabled_drivers | sed -r 's/fake,?//')
iniset $IRONIC_CONF_FILE DEFAULT enabled_drivers $drivers
}

View File

@ -843,7 +843,7 @@ Configuring and Enabling the driver
3. Add ``pxe_ilo`` to the list of ``enabled_drivers`` in
``/etc/ironic/ironic.conf``. For example:::
enabled_drivers = fake,pxe_ipmitool,pxe_ilo
enabled_drivers = pxe_ipmitool,pxe_ilo
4. Restart the ironic conductor service::

View File

@ -284,7 +284,7 @@ Configuring and enabling the driver
1. Add ``agent_pxe_oneview`` to the list of ``enabled_drivers`` in your
``ironic.conf``. For example::
enabled_drivers = fake,pxe_ipmitool,agent_pxe_oneview
enabled_drivers = pxe_ipmitool,agent_pxe_oneview
2. Update the [oneview] section of your ``ironic.conf`` file with your
OneView credentials and CA certificate files information.

View File

@ -46,42 +46,6 @@ from ironic.drivers.modules import pxe
from ironic.drivers.modules import snmp
from ironic.drivers.modules.ucs import management as ucs_mgmt
from ironic.drivers.modules.ucs import power as ucs_power
from ironic.drivers import utils
class FakeDriver(base.BaseDriver):
"""Example implementation of a Driver."""
def __init__(self):
self.power = fake.FakePower()
self.deploy = fake.FakeDeploy()
self.boot = fake.FakeBoot()
self.a = fake.FakeVendorA()
self.b = fake.FakeVendorB()
self.mapping = {'first_method': self.a,
'second_method': self.b,
'third_method_sync': self.b,
'fourth_method_shared_lock': self.b}
self.vendor = utils.MixinVendorInterface(self.mapping)
self.console = fake.FakeConsole()
self.management = fake.FakeManagement()
self.inspect = fake.FakeInspect()
self.raid = fake.FakeRAID()
@classmethod
def to_hardware_type(cls):
return 'fake-hardware', {
iface: 'fake'
for iface in ['bios', 'boot', 'console', 'deploy', 'inspect',
'management', 'power', 'raid', 'rescue', 'vendor']
}
class FakeSoftPowerDriver(FakeDriver):
"""Example implementation of a Driver."""
# NOTE(dtantsur): identical to FakeDriver now, will be removed with other
# classic drivers
class FakeIPMIToolDriver(base.BaseDriver):

View File

@ -60,10 +60,6 @@ class FakePower(base.PowerInterface):
states.SOFT_REBOOT, states.SOFT_POWER_OFF]
# NOTE(dtantsur): for backward compatibility
FakeSoftPower = FakePower
class FakeBoot(base.BootInterface):
"""Example implementation of a simple boot interface."""

View File

@ -71,7 +71,6 @@
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEFAULT_DEPLOY_INTERFACE=direct"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_ENABLE_TEMPURLS=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_TEMPURL_KEY=secretkey"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_ENABLED_DRIVERS=fake"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_AUTOMATED_CLEAN_ENABLED=False"
# NOTE(pas-ha) ansible deploy is new in Queens,

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The deprecated classic drivers ``fake`` and ``fake_soft_power`` were
removed. Please use the ``fake-hardware`` hardware type instead.

View File

@ -59,8 +59,6 @@ ironic.drivers =
agent_irmc = ironic.drivers.irmc:IRMCVirtualMediaAgentDriver
agent_pxe_oneview = ironic.drivers.oneview:AgentPXEOneViewDriver
agent_ucs = ironic.drivers.agent:AgentAndUcsDriver
fake = ironic.drivers.fake:FakeDriver
fake_soft_power = ironic.drivers.fake:FakeSoftPowerDriver
fake_agent = ironic.drivers.fake:FakeAgentDriver
fake_inspector = ironic.drivers.fake:FakeIPMIToolInspectorDriver
fake_ipmitool = ironic.drivers.fake:FakeIPMIToolDriver