ovfimporter

package
v0.0.0-...-fa603ae Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InstanceNameFlagKey is key for instance name CLI flag
	InstanceNameFlagKey = "instance-names"

	// MachineImageNameFlagKey is key for machine image name CLI flag
	MachineImageNameFlagKey = "machine-image-name"

	// MachineImageStorageLocationFlagKey is key for machine image storage location CLI flag
	MachineImageStorageLocationFlagKey = "machine-image-storage-location"

	// ClientIDFlagKey is key for client ID CLI flag
	ClientIDFlagKey = "client-id"

	// OvfGcsPathFlagKey is key for OVF/OVA GCS path CLI flag
	OvfGcsPathFlagKey = "ovf-gcs-path"

	// HostnameFlagKey is key for hostname CLI flag
	HostnameFlagKey = "hostname"

	// EnableNestedVirtualizationFlagKey is key to enable nested virtualization on worker VMs
	EnableNestedVirtualizationFlagKey = "enable-nested-virtualization"
)

Variables

View Source
var (
	// DefaultInstanceAccessScopes hold default instance access scopes
	// https://cloud.google.com/sdk/gcloud/reference/compute/instances/create#--scopes
	DefaultInstanceAccessScopes = []string{
		"https://www.googleapis.com/auth/devstorage.read_only",
		"https://www.googleapis.com/auth/logging.write",
		"https://www.googleapis.com/auth/monitoring.write",
		"https://www.googleapis.com/auth/pubsub",
		"https://www.googleapis.com/auth/service.management.readonly",
		"https://www.googleapis.com/auth/servicecontrol",
		"https://www.googleapis.com/auth/trace.append",
	}
)

Functions

This section is empty.

Types

type OVFImporter

type OVFImporter struct {
	Logger logging.Logger
	// contains filtered or unexported fields
}

OVFImporter is responsible for importing OVF into GCE

func NewOVFImporter

func NewOVFImporter(params *ovfdomain.OVFImportParams, logger logging.ToolLogger) (*OVFImporter, error)

NewOVFImporter creates an OVF importer, including automatically populating dependencies, such as compute/storage clients. workflowDir is the filesystem path to `daisy_workflows`.

func (*OVFImporter) CleanUp

func (oi *OVFImporter) CleanUp()

CleanUp performs clean up of any temporary resources or connections used for OVF import

func (*OVFImporter) Import

func (oi *OVFImporter) Import() error

Import runs OVF import. It first imports all of the disk files to images, and then uses the images to create an instance. If the user requested a machine image, then it converts the instance to a machine image.

type ParamValidatorAndPopulator

type ParamValidatorAndPopulator struct {
	NetworkResolver param.NetworkResolver
	// contains filtered or unexported fields
}

ParamValidatorAndPopulator validates parameters and infers missing values.

func (*ParamValidatorAndPopulator) ValidateAndPopulate

func (p *ParamValidatorAndPopulator) ValidateAndPopulate(params *ovfdomain.OVFImportParams) (err error)

ValidateAndPopulate validates OVFImportParams, and populates values that are missing. It returns an error if params are invalid.

Jump to

Keyboard shortcuts

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