@classmethod
def from_primitives(cls, context, request_spec, filter_properties):
    """Returns a new RequestSpec object by hydrating it from legacy dicts.

        Deprecated.  A RequestSpec object is created early in the boot process
        using the from_components method.  That object will either be passed to
        places that require it, or it can be looked up with
        get_by_instance_uuid.  This method can be removed when there are no
        longer any callers.  Because the method is not remotable it is not tied
        to object versioning.

        That helper is not intended to leave the legacy dicts kept in the nova
        codebase, but is rather just for giving a temporary solution for
        populating the Spec object until we get rid of scheduler_utils'
        build_request_spec() and the filter_properties hydratation in the
        conductor.

        :param context: a context object
        :param request_spec: An old-style request_spec dictionary
        :param filter_properties: An old-style filter_properties dictionary
        """
    num_instances = request_spec.get('num_instances', 1)
    spec = cls(context, num_instances=num_instances)
    image = request_spec.get('image')
    spec._image_meta_from_image(image)
    instance = request_spec.get('instance_properties')
    spec._from_instance(instance)
    flavor = request_spec.get('instance_type')
    spec._from_flavor(flavor)
    spec.ignore_hosts = filter_properties.get('ignore_hosts')
    spec.force_hosts = filter_properties.get('force_hosts')
    spec.force_nodes = filter_properties.get('force_nodes')
    retry = filter_properties.get('retry', {})
    spec._from_retry(retry)
    limits = filter_properties.get('limits', {})
    spec._from_limits(limits)
    spec._populate_group_info(filter_properties)
    scheduler_hints = filter_properties.get('scheduler_hints', {})
    spec._from_hints(scheduler_hints)
    spec.requested_destination = filter_properties.get('requested_destination')
    spec.obj_set_defaults()
    return spec
