From 85869a134b9acdaa5ea05aec92dad12a015c13b6 Mon Sep 17 00:00:00 2001 From: vmud213 Date: Thu, 11 May 2017 12:19:31 +0000 Subject: [PATCH] Remove unused function _configdrive_location This function is never used and can be removed safely. Change-Id: Ied7b4984185ea170d33cb57010de89edeaaaeec5 Closes-Bug: #1690135 --- ironic_python_agent/extensions/standby.py | 8 -------- ironic_python_agent/tests/unit/extensions/test_standby.py | 8 -------- 2 files changed, 16 deletions(-) diff --git a/ironic_python_agent/extensions/standby.py b/ironic_python_agent/extensions/standby.py index 78c562ace..fa597de8a 100644 --- a/ironic_python_agent/extensions/standby.py +++ b/ironic_python_agent/extensions/standby.py @@ -34,14 +34,6 @@ LOG = log.getLogger(__name__) IMAGE_CHUNK_SIZE = 1024 * 1024 # 1MB -def _configdrive_location(): - """Get the configdrive location in the local file system. - - :returns: The full, absolute path to the configdrive as a string. - """ - return '/tmp/configdrive' - - def _image_location(image_info): """Get the location of the image in the local file system. diff --git a/ironic_python_agent/tests/unit/extensions/test_standby.py b/ironic_python_agent/tests/unit/extensions/test_standby.py index b12364eb5..7495d610d 100644 --- a/ironic_python_agent/tests/unit/extensions/test_standby.py +++ b/ironic_python_agent/tests/unit/extensions/test_standby.py @@ -487,16 +487,12 @@ class TestStandbyExtension(test_base.BaseTestCase): autospec=True) @mock.patch('ironic_python_agent.extensions.standby._download_image', autospec=True) - @mock.patch('ironic_python_agent.extensions.standby._configdrive_location', - autospec=True) def test_prepare_image(self, - location_mock, download_mock, write_mock, dispatch_mock, configdrive_copy_mock): image_info = _build_fake_image_info() - location_mock.return_value = '/tmp/configdrive' download_mock.return_value = None write_mock.return_value = None dispatch_mock.return_value = 'manager' @@ -529,16 +525,12 @@ class TestStandbyExtension(test_base.BaseTestCase): autospec=True) @mock.patch('ironic_python_agent.extensions.standby._download_image', autospec=True) - @mock.patch('ironic_python_agent.extensions.standby._configdrive_location', - autospec=True) def test_prepare_partition_image(self, - location_mock, download_mock, write_mock, dispatch_mock, configdrive_copy_mock): image_info = _build_fake_partition_image_info() - location_mock.return_value = '/tmp/configdrive' download_mock.return_value = None write_mock.return_value = {'root uuid': 'root_uuid'} dispatch_mock.return_value = 'manager'