contentlibrary

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContentLibAPIWaitSecs = 5
)

Variables

This section is empty.

Functions

func IsSupportedDeployType

func IsSupportedDeployType(t string) bool

func ParseVirtualHardwareVersion

func ParseVirtualHardwareVersion(vmxVersion string) int32

ParseVirtualHardwareVersion parses the virtual hardware version For eg. "vmx-15" returns 15.

func UpdateVmiWithOvfEnvelope

func UpdateVmiWithOvfEnvelope(obj client.Object, ovfEnvelope ovf.Envelope)

UpdateVmiWithOvfEnvelope updates the given vmi object with the content of given OVF envelope.

Types

type Provider

type Provider interface {
	GetLibraryItems(ctx context.Context, clUUID string) ([]library.Item, error)
	GetLibraryItem(ctx context.Context, libraryUUID, itemName string,
		notFoundReturnErr bool) (*library.Item, error)
	GetLibraryItemID(ctx context.Context, itemUUID string) (*library.Item, error)
	ListLibraryItems(ctx context.Context, libraryUUID string) ([]string, error)
	UpdateLibraryItem(ctx context.Context, itemID, newName string, newDescription *string) error
	RetrieveOvfEnvelopeFromLibraryItem(ctx context.Context, item *library.Item) (*ovf.Envelope, error)
	RetrieveOvfEnvelopeByLibraryItemID(ctx context.Context, itemID string) (*ovf.Envelope, error)

	// TODO: Testing only. Remove these from this file.
	CreateLibraryItem(ctx context.Context, libraryItem library.Item, path string) error
}

func NewProvider

func NewProvider(ctx context.Context, restClient *rest.Client) Provider

func NewProviderWithWaitSec

func NewProviderWithWaitSec(restClient *rest.Client, waitSeconds int) Provider

Jump to

Keyboard shortcuts

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