def _schedule(self, context, request_spec, filter_properties):
        instance_type = request_spec.get("instance_type", None)
        instance_uuids = request_spec.get("instance_uuids", None)

        config_options = self._get_configuration_options()

        if instance_uuids:
            num_instances = len(instance_uuids)
        else:
            num_instances = request_spec.get('num_instances', 1)

        # initilize an empty key-value cache to be used in solver for internal
        # temporary data storage
        solver_cache = {}

        filter_properties.update({'context': context,
                                  'request_spec': request_spec,
                                  'config_options': config_options,
                                  'instance_type': instance_type,
                                  'num_instances': num_instances,
                                  'instance_uuids': instance_uuids,
                                  'solver_cache': solver_cache})

        self.populate_filter_properties(request_spec, filter_properties)

        # NOTE(Yathi): Moving the host selection logic to a new method so that
        # the subclasses can override the behavior.
        selected_hosts = self._get_selected_hosts(context, filter_properties)

        # clear solver's memory after scheduling process
        filter_properties.pop('solver_cache')

        return selected_hosts
Returns a list of hosts that meet the required specs,
dataset/ETHPy150Open openstack/nova-solver-scheduler/nova_solverscheduler/scheduler/solver_scheduler.py/ConstraintSolverScheduler._schedule