Skip to content

Commit 01586f6

Browse files
authored
Merge branch 'master' into alexy_synth_data_dyn
2 parents f5bcdfe + 9362bef commit 01586f6

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

roles/telemetry_chargeback/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ telemetry_chargeback
22
=========
33
The **`telemetry_chargeback`** role is designed to test the **RHOSO Cloudkitty** feature. These tests are specific to the Cloudkitty feature. Tests that are not specific to this feature (e.g., standard OpenStack deployment validation, basic networking) should be added to a common role.
44

5+
The role performs two main functions:
6+
7+
1. **CloudKitty Validation** - Enables and configures the CloudKitty hashmap rating module, then validates its state.
8+
2. **Synthetic Data Generation** - Generates synthetic Loki log data for testing chargeback scenarios using a Python script and Jinja2 template.
9+
510
Requirements
611
------------
712
It relies on the following being available on the target or control host:
@@ -10,6 +15,9 @@ It relies on the following being available on the target or control host:
1015
* The **OpenStack CLI client** must be installed and configured with administrative credentials.
1116
* Required Python libraries for the `openstack` CLI (e.g., `python3-openstackclient`).
1217
* Connectivity to the OpenStack API endpoint.
18+
* **Python 3** with the following libraries for synthetic data generation:
19+
* `PyYAML`
20+
* `Jinja2`
1321

1422
It is expected to be run **after** a successful deployment and configuration of the following components:
1523

@@ -48,7 +56,7 @@ Example Playbook
4856
gather_facts: no
4957

5058
tasks:
51-
- name: "Run chargeback specific tests"
59+
- name: "Run chargeback specific tests"
5260
ansible.builtin.import_role:
5361
name: telemetry_chargeback
5462
```

roles/telemetry_chargeback/tasks/chargeback_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
cmd: "{{ openstack_cmd }} rating module set priority hashmap 100"
1818
register: set_hashmap_priority
1919
when: get_hashmap_priority.stdout | trim != '100'
20-
failed_when: (set_hashmap_priority.rc | default(0)) >= 1 or get_hashmap_priority.stdout == ""
20+
failed_when: (set_hashmap_priority.rc | default(42)) >= 1 or get_hashmap_priority.stdout == ""
2121
changed_when: True
2222

2323
- name: Get status of all CloudKitty rating modules

0 commit comments

Comments
 (0)