lib/publiccloud/utils.pm

ssh_add_suseconnect_product

ssh_add_suseconnect_product($remote, $name, [program => $program, [version => $version, [arch => $arch, [params => $params, [timeout => $timeout, [retries => $retries, [delay => $delay]]]]]]]);

Register addon in the SUT

ssh_remove_suseconnect_product

ssh_remove_suseconnect_product($name, [$version, [$arch, [$params]]]);

Deregister addon in SUT

get_credentials get_credentials(url_suffix => 'some_csp.json'[, namespace => 'some_name', output_json => './local_credentials.json'])

Get credentials from the Public Cloud micro service, which requires user and password. The resulting json will be optionally stored in a file. This function also get input from these variables: - PUBLIC_CLOUD_CREDENTIALS_URL - _SECRET_PUBLIC_CLOUD_CREDENTIALS_USER - _SECRET_PUBLIC_CLOUD_CREDENTIALS_PWD

url_suffix - last part of the micro service url
output_json - (optional) save the credential to json file with provided filename.
namespace - (optional) credential namespace on the micro service. If not provided read from PUBLIC_CLOUD_NAMESPACE

gcloud_install gcloud_install($url, $dir, $timeout)

This function is used to install the gcloud CLI for the GKE Google Cloud.

From $url we get the full package and install it in $dir local folder as a subdir of /root. Defaults are available for a simple call without parameters: gcloud_install()

ssh_update_transactional_system

ssh_update_transactional_system($host);

Connect to the remote host $instance using ssh and update the system by running zypper update twice, in transactional mode. The first run will update the package manager, the second run will update the system. Transactional systems like SLE micro used transactional_update up and reboot.