INNER CODE UNIT · Python

_get_next_state

faucetsdn/poseidon · lib/poseidon_cli/poseidon_cli/cli.py:114

    def _get_next_state(endpoint):
        return str(endpoint.p_next_state)

    @staticmethod
    def _get_first_seen(endpoint):
        # TODO this needs to be rewritten after history moves to prometheus
        return (
            time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(endpoint.state_time))
            + " ("
            + duration(endpoint.state_time)
            + ")"
        )

    @staticmethod
    def _get_last_seen(endpoint):
        return (
            time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(endpoint.state_time))
            + " ("

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…