client

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package client is the main client for the CloudAvenue provider.

Package client is the main client for the CloudAvenue provider.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyOrgNameProvided = errors.New("empty Org name provided")
	ErrEmptyVDCNameProvided = errors.New("empty VDC name provided")
	ErrRetrievingOrg        = errors.New("error retrieving Org")
	ErrRetrievingOrgAdmin   = errors.New("error retrieving Org admin")
	ErrEmptyOrgFound        = errors.New("empty Org found")
	ErrRetrievingVDC        = errors.New("error retrieving VDC")
	ErrRetrievingAdminVDC   = errors.New("error retrieving AdminVDC")
	ErrRetrievingVDCGroup   = errors.New("error retrieving VDC Group")
	ErrEmptyVDCFound        = errors.New("empty VDC found")
)

Functions

This section is empty.

Types

type CloudAvenue

type CloudAvenue struct {
	// API VMWARE
	Vmware *govcd.VCDClient // Deprecated

	// SDK CLOUDAVENUE
	CAVSDK     *clientca.Client
	CAVSDKOpts *clientca.ClientOpts
}

CloudAvenue is the main struct for the CloudAvenue client.

func (*CloudAvenue) DefaultVDCExist

func (c *CloudAvenue) DefaultVDCExist() bool

DefaultVDCExist returns true if the default VDC exists.

func (*CloudAvenue) GetAffinityRule added in v0.3.0

func (c *CloudAvenue) GetAffinityRule(affinityRuleID string) (affinityRule *govcd.VdcComputePolicyV2, err error)

getAffinityRule retrieves an affinity rule by name.

func (*CloudAvenue) GetBootImage added in v0.3.0

func (c *CloudAvenue) GetBootImage(bootImageID string) (bootImage *govcdtypes.Media, err error)

GetBootImage retrieves a boot image by ID.

func (*CloudAvenue) GetDefaultVDC

func (c *CloudAvenue) GetDefaultVDC() string

GetDefaultVDC returns the default VDC.

func (*CloudAvenue) GetOrgName

func (c *CloudAvenue) GetOrgName() string

GetOrgName() returns the name of the organization.

func (*CloudAvenue) GetTemplate added in v0.3.0

func (c *CloudAvenue) GetTemplate(iD string) (vAppTemplate *govcd.VAppTemplate, err error)

GetTemplate retrieves a vApp template by name or ID.

func (*CloudAvenue) GetTemplateWithVMName added in v0.3.0

func (c *CloudAvenue) GetTemplateWithVMName(iD, vmName string) (vAppTemplate *govcd.VAppTemplate, err error)

GetTemplateWithVMName retrieves a vApp template with a VM name.

func (*CloudAvenue) GetURL

func (c *CloudAvenue) GetURL() string

GetURL returns the base path of the API.

func (*CloudAvenue) GetUserName added in v0.15.0

func (c *CloudAvenue) GetUserName() string

GetUserName() returns the name of the user.

func (*CloudAvenue) GetVDC

func (c *CloudAvenue) GetVDC(vdcName string) (vdc *v1.VDC, err error)

GetVDC return the vdc using the name provided in the argument. If the name is empty, it will try to use the default vdc provided in the provider.

func (*CloudAvenue) GetVDCGroup

func (c *CloudAvenue) GetVDCGroup(vdcGroupName string) (vdcGroup *v1.VDCGroup, err error)

GetVDCGroup return the vdc group using the name provided in the argument.

func (*CloudAvenue) GetVDCOrVDCGroup

func (c *CloudAvenue) GetVDCOrVDCGroup(vdcOrVDCGroupName string) (v1.VDCOrVDCGroupInterface, error)

GetVDCOrVDCGroup return the vdc or vdc group using the name provided in the argument.

func (*CloudAvenue) New

func (c *CloudAvenue) New() (*CloudAvenue, error)

New creates a new CloudAvenue client.

type VAPP

type VAPP struct {
	*govcd.VApp
}

func (VAPP) GetDeploymentLeaseInSeconds added in v0.2.0

func (v VAPP) GetDeploymentLeaseInSeconds() int

GetDeploymentLeaseInSeconds retrieves the lease duration in seconds for a deployment.

func (VAPP) GetDescription

func (v VAPP) GetDescription() string

GetDescription give you the status code of the vApp.

func (VAPP) GetHREF

func (v VAPP) GetHREF() string

GetHREF give you the HREF of the vApp.

func (VAPP) GetID

func (v VAPP) GetID() string

GetID give you the ID of the vApp.

func (VAPP) GetName

func (v VAPP) GetName() string

GetName give you the name of the vApp.

func (VAPP) GetStatusCode

func (v VAPP) GetStatusCode() int

GetStatusCode give you the status code of the vApp.

func (VAPP) GetStorageLeaseInSeconds added in v0.2.0

func (v VAPP) GetStorageLeaseInSeconds() int

