You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: roles/telemetry_chargeback/README.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@ Role Variables
51
51
|`openstackpod`|`"openstackclient"`| OpenStack client pod name for exec/cp operations |
52
52
|`lookback`|`6`| Days to look back for Loki query time range |
53
53
|`limit`|`50`| Limit for Loki query results |
54
+
|`cloudkitty_test_scenarios`|`["test_static.yml", "test_dyn_basic.yml"]`| List of test scenario files to run (can be overridden via extra-vars) |
54
55
55
56
How It Works
56
57
------------
@@ -67,8 +68,9 @@ The role executes the following workflow:
67
68
- Retrieves certificates from secrets/configmaps
68
69
- Configures Loki push/query URLs
69
70
70
-
3.**Test Scenario Discovery**
71
-
- Automatically finds all `test_*.yml` files in `files/` directory
71
+
3.**Test Scenario Selection**
72
+
- Uses scenarios defined in `cloudkitty_test_scenarios` variable
73
+
- Can be overridden via extra-vars to run specific scenarios
72
74
73
75
4.**Scenario Execution Loop** (for each discovered scenario)
74
76
- Generates synthetic Loki log data (`gen_synth_loki_data.py`)
@@ -204,7 +206,7 @@ When `--debug` is enabled, the script writes a `<stem>_diff.txt` file containing
204
206
Scenario Configuration
205
207
----------------------
206
208
207
-
Test scenarios are defined in YAML files located in the `files/` directory. Any file matching the pattern `test_*.yml` will be automatically discovered and executed.
209
+
Test scenarios are defined in YAML files located in the `files/` directory. The scenarios to run are specified by the `cloudkitty_test_scenarios` variable.
208
210
209
211
### Available Scenarios
210
212
@@ -265,7 +267,7 @@ This role has no direct hard dependencies on other Ansible roles.
265
267
Example Playbook
266
268
----------------
267
269
268
-
**Basic usage (auto-discover scenarios):**
270
+
**Basic usage (runs default scenarios):**
269
271
```yaml
270
272
- name: "Run chargeback tests"
271
273
hosts: controllers
@@ -293,6 +295,27 @@ Example Playbook
293
295
lookback: 10
294
296
```
295
297
298
+
**Run specific test scenarios:**
299
+
```yaml
300
+
- name: "Run chargeback tests with specific scenarios"
301
+
hosts: controllers
302
+
gather_facts: false
303
+
304
+
tasks:
305
+
- name: "Run chargeback validation with custom scenarios"
0 commit comments