-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt cloud-init tests to work with IBSm
When runing maintenance testing, doing network peering with IBSM and patch system with incident repo. Related: https://jira.suse.com/browse/TEAM-9864
- Loading branch information
Showing
9 changed files
with
284 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
# Summary: Create cluster | ||
# Maintainer: QE-SAP <[email protected]>, Michele Pagot <[email protected]> | ||
|
||
use strict; | ||
use warnings; | ||
use Mojo::Base 'publiccloud::basetest'; | ||
use testapi; | ||
use serial_terminal qw( select_serial_terminal ); | ||
use sles4sap::ipaddr2 qw( | ||
ipaddr2_bastion_pubip | ||
ipaddr2_cluster_create | ||
ipaddr2_deployment_logs | ||
ipaddr2_infra_destroy | ||
ipaddr2_cloudinit_logs | ||
ipaddr2_clean_network_peering | ||
); | ||
|
||
sub run { | ||
my ($self) = @_; | ||
|
||
die('Azure is the only CSP supported for the moment') | ||
unless check_var('PUBLIC_CLOUD_PROVIDER', 'AZURE'); | ||
|
||
select_serial_terminal; | ||
|
||
my $bastion_ip = ipaddr2_bastion_pubip(); | ||
|
||
record_info("TEST STAGE", "Init and configure the Pacemaker cluster"); | ||
ipaddr2_cluster_create(bastion_ip => $bastion_ip, rootless => get_var('IPADDR2_ROOTLESS', '0')); | ||
} | ||
|
||
sub test_flags { | ||
return {fatal => 1, publiccloud_multi_module => 1}; | ||
} | ||
|
||
sub post_fail_hook { | ||
my ($self) = shift; | ||
ipaddr2_deployment_logs() if check_var('IPADDR2_DIAGNOSTIC', 1); | ||
ipaddr2_cloudinit_logs() unless check_var('IPADDR2_CLOUDINIT', 0); | ||
ipaddr2_clean_network_peering(); | ||
ipaddr2_infra_destroy(); | ||
$self->SUPER::post_fail_hook; | ||
} | ||
|
||
1; |
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
Oops, something went wrong.