Remove deprecated method build_instance_info_for_deploy()

The method build_instance_info_for_deploy in
ironic.drivers.modules.agent was deprecated in the Ocata cycle
(7.0.0). It is no longer supported. The method
build_instance_info_for_deploy() from
ironic.drivers.modules.deploy_utils should be used instead.

Change-Id: I88dfb0b84709ca3545bb4d4384bfad58ec2eb0a0
Closes-Bug: #1678902
This commit is contained in:
Shivanand Tendulker 2017-04-03 05:11:12 -04:00
parent fe47326a1f
commit d6ccfb0e9e
3 changed files with 8 additions and 22 deletions

View File

@ -68,17 +68,6 @@ PARTITION_IMAGE_LABELS = ('kernel', 'ramdisk', 'root_gb', 'root_mb', 'swap_mb',
'deploy_boot_mode')
def build_instance_info_for_deploy(task):
# TODO(pas-ha) remove this in Pike cycle
LOG.warning(_LW("This function has moved to "
"'ironic.drivers.modules.deploy_utils' module. "
"Using it from 'ironic.drivers.modules.agent' module "
"is deprecated and will be removed in the Pike release. "
"Please update your driver to use this function "
"from its new location."))
return deploy_utils.build_instance_info_for_deploy(task)
@METRICS.timer('check_image_size')
def check_image_size(task, image_source):
"""Check if the requested image is larger than the ram size.

View File

@ -51,17 +51,6 @@ class TestAgentMethods(db_base.DbTestCase):
driver='fake_agent')
dhcp_factory.DHCPFactory._dhcp_provider = None
@mock.patch.object(agent.LOG, 'warning', autospec=True)
@mock.patch.object(deploy_utils, 'build_instance_info_for_deploy',
autospec=True)
def test_build_instance_info_for_deploy_warn(self, build_mock, warn_mock):
mgr_utils.mock_the_extension_manager(driver='fake_agent')
with task_manager.acquire(
self.context, self.node.uuid, shared=False) as task:
agent.build_instance_info_for_deploy(task)
build_mock.assert_called_once_with(task)
self.assertTrue(warn_mock.called)
@mock.patch.object(images, 'image_show', autospec=True)
def test_check_image_size(self, show_mock):
show_mock.return_value = {

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
The method build_instance_info_for_deploy() from
ironic.drivers.modules.agent was deprecated in Ocata cycle (7.0.0).
It is no longer supported. Please use the method
build_instance_info_for_deploy() from ironic.drivers.modules.deploy_utils
instead.