Skip to content

Add option to include endpoint details #61

@alex-gts

Description

@alex-gts

Hi,

By default, the analyse method does not return endpoint details when retrieving an assessment from the cache.
This is because the variable all is not set to done unless the response is not immediately READY.
I am aware that at this is avoidable by using the low-level functionality, but it would be beneficial to incorporate this at the high level.

# ssllabs/sslabs.py lines 72 - 86

host_object = await a.get(
            host=host,
            startNew="off" if from_cache else "on",
            fromCache="on" if from_cache else "off",
            publish="on" if publish else "off",
            ignoreMismatch="on" if ignore_mismatch else "off",
            maxAge=max_age,
             # all is not set
        )
        self._semaphore.release()
        while host_object.status not in ["READY", "ERROR"]:
            self._logger.debug("Assessment of %s not ready yet.", host)
            await asyncio.sleep(10)
            host_object = await a.get(host=host, all="done") # all is set to "done"
        return host_object

Is this by design, or should I create a pull request to add a new parameter for the analyse method that controls if endpoint details are returned?

Thank you,
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions