diff --git a/doc/source/drivers/amt.rst b/doc/source/drivers/amt.rst index a505359..1c26f1c 100644 --- a/doc/source/drivers/amt.rst +++ b/doc/source/drivers/amt.rst @@ -63,7 +63,7 @@ A short guide follows below: [DEFAULT] enabled_hardware_types = staging-amt,ipmi - enabled_deploy_interfaces = staging-amt,iscsi,direct + enabled_deploy_interfaces = direct enabled_management_interfaces = staging-amt,ipmitool enabled_power_interfaces = staging-amt,ipmitool diff --git a/ironic_staging_drivers/amt/deploy.py b/ironic_staging_drivers/amt/deploy.py deleted file mode 100644 index 378d903..0000000 --- a/ironic_staging_drivers/amt/deploy.py +++ /dev/null @@ -1,31 +0,0 @@ -# -# 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. -""" -AMT Vendor Methods -""" - -from ironic.common import boot_devices -from ironic.conductor import task_manager -from ironic.drivers.modules import deploy_utils -from ironic.drivers.modules import iscsi_deploy - - -class AMTISCSIDeploy(iscsi_deploy.ISCSIDeploy): - """AMT-specific version of ISCSIDeploy driver interface""" - - @task_manager.require_exclusive_lock - def continue_deploy(self, task): - if deploy_utils.get_boot_option(task.node) == "netboot": - task.driver.management.ensure_next_boot_device(task.node, - boot_devices.PXE) - super(AMTISCSIDeploy, self).continue_deploy(task) diff --git a/ironic_staging_drivers/amt/drivers.py b/ironic_staging_drivers/amt/drivers.py index 449fc1c..ad80148 100644 --- a/ironic_staging_drivers/amt/drivers.py +++ b/ironic_staging_drivers/amt/drivers.py @@ -16,7 +16,6 @@ from ironic.drivers import generic from ironic.drivers.modules import agent -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 @@ -30,7 +29,7 @@ class AMTHardware(generic.GenericHardware): @property def supported_deploy_interfaces(self): """List of supported deploy interfaces.""" - return [amt_deploy.AMTISCSIDeploy, agent.AgentDeploy] + return [agent.AgentDeploy] @property def supported_management_interfaces(self): diff --git a/ironic_staging_drivers/tests/unit/amt/test_deploy.py b/ironic_staging_drivers/tests/unit/amt/test_deploy.py deleted file mode 100644 index 392294c..0000000 --- a/ironic_staging_drivers/tests/unit/amt/test_deploy.py +++ /dev/null @@ -1,62 +0,0 @@ -# -# 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. - -"""Test class for AMT Deploy methods.""" - -from unittest import mock - -from ironic.common import boot_devices -from ironic.common import states -from ironic.conductor import task_manager -from ironic.drivers.modules import iscsi_deploy - -from ironic_staging_drivers.amt import management as amt_mgmt -from ironic_staging_drivers.tests.unit.amt import utils as test_utils - - -class AMTISCSIDeployTestCase(test_utils.BaseAMTTest): - - deploy_interface = 'staging-amt' - - @mock.patch.object(amt_mgmt.AMTManagement, 'ensure_next_boot_device', - spec_set=True, autospec=True) - @mock.patch.object(iscsi_deploy.ISCSIDeploy, 'continue_deploy', - spec_set=True, autospec=True) - def test_continue_deploy_netboot(self, mock_continue, mock_ensure): - with task_manager.acquire(self.context, self.node.uuid, - shared=False) as task: - task.node.provision_state = states.DEPLOYWAIT - task.node.target_provision_state = states.ACTIVE - task.node.instance_info['capabilities'] = { - "boot_option": "netboot" - } - task.driver.deploy.continue_deploy(task) - mock_ensure.assert_called_with( - task.driver.management, task.node, boot_devices.PXE) - mock_continue.assert_called_once_with( - task.driver.deploy, task) - - @mock.patch.object(amt_mgmt.AMTManagement, 'ensure_next_boot_device', - spec_set=True, autospec=True) - @mock.patch.object(iscsi_deploy.ISCSIDeploy, 'continue_deploy', - spec_set=True, autospec=True) - def test_continue_deploy_localboot(self, mock_continue, mock_ensure): - with task_manager.acquire(self.context, self.node.uuid, - shared=False) as task: - task.node.provision_state = states.DEPLOYWAIT - task.node.target_provision_state = states.ACTIVE - task.node.instance_info['capabilities'] = {"boot_option": "local"} - task.driver.deploy.continue_deploy(task,) - self.assertFalse(mock_ensure.called) - mock_continue.assert_called_once_with( - task.driver.deploy, task) diff --git a/ironic_staging_drivers/tests/unit/amt/utils.py b/ironic_staging_drivers/tests/unit/amt/utils.py index b947388..4a35ece 100644 --- a/ironic_staging_drivers/tests/unit/amt/utils.py +++ b/ironic_staging_drivers/tests/unit/amt/utils.py @@ -90,7 +90,7 @@ class BaseAMTTest(db_base.DbTestCase): self.config(enabled_hardware_types=['staging-amt'], enabled_power_interfaces=['staging-amt'], enabled_management_interfaces=['staging-amt'], - enabled_deploy_interfaces=['staging-amt', 'direct']) + enabled_deploy_interfaces=['direct']) self.info = get_test_amt_info() self.node = obj_utils.create_test_node( self.context, diff --git a/releasenotes/notes/no-iscsi-39f0b7c366889512.yaml b/releasenotes/notes/no-iscsi-39f0b7c366889512.yaml new file mode 100644 index 0000000..3326097 --- /dev/null +++ b/releasenotes/notes/no-iscsi-39f0b7c366889512.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The custom ``amt-staging`` deploy interface has been removed. It was based + on the deprecated ``iscsi`` deploy. Use ``direct`` instead. diff --git a/setup.cfg b/setup.cfg index 0bf3945..95f84b5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,9 +24,6 @@ packages = ironic_staging_drivers [entry_points] -ironic.hardware.interfaces.deploy = - staging-amt = ironic_staging_drivers.amt.deploy:AMTISCSIDeploy - ironic.hardware.interfaces.management = staging-amt = ironic_staging_drivers.amt.management:AMTManagement staging-libvirt = ironic_staging_drivers.libvirt.power:LibvirtManagement