From 592af574902521d3baa4e7eecb7a7d9eb188ca95 Mon Sep 17 00:00:00 2001 From: Hugo Brito Date: Mon, 4 Mar 2024 16:41:15 -0300 Subject: [PATCH] Temporarily set software audit to always be in-sync Since USM is still a work-in-progress feature, errors could occur, causing the software audit to be out-of-sync, which also results in the subcloud being out of sync. This commit changes the behavior of the software audit to always report as in-sync, even if issues are found with the software service and the USM endpoints. Known issues: - Story = 2010676 - Task = 49666: Add support for https in USM software client - Task = 49668: Copy GA metadata file to USM location in the Subcloud Test Plan: PASS - Manage a subcloud and check if the software audit is in-sync even if the software service is disabled. - Other audits in-sync. - Subcloud in-sync. Story: 2010676 Task: 49598 Change-Id: I596219f1fa4c42e6be7984f06618349c54f9448c Signed-off-by: Hugo Brito --- distributedcloud/dcmanager/audit/software_audit.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/distributedcloud/dcmanager/audit/software_audit.py b/distributedcloud/dcmanager/audit/software_audit.py index 6f9736977..4ae191786 100644 --- a/distributedcloud/dcmanager/audit/software_audit.py +++ b/distributedcloud/dcmanager/audit/software_audit.py @@ -107,7 +107,19 @@ class SoftwareAudit(object): regionone_releases, deployed_release_ids, committed_release_ids ) - def subcloud_software_audit(self, subcloud_name, subcloud_region, audit_data): + # TODO(nicodemos): This method will be removed once the USM feature is + # fully complete. The USM endpoints are not working properly, so we are + # always returning 'in-sync' to avoid regression failures. + def subcloud_software_audit(self, subcloud_name, subcloud_region, _audit_data): + self._update_subcloud_sync_status( + subcloud_name, + subcloud_region, + dccommon_consts.ENDPOINT_TYPE_SOFTWARE, + dccommon_consts.SYNC_STATUS_IN_SYNC, + ) + LOG.info(f"Software audit completed for: {subcloud_name}.") + + def _subcloud_software_audit(self, subcloud_name, subcloud_region, audit_data): LOG.info(f"Triggered software audit for: {subcloud_name}.") try: sc_os_client = sdk_platform.OpenStackDriver(