summaryrefslogtreecommitdiff
path: root/main.py
blob: c2071a87aa00427612900400824b9a6d3e689b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from modules.nifi import core as nifi
from modules.telegraf import core as telegraf

AVAILABLE_PLATFORMS = {
    "1": ("Nifi", nifi),
    "2": ("Telegraf", telegraf)}


def list_platforms():
    print("Available platforms:")
    for key, (name, _) in AVAILABLE_PLATFORMS.items():
        print(f"{key}. {name}")


def main():
    list_platforms()
    plat_choice = input("Palun vali platform (number): ").strip()

    platform = AVAILABLE_PLATFORMS.get(plat_choice)
    if not platform:
        print("Ebaõnnestunud valik, sulgen rakenduse...")
        return

    name, module = platform
    module.introduction()
    module.build_pipeline()


if __name__ == "__main__":
    main()