import os

from buildstream import Element


class RandomElement(Element):

    BST_MIN_VERSION = "2.0"

    def configure(self, node):
        pass

    def preflight(self):
        pass

    def get_unique_key(self):
        pass

    def configure_sandbox(self, sandbox):
        pass

    def stage(self, sandbox):
        pass

    def assemble(self, sandbox):
        rootdir = sandbox.get_virtual_directory()
        outputdir = rootdir.descend("output", create=True)

        # Generate non-reproducible output
        with outputdir.open_file("random", mode="wb") as f:
            f.write(os.urandom(64))

        return "/output"


def setup():
    return RandomElement
