summaryrefslogtreecommitdiff
path: root/tests/project/data/plugins/elements/custom.py
blob: e27e859e5c517f5def831079d59545c40e39798b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from buildstream import Element


class CustomElement(Element):

    def configure(self, node):
        print("Element Data: %s" % node)
        self.node_validate(node, ['configuration'])
        self.configuration = self.node_subst_member(node, "configuration", '')

    def preflight(self):
        pass

    def get_unique_key(self):
        return self.configuration


def setup():
    return CustomElement