diff options
-rw-r--r-- | qtip/ansible_library/plugins/action/calculate.py | 2 | ||||
-rw-r--r-- | resources/ansible_roles/inxi/templates/system-info.j2 | 20 | ||||
-rw-r--r-- | tests/unit/ansible_library/plugins/action/calculate_test.py | 4 |
3 files changed, 10 insertions, 16 deletions
diff --git a/qtip/ansible_library/plugins/action/calculate.py b/qtip/ansible_library/plugins/action/calculate.py index d50222fe..077d863c 100644 --- a/qtip/ansible_library/plugins/action/calculate.py +++ b/qtip/ansible_library/plugins/action/calculate.py @@ -69,7 +69,7 @@ def calc_qpi(qpi_spec, metrics): 'children': section_results, 'details': { 'metrics': metrics, - 'spec': qpi_spec + 'spec': "https://git.opnfv.org/qtip/tree/resources/QPI/compute.yaml" } } diff --git a/resources/ansible_roles/inxi/templates/system-info.j2 b/resources/ansible_roles/inxi/templates/system-info.j2 index 305a2af2..2108a979 100644 --- a/resources/ansible_roles/inxi/templates/system-info.j2 +++ b/resources/ansible_roles/inxi/templates/system-info.j2 @@ -1,16 +1,10 @@ System Information from inxi ============================ -{% for host in groups['compute'] %} -{{ hostvars[host].ansible_hostname }} ------------------------------ - -{{ ('CPU Brand', hostvars[host].system_info.cpu[0])|justify }} -{{ ('Disk', hostvars[host].system_info.disk[0])|justify }} -{{ ('Host Name', hostvars[host].system_info.hostname[0])|justify }} -{{ ('Kernel', hostvars[host].system_info.kernel[0])|justify }} -{{ ('Memory', hostvars[host].system_info.memory[0])|justify }} -{{ ('Operating System', hostvars[host].system_info.os[0])|justify }} -{{ ('Product', hostvars[host].system_info.product[0])|justify }} - -{% endfor %} +{{ ('CPU Brand', system_info.cpu[0])|justify }} +{{ ('Disk', system_info.disk[0])|justify }} +{{ ('Host Name', system_info.hostname[0])|justify }} +{{ ('Kernel', system_info.kernel[0])|justify }} +{{ ('Memory', system_info.memory[0])|justify }} +{{ ('Operating System', system_info.os[0])|justify }} +{{ ('Product', system_info.product[0])|justify }} diff --git a/tests/unit/ansible_library/plugins/action/calculate_test.py b/tests/unit/ansible_library/plugins/action/calculate_test.py index 31d72120..fae59821 100644 --- a/tests/unit/ansible_library/plugins/action/calculate_test.py +++ b/tests/unit/ansible_library/plugins/action/calculate_test.py @@ -69,13 +69,13 @@ def section_result(metric_result): @pytest.fixture() -def qpi_result(qpi_spec, section_result, metrics): +def qpi_result(section_result, metrics): return {'score': 2048, 'name': 'compute', 'description': 'QTIP Performance Index of compute', 'children': [section_result], 'details': { - 'spec': qpi_spec, + 'spec': "https://git.opnfv.org/qtip/tree/resources/QPI/compute.yaml", 'metrics': metrics}} |