Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ossf-scoreboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:
retention-days: 5

- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@07bb2b932c90fc1ec97637495e4072a0966fa74c # v3.28.20
uses: github/codeql-action/upload-sarif@32f7c15247fa6542dc765bd40f6a15dc2caeed89 # v4.31.2
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
13 changes: 13 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Changelog

All notable changes to this project will be documented in this file.


## 1.0.0
Release Date: 11-04-2025

1. High Availability Functional Tests:
- Added comprehensive functional tests for High Availability (HA) configurations for SAP HANA Database with scale-up architecture.
- Added functional tests for HA configurations for SAP Central Services (ASCS) with Primary and Secondary nodes for ENSA1 and ENSA2 system types.
- Support for running HA functional tests for systems with new HANA topology - SAP HANA SR-angi.
- Offline Validation for HA configurations for SAP HANA Database and Central Services.
2. Configuration Checks (preview release):
- Initial implementation of configuration checks for SAP systems.
- Support for validating SAP systems with HANA and IBM Db2 databases.
5 changes: 4 additions & 1 deletion docs/CONFIGURATION_CHECKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ You first need to make sure that you are logged into Azure CLI on the management
az login --identity

# Login to Azure using User Assigned Managed Identity
az login --identity -u <client-id-of-user-assigned-managed-identity>
# When using management server with SLES or Ubuntu OS
az login --identity -client-id <client-id-of-user-assigned-managed-identity>
# When using management server with RHEL OS
az login --identity --username <client-id-of-user-assigned-managed-identity>

# Set the desired subscription context
az account set --subscription <subscription-id>
Expand Down
1 change: 1 addition & 0 deletions src/module_utils/filesystem_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
Collectors for data collection in SAP Automation QA
"""
import ipaddress
import json
import logging
from typing import Any
Expand Down
11 changes: 11 additions & 0 deletions src/modules/render_html_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
- Reports will be created in {workspace_directory}/quality_assurance/
type: str
required: true
framework_version:
description:
- Version of the SAP Automation QA framework
type: str
required: false
author:
- Microsoft Corporation
notes:
Expand All @@ -71,6 +76,7 @@
test_group_name: "hana_cluster_validation"
report_template: "{{ lookup('file', 'templates/report_template.html') }}"
workspace_directory: "/var/log/sap-automation-qa"
framework_version: "1.0.0"
register: report_result
- name: Show path to generated report
Expand Down Expand Up @@ -115,6 +121,7 @@ def __init__(
workspace_directory: str,
test_case_results: List[Dict[str, Any]] = [],
system_info: Dict[str, Any] = {},
framework_version: str = "unknown",
):
super().__init__()
self.test_group_invocation_id = test_group_invocation_id
Expand All @@ -128,6 +135,7 @@ def __init__(
)
self.test_case_results = test_case_results or []
self.system_info = system_info or {}
self.framework_version = framework_version

def read_log_file(self) -> List[Dict[str, Any]]:
"""
Expand Down Expand Up @@ -184,6 +192,7 @@ def render_report(self, test_case_results: List[Dict[str, Any]]) -> None:
"%m/%d/%Y, %I:%M:%S %p"
),
"system_info": self.system_info,
"framework_version": self.framework_version,
}
)
)
Expand All @@ -205,6 +214,7 @@ def run_module() -> None:
workspace_directory=dict(type="str", required=True),
test_case_results=dict(type="list", required=False),
system_info=dict(type="dict", required=False),
framework_version=dict(type="str", required=False),
)

module = AnsibleModule(argument_spec=module_args, supports_check_mode=True)
Expand All @@ -216,6 +226,7 @@ def run_module() -> None:
workspace_directory=module.params["workspace_directory"],
test_case_results=module.params.get("test_case_results", []),
system_info=module.params.get("system_info", {}),
framework_version=module.params.get("framework_version", "unknown"),
)

test_case_results = (
Expand Down
8 changes: 4 additions & 4 deletions src/roles/configuration_checks/tasks/files/hana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ checks:

- id: "DB-HANA-0050"
name: "Disk performance for /hana/data (MBPS)"
description: "The disk performance for /hana/data should be >= 64 MByte/s"
description: "The disk performance for /hana/data should be >= 400 MByte/s"
category: *sap_check
severity: *high
workload: *sap
Expand All @@ -1307,15 +1307,15 @@ checks:
mount_point: "/hana/data"
validator_type: *range
validator_args:
min: "64"
min: "400"
report: *check
references:
sap: "2972496"
microsoft: "https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/hana-vm-operations-storage"

- id: "DB-HANA-0051"
name: "Disk performance for /hana/log (MBPS)"
description: "The disk performance for /hana/log should be >= 64 MByte/s"
description: "The disk performance for /hana/log should be >= 250 MByte/s"
category: *sap_check
severity: *high
workload: *sap
Expand All @@ -1333,7 +1333,7 @@ checks:
mount_point: "/hana/log"
validator_type: *range
validator_args:
min: "64"
min: "250"
report: *check
references:
sap: "2972496"
Expand Down
6 changes: 6 additions & 0 deletions src/roles/misc/tasks/render-html-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
ansible.builtin.set_fact:
html_report_template: "{{ lookup('file', html_template_name | default('./templates/report.html')) }}"

- name: "Get framework version"
no_log: true
ansible.builtin.set_fact:
framework_version: "{{ lookup('file', '../../../../VERSION') | default('unknown') }}"

- name: "Read the log file and create a HTML report"
render_html_report:
test_group_invocation_id: "{{ test_group_invocation_id }}"
Expand All @@ -22,4 +27,5 @@
workspace_directory: "{{ _workspace_directory }}"
test_case_results: "{{ all_results | default([]) }}"
system_info: "{{ system_info | default({}) }}"
framework_version: "{{ framework_version | default('unknown') }}"
register: report_file_path
2 changes: 1 addition & 1 deletion src/templates/config_checks_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ <h4 class="section-header" onclick="toggleSection('section-{{ check.hostname }}-
</div>
</div>
</div>
<div class="footer">Report generated on: {{ report_generation_time }}</div>
<div class="footer">Report generated on: {{ report_generation_time }} with framework version: {{ framework_version }}</div>
<script>
function toggleDetails(checkId) {
const detailsRow = document.getElementById('details-' + checkId)
Expand Down
2 changes: 1 addition & 1 deletion src/templates/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ <h2 class="system-info-heading">System Information</h2>
</div>
</div>
</div>
<div class="footer">Report generated on: {{ report_generation_time }}</div>
<div class="footer">Report generated on: {{ report_generation_time }} with framework version: {{ framework_version }}</div>
<script>
// Function to beautify JSON objects
function formatJsonObjects() {
Expand Down
3 changes: 3 additions & 0 deletions tests/modules/render_html_report_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def module_params(self):
"test_group_name": "test_group",
"report_template": "report_template.html",
"workspace_directory": "/tmp",
"framework_version": "1.0.0",
}

@pytest.fixture
Expand All @@ -44,6 +45,7 @@ def html_report_renderer(self, module_params):
module_params["test_group_name"],
module_params["report_template"],
module_params["workspace_directory"],
module_params["framework_version"],
)

def test_render_report(self, mocker, html_report_renderer):
Expand Down Expand Up @@ -115,6 +117,7 @@ def __init__(self, argument_spec, supports_check_mode):
"test_group_name": "test_group",
"report_template": "report_template.html",
"workspace_directory": "/tmp",
"framework_version": "1.0.0",
}
self.check_mode = False

Expand Down