Skip to content

Commit

Permalink
Simplify schedule to create Incident SLES4SAP HDD
Browse files Browse the repository at this point in the history
The schedule to create the image that all the on-prem SAP specific scenarios are
using was complicated because it had:
1. Cases for unsupported versions
2. Workarounds for YAMLs being unable to loop
3. Unused options
4. Nested cases that were always true

This commit fixes that by:
1. Removing unsupported versions
2. Modifying system_role.pm to remove the need to unroll a version loop inside
the yaml
3. Removing unused options.
4. Moving the cases up the tree.

Related Ticket: TEAM-9610

Delete unsupported SLES4SAP version

Remove conditionals from the schedule that are always true
  • Loading branch information
a-kpappas authored and user322 committed Oct 2, 2024
1 parent 82b51c2 commit 819fd1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 77 deletions.
85 changes: 9 additions & 76 deletions schedule/sles4sap/qam/common/qam_install_sles4sap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ schedule:
- '{{sles4sap_product_installation_mode_sle12}}'
- '{{update_test_repo}}'
- installation/addon_products_sle
- '{{system_role}}'
- '{{sles4sap_product_installation_mode}}'
- installation/system_role
- '{{sles4sap_product_installation_mode_sle15}}'
- installation/partitioning
- installation/partitioning_finish
- installation/installer_timezone
- installation/hostname_inst
- '{{user_settings}}'
- installation/user_settings_root
- installation/resolve_dependency_issues
- installation/installation_overview
Expand All @@ -29,98 +28,32 @@ schedule:
- installation/reboot_after_installation
- installation/grub_test
- installation/first_boot
- '{{patch_and_reboot}}'
- qa_automation/patch_and_reboot
- console/system_prepare
- '{{setup_fips}}'
- '{{test_sles4sap}}'
- '{{scc_deregister}}'
- '{{generate_image}}'
- console/hostname
- console/force_scheduled_tasks
- shutdown/grub_set_bootargs
- shutdown/cleanup_before_shutdown
- shutdown/shutdown
conditional_schedule:
sles4sap_product_installation_mode_sle12:
VERSION:
12-SP2:
- installation/sles4sap_product_installation_mode
12-SP3:
- installation/sles4sap_product_installation_mode
12-SP4:
- installation/sles4sap_product_installation_mode
12-SP5:
- '{{product_installation_mode}}'
product_installation_mode:
SLE_PRODUCT:
sles4sap:
- installation/sles4sap_product_installation_mode
update_test_repo:
QAM_INCI:
1:
- installation/add_update_test_repo
system_role:
VERSION:
12-SP2:
- installation/system_role
12-SP3:
- installation/system_role
12-SP4:
- installation/system_role
12-SP5:
- '{{qam_system_role}}'
15:
- installation/system_role
15-SP1:
- installation/system_role
15-SP2:
- installation/system_role
15-SP3:
- installation/system_role
15-SP4:
- installation/system_role
15-SP5:
- installation/system_role
15-SP6:
- installation/system_role
15-SP7:
- installation/system_role
qam_system_role:
HORIZONTAL_MIGRATION:
1:
- installation/system_role
sles4sap_product_installation_mode:
sles4sap_product_installation_mode_sle15:
SYSTEM_ROLE:
default:
- installation/sles4sap_product_installation_mode
user_settings:
VERSION:
12-SP2:
- installation/user_settings
12-SP3:
- installation/user_settings
12-SP4:
- installation/user_settings
HORIZONTAL_MIGRATION:
1:
- installation/user_settings
patch_and_reboot:
FLAVOR:
SAP-DVD-Updates:
- qa_automation/patch_and_reboot
test_sles4sap:
TEST_SLES4SAP:
1:
- sles4sap/patterns
- sles4sap/sapconf
- sles4sap/saptune
scc_deregister:
SCC_DEREGISTER:
1:
- console/scc_deregistration
generate_image:
GENERATE_IMAGE:
1:
- console/hostname
- console/force_scheduled_tasks
- shutdown/grub_set_bootargs
- shutdown/cleanup_before_shutdown
- shutdown/shutdown
setup_fips:
FIPS_ENABLED:
1:
Expand Down
15 changes: 14 additions & 1 deletion tests/installation/system_role.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use strict;
use warnings;
use testapi;
use Utils::Architectures;
use version_utils qw(is_sle is_opensuse is_microos is_sle_micro);
use version_utils qw(is_sle is_sles4sap is_opensuse is_microos is_sle_micro);
use YaST::workarounds;

my %role_hotkey = (
Expand Down Expand Up @@ -68,6 +68,19 @@ sub assert_system_role {
}

sub run {
# Check if the installer has a System Role screen.
if (is_sle('=12-sp5') && is_sles4sap) {
# This check is not enough to guarantee that we are in a SLES4SAP
# installation. What this checks is that we are at a job with the
# VERSION '12-SP5' and that the string 'SAP' is contained in FLAVOR OR
# that SLE_PRODUCT is set to sles4sap, At the moment,
# (qam_)create_hdd_sles will get past this check, so we need an extra
# check_screen to know if the SUT runs SLE or SLES4SAP.
if (check_screen('partitioning-edit-proposal-button')) {
record_info("No System Role Screen", "The System Role screen is not shown in SLES4SAP 12SP5");
return;
}
}
if (is_sle('<15') && !is_x86_64) {
record_info("Skip screen", "System Role screen is displayed only for x86_64 in SLE-12-SP5 due to it has more than one role available");
}
Expand Down

0 comments on commit 819fd1b

Please sign in to comment.