GetStorageLeaseInSeconds retrieves the lease duration in seconds for a storage resource.

func (VAPP) IsVAPPNetwork added in v0.3.0

func (v VAPP) IsVAPPNetwork(networkName string) (bool, error)

IsVAPPNetwork check if it is a vApp network (not vApp Org Network).

func (VAPP) IsVAPPOrgNetwork added in v0.3.0

func (v VAPP) IsVAPPOrgNetwork(networkName string) (bool, error)

IsVAPPOrgNetwork check if it is a vApp Org Network (not vApp network).

type VM added in v0.3.0

type VM struct {
	*govcd.VM
}

func (VM) CpusCoresIsDefined added in v0.3.0

func (v VM) CpusCoresIsDefined() bool

CpusCoresIsDefined returns true if the number of cores per CPU of a VM is defined.

func (VM) CpusIsDefined added in v0.3.0

func (v VM) CpusIsDefined() bool

CpusIsDefined returns true if the number of CPUs of a VM is defined.

func (VM) GetAffinityRuleID added in v0.3.0

func (v VM) GetAffinityRuleID() string

GetAffinityRuleID returns the affinity rule ID of a VM.

func (VM) GetAffinityRuleIDOrDefault added in v0.3.0

func (v VM) GetAffinityRuleIDOrDefault() (string, error)

GetAffinityRuleIDOrDefault returns the affinity rule ID of a VM or the default affinity rule ID if the VM has no affinity rule ID.

func (VM) GetCPUHotAddEnabled added in v0.3.0

func (v VM) GetCPUHotAddEnabled() bool

GetCPUHotAddEnabled returns the hot add of a VM.

func (VM) GetCpus added in v0.3.0

func (v VM) GetCpus() int

GetCpus returns the number of CPUs of a VM.

func (VM) GetCpusCores added in v0.3.0

func (v VM) GetCpusCores() int

GetCpusCores returns the number of cores per CPU of a VM.

func (VM) GetCustomization added in v0.3.0

func (v VM) GetCustomization() (guestCustomization *govcdtypes.GuestCustomizationSection, err error)

GetCustomization returns the customization of a VM.

func (VM) GetDefaultAffinityRuleID added in v0.3.0

func (v VM) GetDefaultAffinityRuleID() (string, error)

GetDefaultAffinityRuleID returns the default affinity rule ID of a VM.

func (VM) GetExposeHardwareVirtualization added in v0.3.0

func (v VM) GetExposeHardwareVirtualization() bool

GetExposeHardwareVirtualization returns the expose hardware virtualization of a VM.

func (VM) GetGuestProperties added in v0.3.0

func (v VM) GetGuestProperties() (guestProperties []*govcdtypes.Property, err error)

* Guest properties GetGuestProperties returns the guest properties of a VM.

func (VM) GetMemory added in v0.3.0

func (v VM) GetMemory() int64

GetMemory returns the memory of a VM.

func (VM) GetMemoryHotAddEnabled added in v0.3.0

func (v VM) GetMemoryHotAddEnabled() bool

GetMemoryHotAddEnabled returns the hot add of a VM.

func (VM) GetNetworkConnection added in v0.3.0

func (v VM) GetNetworkConnection() (networkConnections []*govcdtypes.NetworkConnection)

GetNetworkConnection returns the network connection of a VM.

func (VM) GetOSType added in v0.3.0

func (v VM) GetOSType() string

GetOSType returns the OS type of a VM.

func (VM) GetStorageProfileName added in v0.3.0

func (v VM) GetStorageProfileName() string

GetStorageProfileName returns the storage profile name of a VM.

func (VM) HotAddIsDefined added in v0.3.0

func (v VM) HotAddIsDefined() bool

HotAddIsDefined returns true if the hot add of a VM is defined.

func (VM) MemoryIsDefined added in v0.3.0

func (v VM) MemoryIsDefined() bool

MemoryIsDefined returns true if the memory of a VM is defined.

func (VM) NetworkConnectionIsDefined added in v0.3.0

func (v VM) NetworkConnectionIsDefined() bool

NetworkConnectionIsDefined checks if a network connection is defined.

func (VM) SetCustomization added in v0.3.0

func (v VM) SetCustomization(guestCustomization *govcdtypes.GuestCustomizationSection) (err error)

SetCustomization sets the customization of a VM.

func (VM) SetExposeHardwareVirtualization added in v0.3.0

func (v VM) SetExposeHardwareVirtualization(isEnabled bool) (err error)

SetExposeHardwareVirtualization sets the expose hardware virtualization of a VM.

func (VM) SetGuestProperties added in v0.3.0

func (v VM) SetGuestProperties(guestProperties map[string]string) (err error)

SetGuestProperties sets the guest properties of a VM If the guest property already exists, it will be updated.

func (VM) SetOSType added in v0.3.0

func (v VM) SetOSType(osType string) (err error)

SetOSType sets the OS type of a VM.

Jump to

Keyboard shortcuts

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