forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
134 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
tests/sles4sap/sap_deployment_automation_framework/publiccloud_lib_compatibility_layer.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# SUSE's openQA tests | ||
Check failure on line 1 in tests/sles4sap/sap_deployment_automation_framework/publiccloud_lib_compatibility_layer.pm GitHub Actions / CI: Running static tests with perl v5.32
|
||
# | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
# Maintainer: QE-SAP <[email protected]> | ||
# Summary: Prepares compatibility layer for using `lib/publiccloud/` library with SDAF deployment | ||
|
||
use parent 'sles4sap::sap_deployment_automation_framework::basetest'; | ||
|
||
use warnings; | ||
use strict; | ||
use testapi; | ||
use serial_terminal qw(select_serial_terminal); | ||
use sles4sap::console_redirection qw(connect_target_to_serial disconnect_target_from_serial); | ||
use sles4sap::sap_deployment_automation_framework::inventory_tools qw(read_inventory_file sdaf_create_instances); | ||
use sles4sap::sap_deployment_automation_framework::naming_conventions | ||
qw(get_sdaf_inventory_path convert_region_to_short get_workload_vnet_code); | ||
sub run { | ||
my ($self, $run_args) = @_; | ||
select_serial_terminal; | ||
|
||
my $inventory_path = get_sdaf_inventory_path( | ||
env_code => get_required_var('SDAF_ENV_CODE'), | ||
sdaf_region_code => convert_region_to_short(get_required_var('PUBLIC_CLOUD_REGION')), | ||
vnet_code => get_workload_vnet_code(), | ||
sap_sid => get_required_var('SAP_SID') | ||
); | ||
|
||
# Connect serial to Deployer VM to get inventory file | ||
connect_target_to_serial(); | ||
my $inventory_data = read_inventory_file($inventory_path); | ||
# From now on all commands will be executed on worker VM | ||
disconnect_target_from_serial(); | ||
|
||
my $instances = $self->{instances} = sdaf_create_instances(inventory_content=>$inventory_data); | ||
#for my $instance (@$instances) { | ||
# $self->{my_instance} = $instance; | ||
#} | ||
} | ||
|
||
1; |