From 882aa02d739228b1c3495727695ce8b22b9b6b4f Mon Sep 17 00:00:00 2001 From: ayefimov Date: Mon, 20 Apr 2026 15:33:25 -0400 Subject: [PATCH] Update telemetry_chargeback role variables to use cloudkitty_* prefix --- roles/telemetry_chargeback/README.md | 6 ++---- .../tasks/gen_synth_loki_data.yml | 4 ++-- roles/telemetry_chargeback/vars/main.yml | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/roles/telemetry_chargeback/README.md b/roles/telemetry_chargeback/README.md index 192b72a3d..1d5995c22 100644 --- a/roles/telemetry_chargeback/README.md +++ b/roles/telemetry_chargeback/README.md @@ -42,8 +42,8 @@ These variables are used internally by the role and typically do not need to be |----------|---------------|-------------| | `logs_dir_zuul` | `/home/zuul/ci-framework-data/logs` | Remote directory for log files. | | `artifacts_dir_zuul` | `/home/zuul/ci-framework-data/artifacts` | Directory for generated artifacts. | -| `ck_synth_script` | `{{ role_path }}/files/gen_synth_loki_data.py` | Path to the synthetic data generation script. | -| `ck_data_template` | `{{ role_path }}/template/loki_data_templ.j2` | Path to the Jinja2 template for Loki data format. | +| `cloudkitty_synth_script` | `{{ role_path }}/files/gen_synth_loki_data.py` | Path to the synthetic data generation script. | +| `cloudkitty_data_template` | `{{ role_path }}/templates/loki_data_templ.j2` | Path to the Jinja2 template for Loki data format. | | `ck_data_config` | `{{ role_path }}/files/test_static.yml` | Path to the scenario configuration file. | | `ck_output_file_local` | `{{ artifacts_dir_zuul }}/loki_synth_data.json` | Local path for generated synthetic data. | | `ck_output_file_remote` | `{{ logs_dir_zuul }}/gen_loki_synth_data.log` | Remote destination for synthetic data. | @@ -74,8 +74,6 @@ Example Playbook ansible.builtin.import_role: name: telemetry_chargeback ``` - Author Information ------------------ - Alex Yefimov, Red Hat diff --git a/roles/telemetry_chargeback/tasks/gen_synth_loki_data.yml b/roles/telemetry_chargeback/tasks/gen_synth_loki_data.yml index e37b54c6b..0b8d5880d 100644 --- a/roles/telemetry_chargeback/tasks/gen_synth_loki_data.yml +++ b/roles/telemetry_chargeback/tasks/gen_synth_loki_data.yml @@ -7,8 +7,8 @@ - name: TEST Generate Synthetic Data ansible.builtin.command: cmd: > - python3 "{{ ck_synth_script }}" - --tmpl "{{ ck_data_template }}" + python3 "{{ cloudkitty_synth_script }}" + --tmpl "{{ cloudkitty_data_template }}" -t "{{ ck_data_config }}" -o "{{ ck_output_file_local }}" register: script_output diff --git a/roles/telemetry_chargeback/vars/main.yml b/roles/telemetry_chargeback/vars/main.yml index 178154d89..5d7a47804 100644 --- a/roles/telemetry_chargeback/vars/main.yml +++ b/roles/telemetry_chargeback/vars/main.yml @@ -2,8 +2,19 @@ logs_dir_zuul: "/home/zuul/ci-framework-data/logs" artifacts_dir_zuul: "/home/zuul/ci-framework-data/artifacts" -ck_synth_script: "{{ role_path }}/files/gen_synth_loki_data.py" -ck_data_template: "{{ role_path }}/templates/loki_data_templ.j2" +cloudkitty_synth_script: "{{ role_path }}/files/gen_synth_loki_data.py" +cloudkitty_data_template: "{{ role_path }}/templates/loki_data_templ.j2" ck_data_config: "{{ role_path }}/files/test_static.yml" ck_output_file_local: "{{ artifacts_dir_zuul }}/loki_synth_data.json" ck_output_file_remote: "{{ logs_dir_zuul }}/gen_loki_synth_data.log" + +# Scenario and script paths (using role_path) +cloudkitty_scenario_dir: "{{ role_path }}/files" +cloudkitty_summary_script: "{{ role_path }}/files/gen_db_summary.py" + +# File naming conventions (internal standardization) +cloudkitty_synth_data_suffix: "-synth_data.json" +cloudkitty_loki_data_suffix: "-loki_data.json" +cloudkitty_synth_totals_metrics_suffix: "-synth_metrics_summary.yml" +cloudkitty_loki_totals_metrics_suffix: "-loki_metrics_summary.yml" +cloudkitty_loki_totals_suffix: "-rating.yml"