Skip to content

Commit bd2576b

Browse files
committed
Added -e and -b options to the rating summary command
1 parent fa7d242 commit bd2576b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

roles/telemetry_chargeback/tasks/gen_synth_loki_data.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-t "{{ cloudkitty_test_file }}"
2020
-o "{{ cloudkitty_data_file }}"
2121
{% if cloudkitty_project_id is defined and cloudkitty_project_id %} -p "{{ cloudkitty_project_id }}"{% endif %}
22+
#{% if cloudkitty_user_id is defined and cloudkitty_user_id %} -u "{{ cloudkitty_user_id }}"{% endif %} # for future use
2223
register: script_output
2324
when: not file_preexists.stat.exists | bool
2425
changed_when: script_output.rc == 0

roles/telemetry_chargeback/tasks/loki_rate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
- name: "TEST Get Rate and Qty by type from CloudKitty {{ item }}"
1414
ansible.builtin.command:
15-
cmd: "{{ openstack_cmd }} rating summary get -g res_type -f yaml"
15+
cmd: "{{ openstack_cmd }} rating summary get -g res_type -f yaml -b \"{{ synth_data_rates.time.begin_step.begin }}\" -e \"{{ synth_data_rates.time.end_step.end }}\""
1616
register: cost_totals_by_type
1717
changed_when: true
1818
failed_when: cost_totals_by_type.rc != 0
@@ -30,7 +30,7 @@
3030

3131
- name: "TEST Get Rate and Qty Summary from CloudKitty {{ item }}"
3232
ansible.builtin.command:
33-
cmd: "{{ openstack_cmd }} rating summary get"
33+
cmd: "{{ openstack_cmd }} rating summary get -b \"{{ synth_data_rates.time.begin_step.begin }}\" -e \"{{ synth_data_rates.time.end_step.end }}\""
3434
register: cost_totals_summary
3535
changed_when: true
3636
failed_when: cost_totals_summary.rc != 0

0 commit comments

Comments
 (0)