

def _execute(self):
    image = self.request_spec.get('image')
    self.quotas = objects.Quotas.from_reservations(self.context, self.reservations, instance=self.instance)
    scheduler_utils.setup_instance_group(self.context, self.request_spec, self.filter_properties)
    scheduler_utils.populate_retry(self.filter_properties, self.instance.uuid)
    spec_obj = objects.RequestSpec.from_primitives(self.context, self.request_spec, self.filter_properties)
    hosts = self.scheduler_client.select_destinations(self.context, spec_obj)
    host_state = hosts[0]
    scheduler_utils.populate_filter_properties(self.filter_properties, host_state)
    self.filter_properties.pop('context', None)
    (host, node) = (host_state['host'], host_state['nodename'])
    self.compute_rpcapi.prep_resize(self.context, image, self.instance, self.flavor, host, self.reservations, request_spec=self.request_spec, filter_properties=self.filter_properties, node=node, clean_shutdown=self.clean_shutdown)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/conductor/tasks/migrate.py MigrationTask._execute/original