Needs provider specific credentials, e.g. key_id, key_secret, region.
Does the conversion between PUBLIC_CLOUD_PROVIDER
and Terraform providers name.
Retrieves the image-id by given image name
.
Upload a image to the CSP. Required parameter is the location of the image
file. UEFI images are supported by giving the optional parameter type
= 'uefi'. This is only supported on GCE at the momment.
Retrieves the image-id after upload or die.
img_proof(instance_type => <string>, cleanup => <bool>, tests => <string>, timeout => <seconds>, results_dir => <string>, distro => <string>);
Call img-proof tool and retrieves a hashref as result. Do not die if img-proof call exit with error. $result_hash = { instance => <publiccloud:instance>, # instance object logfile => <string>, # the pytest logfile results => <string>, # json results file tests => <int>, # total number of tests pass => <int>, # successful tests skip => <int>, # skipped tests fail => <int>, # number of failed tests error => <int>, # number of errors };
Parse the output from img-proof command and retrieves instance-id, ip and logfile names.
Creates an ssh keypair in a given file path by $args{ssh_private_key_file}
called by childs within img-proof function
get_image_id([$img_url]);
Retrieves the CSP image id if exists, otherwise exception is thrown. The given $img_url
is optional, if not present it retrieves from PUBLIC_CLOUD_IMAGE_LOCATION. If PUBLIC_CLOUD_IMAGE_ID is set, then this value will be used
Creates an instance on the public cloud provider. Retrieves a publiccloud::instance object.
image
defines the image_id to create the instance. instance_type
defines the flavor of the instance. If not specified, it will load it from PUBLIC_CLOUD_INSTANCE_TYPE.
Creates multiple instances on the public cloud provider. Retrieves an array of publiccloud::instance objects.
image
defines the image_id to create the instance. instance_type
defines the flavor of the instance. If not specified, it will load it from PUBLIC_CLOUD_INSTANCE_TYPE.
This method can be overwritten by child classes to do some special cleanup task if 'apply' fails. Terraform was already terminated using the QUIT signal and openqa has a valid shell. The working directory is always the terraform directory, where the statefile and the *.tf is placed.
This method can be overwritten by child classes to do some special cleanup task if 'destroy' fails. Terraform was already terminated using the QUIT signal and openqa has a valid shell. The working directory is always the terraform directory, where the statefile and the *.tf is placed.
This method is used to initialize the terraform environment. it is executed only once, guareded by `terraform_env_prepared` member.
Calls terraform tool and applies the corresponding configuration .tf file
Destroys the current terraform deployment
Build the tags parameter for terraform. It is a single depth json like c<{"key": "value"}> where c<value> must be a string.
This method is called called after each test on failure or success.
This function implements a provider specifc stop call for a given instance.
This function implements a provider specifc start call for a given instance.
This function implements a provider specifc get_state call for a given instance.