diff options
author | Rasmus Luha <rasmus.luha@ut.ee> | 2025-05-14 23:42:05 +0300 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@ut.ee> | 2025-05-14 23:42:05 +0300 |
commit | 0f275b1bf3e24f7fb62e0cf8e2abe5eb8c45d929 (patch) | |
tree | 3d28dfcf26fa9e46b18ce8d693bbe4e5489b1b0e /modules/telegraf | |
parent | 7bfcf9a86553f7158673758cd500eece8e9cf132 (diff) |
Revert "cleanup, comments for common module"
This reverts commit 0cdd22fd88b00bc939eac7824bb1063f675cba84.
Diffstat (limited to 'modules/telegraf')
-rw-r--r-- | modules/telegraf/testing.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/telegraf/testing.py b/modules/telegraf/testing.py new file mode 100644 index 0000000..d049bbf --- /dev/null +++ b/modules/telegraf/testing.py @@ -0,0 +1,17 @@ +import toml + +def modify_input(template, new_pipeline_path, key, value): + data = toml.load(template) + pluggin = data["inputs"]["http"][0] + + if key in pluggin: + + print(f"Before: {key} = {http_input[key]}") + http_input[key] = value + print(f"After: {key} = {http_input[key]}") + + + with open(new_pipeline_path, "w") as f: + toml.dump(data, f) + +modify_input("templates/basic_ETL.toml", "test_pipers.toml, "urls", ["stillTesting"]) |