lib/sles4sap/cloud_zypper_patch.pm

SYNOPSIS

Library to manage the sles4sap cloud zypper patch tests

zp_azure_resource_group

my $rg = zp_azure_resource_group();

Get the Azure resource group name for this test

zp_azure_deploy

zp_azure_deploy(region => 'northeurope', os => 'SUSE:sles-sap-15-sp5:gen2:latest');

Create a deployment in Azure designed for this specific test.

1. Create a resource group to contain all 2. Create a vnet and subnet in it 3. Create one Public IP 4. Create 1 VM

region - existing resource group
os - existing Load balancer NAME

zp_azure_destroy

zp_azure_destroy();

Destroy the deployment by deleting the resource group and created network peering

ibsm_rg - (optional) name of the resource group of the IBSm

zp_ibsm2sut_peering_name

my $peering_name = zp_ibsm2sut_peering_name(target_rg => get_required_var('IBSM_RG'));

Get the Azure resource group name for this test

target_rg - name of the resource group of the IBSm
target_vnet_name - (optional) name of the VNET of the IBSm, if not provided it is calculated internally

zp_azure_netpeering

zp_azure_netpeering(target_rg => get_required_var('IBSM_RG'))
target_rg - name of the resource group of the IBSm

zp_ssh_connect

zp_ssh_connect()

First ssh connections

zp_repos_add

zp_repos_add()

Add MU repos to the zypper list

ip - IBSm IP
name - hostname of the download server
repos - array of repos. It could be an empty list.

zp_zypper_patch

zp_zypper_patch()

Run zypper patch

zp_scc_check

my $is_registered = zp_scc_check();

Check if the OS is registered by calling SUSEConnect -s. Return 1 if all modules are registered, 0 if at least one is not.

zp_scc_register

zp_scc_register(scc_code => '1234567890');

Register the image. (For the moment) it only supports registercloudguest endpoint. Notice that this library also supports registration through ipaddr2_infra_deploy by adding couple of lines to cloud-init configuration file.

scc_code - registration code