Merge "Remove redundant priority override code from service steps"
This commit is contained in:
commit
11309e7aea
@ -854,14 +854,7 @@ class AgentBaseMixin(object):
|
|||||||
:returns: A list of service step dictionaries, if an error
|
:returns: A list of service step dictionaries, if an error
|
||||||
occurs, then an empty list is returned.
|
occurs, then an empty list is returned.
|
||||||
"""
|
"""
|
||||||
new_priorities = {
|
return get_steps(task, 'service')
|
||||||
'erase_devices': CONF.deploy.erase_devices_priority,
|
|
||||||
'erase_devices_metadata':
|
|
||||||
CONF.deploy.erase_devices_metadata_priority,
|
|
||||||
}
|
|
||||||
return get_steps(
|
|
||||||
task, 'service',
|
|
||||||
override_priorities=new_priorities)
|
|
||||||
|
|
||||||
@METRICS.timer('AgentBaseMixin.refresh_steps')
|
@METRICS.timer('AgentBaseMixin.refresh_steps')
|
||||||
def refresh_steps(self, task, step_type):
|
def refresh_steps(self, task, step_type):
|
||||||
|
@ -1114,9 +1114,7 @@ class TestAgentDeploy(CommonTestsMixin, db_base.DbTestCase):
|
|||||||
with task_manager.acquire(self.context, self.node.uuid) as task:
|
with task_manager.acquire(self.context, self.node.uuid) as task:
|
||||||
steps = self.driver.get_service_steps(task)
|
steps = self.driver.get_service_steps(task)
|
||||||
mock_get_steps.assert_called_once_with(
|
mock_get_steps.assert_called_once_with(
|
||||||
task, 'service',
|
task, 'service')
|
||||||
override_priorities={'erase_devices': None,
|
|
||||||
'erase_devices_metadata': None})
|
|
||||||
self.assertEqual(mock_steps, steps)
|
self.assertEqual(mock_steps, steps)
|
||||||
|
|
||||||
@mock.patch.object(agent_base, 'get_steps', autospec=True)
|
@mock.patch.object(agent_base, 'get_steps', autospec=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user