Merge "Remove unused function _configdrive_location"

This commit is contained in:
Jenkins 2017-05-16 10:31:01 +00:00 committed by Gerrit Code Review
commit 15878b7b18
2 changed files with 0 additions and 16 deletions

View File

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

View File

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