Merge "Remove deprecated method build_instance_info_for_deploy()"

This commit is contained in:
Jenkins 2017-04-05 16:58:30 +00:00 committed by Gerrit Code Review
commit 4444a7c456
3 changed files with 8 additions and 22 deletions
ironic
drivers/modules
tests/unit/drivers/modules
releasenotes/notes

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

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

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