azuretest

package
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUpBootedVM

func CleanUpBootedVM(creds *azureCredentials, parameters DeploymentParameters, authorizer autorest.Authorizer, testId string) (retErr error)

func DeleteImageFromAzure

func DeleteImageFromAzure(c *azureCredentials, imageName string) error

DeleteImageFromAzure deletes the image uploaded by osbuild-composer (or UpluadImageToAzure method).

func GetAzureCredentialsFromEnv

func GetAzureCredentialsFromEnv() (*azureCredentials, error)

getAzureCredentialsFromEnv gets the credentials from environment variables If none of the environment variables is set, it returns nil. If some but not all environment variables are set, it returns an error.

func UploadImageToAzure

func UploadImageToAzure(c *azureCredentials, imagePath string, imageName string) error

UploadImageToAzure mimics the upload feature of osbuild-composer.

func WithBootedImageInAzure

func WithBootedImageInAzure(creds *azureCredentials, imageName, testId, publicKeyFile string, f func(address string) error) (retErr error)

WithBootedImageInAzure runs the function f in the context of booted image in Azure

Types

type DeploymentParameters

type DeploymentParameters struct {
	NetworkInterfaceName     deploymentParameter `json:"networkInterfaceName"`
	NetworkSecurityGroupName deploymentParameter `json:"networkSecurityGroupName"`
	VirtualNetworkName       deploymentParameter `json:"virtualNetworkName"`
	PublicIPAddressName      deploymentParameter `json:"publicIPAddressName"`
	VirtualMachineName       deploymentParameter `json:"virtualMachineName"`
	DiskName                 deploymentParameter `json:"diskName"`
	ImageName                deploymentParameter `json:"imageName"`
	Location                 deploymentParameter `json:"location"`
	ImagePath                deploymentParameter `json:"imagePath"`
	AdminUsername            deploymentParameter `json:"adminUsername"`
	AdminPublicKey           deploymentParameter `json:"adminPublicKey"`
}

struct for encoding deployment parameters

func NewDeploymentParameters

func NewDeploymentParameters(creds *azureCredentials, imageName, testId, publicKey string) DeploymentParameters

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL