diff --git a/devstack/lib/ironic b/devstack/lib/ironic index fdb85994d6..aa3d99722a 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -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" diff --git a/devstack/upgrade/from-queens/upgrade-ironic b/devstack/upgrade/from-queens/upgrade-ironic new file mode 100644 index 0000000000..15ca9a9974 --- /dev/null +++ b/devstack/upgrade/from-queens/upgrade-ironic @@ -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 +} diff --git a/doc/source/admin/drivers/ilo.rst b/doc/source/admin/drivers/ilo.rst index 9b8d810d20..b0269381ab 100644 --- a/doc/source/admin/drivers/ilo.rst +++ b/doc/source/admin/drivers/ilo.rst @@ -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:: diff --git a/doc/source/admin/drivers/oneview.rst b/doc/source/admin/drivers/oneview.rst index 6e2d18dde6..eac1e47dcc 100644 --- a/doc/source/admin/drivers/oneview.rst +++ b/doc/source/admin/drivers/oneview.rst @@ -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. diff --git a/ironic/drivers/fake.py b/ironic/drivers/fake.py index 6793d448e5..c59a5002f4 100644 --- a/ironic/drivers/fake.py +++ b/ironic/drivers/fake.py @@ -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): diff --git a/ironic/drivers/modules/fake.py b/ironic/drivers/modules/fake.py index 62f9599492..b6b5c10eeb 100644 --- a/ironic/drivers/modules/fake.py +++ b/ironic/drivers/modules/fake.py @@ -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.""" diff --git a/playbooks/legacy/ironic-dsvm-standalone/run.yaml b/playbooks/legacy/ironic-dsvm-standalone/run.yaml index 3834625e37..dc5686acc0 100644 --- a/playbooks/legacy/ironic-dsvm-standalone/run.yaml +++ b/playbooks/legacy/ironic-dsvm-standalone/run.yaml @@ -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, diff --git a/releasenotes/notes/no-fake-308b50d4ab83ca7a.yaml b/releasenotes/notes/no-fake-308b50d4ab83ca7a.yaml new file mode 100644 index 0000000000..e183949425 --- /dev/null +++ b/releasenotes/notes/no-fake-308b50d4ab83ca7a.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The deprecated classic drivers ``fake`` and ``fake_soft_power`` were + removed. Please use the ``fake-hardware`` hardware type instead. diff --git a/setup.cfg b/setup.cfg index fd1a8cadda..735020679d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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