Remove unused param from _fill_provider_mapping

Since Iecbee518444bd282ce5f6fd019db41a322f76a83 the instance_uuid param
is unused in _fill_provider_mapping() in the conductor/manager. So this
patch removes the parameter.

blueprint: support-move-ops-with-qos-ports

Change-Id: Ib564b6e258dfaaf5db01e462f37da30e467c37c0
This commit is contained in:
Balazs Gibizer 2019-04-15 15:09:53 +02:00
parent 71b11292fb
commit 5e5e5daa90
2 changed files with 7 additions and 13 deletions

View File

@ -692,7 +692,7 @@ class ComputeTaskManager(base.Base):
# moves the allocation of the instance to
# another host
self._fill_provider_mapping(
context, instance.uuid, request_spec, host)
context, request_spec, host)
except Exception as exc:
self._cleanup_when_reschedule_fails(
context, instance, exc, legacy_request_spec,
@ -1282,8 +1282,7 @@ class ComputeTaskManager(base.Base):
with obj_target_cell(inst, cell0):
inst.destroy()
def _fill_provider_mapping(
self, context, instance_uuid, request_spec, host_selection):
def _fill_provider_mapping(self, context, request_spec, host_selection):
"""Fills out the request group - resource provider mapping in the
request spec.
@ -1297,8 +1296,6 @@ class ComputeTaskManager(base.Base):
select_destinations call.
:param context: The security context
:param instance_uuid: The UUID of the instance for which the provider
mapping is filled
:param request_spec: The RequestSpec object associated with the
operation
:param host_selection: The Selection object returned by the scheduler
@ -1453,8 +1450,7 @@ class ComputeTaskManager(base.Base):
# allocations in the scheduler) for this instance, we may need to
# map allocations to resource providers in the request spec.
try:
self._fill_provider_mapping(
context, instance.uuid, request_spec, host)
self._fill_provider_mapping(context, request_spec, host)
except Exception as exc:
# If anything failed here we need to cleanup and bail out.
with excutils.save_and_reraise_exception():

View File

@ -1018,9 +1018,8 @@ class _BaseTaskTestCase(object):
host_list=expected_build_run_host_list)
mock_rp_mapping.assert_called_once_with(
self.context, instance.uuid, mock.ANY,
test.MatchType(objects.Selection))
actual_request_spec = mock_rp_mapping.mock_calls[0][1][2]
self.context, mock.ANY, test.MatchType(objects.Selection))
actual_request_spec = mock_rp_mapping.mock_calls[0][1][1]
self.assertEqual(
rg1.resources,
actual_request_spec.requested_resources[0].resources)
@ -1101,9 +1100,8 @@ class _BaseTaskTestCase(object):
# called only once when the claim succeeded
mock_rp_mapping.assert_called_once_with(
self.context, instance.uuid, mock.ANY,
test.MatchType(objects.Selection))
actual_request_spec = mock_rp_mapping.mock_calls[0][1][2]
self.context, mock.ANY, test.MatchType(objects.Selection))
actual_request_spec = mock_rp_mapping.mock_calls[0][1][1]
self.assertEqual(
rg1.resources,
actual_request_spec.requested_resources[0].resources)