Browse Source

Merge "Remove mentions of the iSCSI deploy"

master
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
944ca03d36
7 changed files with 8 additions and 100 deletions
  1. +1
    -1
      doc/source/drivers/amt.rst
  2. +0
    -31
      ironic_staging_drivers/amt/deploy.py
  3. +1
    -2
      ironic_staging_drivers/amt/drivers.py
  4. +0
    -62
      ironic_staging_drivers/tests/unit/amt/test_deploy.py
  5. +1
    -1
      ironic_staging_drivers/tests/unit/amt/utils.py
  6. +5
    -0
      releasenotes/notes/no-iscsi-39f0b7c366889512.yaml
  7. +0
    -3
      setup.cfg

+ 1
- 1
doc/source/drivers/amt.rst View File

@ -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


+ 0
- 31
ironic_staging_drivers/amt/deploy.py View File

@ -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)

+ 1
- 2
ironic_staging_drivers/amt/drivers.py View File

@ -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):


+ 0
- 62
ironic_staging_drivers/tests/unit/amt/test_deploy.py View File

@ -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)

+ 1
- 1
ironic_staging_drivers/tests/unit/amt/utils.py View File

@ -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,


+ 5
- 0
releasenotes/notes/no-iscsi-39f0b7c366889512.yaml View File

@ -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.

+ 0
- 3
setup.cfg View File

@ -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


Loading…
Cancel
Save