juju: github.com/juju/juju/provider/vsphere Index | Files | Directories

package vsphere

import "github.com/juju/juju/provider/vsphere"

Index

Package Files

client.go config.go credentials.go environ.go environ_availzones.go environ_broker.go environ_instance.go environ_network.go environ_policy.go errors.go image_metadata.go init.go instance.go instance_information.go provider.go session.go storage.go upgrades.go userdata.go

Variables

var Bootstrap = common.Bootstrap

this variable is exported, because it has to be rewritten in external unit tests

var DestroyEnv = common.Destroy

this variable is exported, because it has to be rewritten in external unit tests

var FinishInstanceConfig = instancecfg.FinishInstanceConfig

this variable is exported, because it has to be rewritten in external unit tests

func HandleCredentialError Uses

func HandleCredentialError(err error, ctx context.ProviderCallContext)

HandleCredentialError marks the current credential as invalid if the passed vsphere error indicates it should be.

func IsAuthorisationFailure Uses

func IsAuthorisationFailure(err error) bool

IsAuthorisationFailure determines whether the given error indicates that the vsphere credential used is bad.

func NewEnvironProvider Uses

func NewEnvironProvider(config EnvironProviderConfig) environs.CloudEnvironProvider

NewEnvironProvider returns a new environs.EnvironProvider that will dial vSphere connectons with the given dial function.

type Client Uses

type Client interface {
    Close(context.Context) error
    ComputeResources(context.Context) ([]*mo.ComputeResource, error)
    ResourcePools(context.Context, string) ([]*object.ResourcePool, error)
    CreateVirtualMachine(context.Context, vsphereclient.CreateVirtualMachineParams) (*mo.VirtualMachine, error)
    Datastores(context.Context) ([]*mo.Datastore, error)
    DeleteDatastoreFile(context.Context, string) error
    DestroyVMFolder(context.Context, string) error
    EnsureVMFolder(context.Context, string) (*object.Folder, error)
    MoveVMFolderInto(context.Context, string, string) error
    MoveVMsInto(context.Context, string, ...types.ManagedObjectReference) error
    RemoveVirtualMachines(context.Context, string) error
    UpdateVirtualMachineExtraConfig(context.Context, *mo.VirtualMachine, map[string]string) error
    VirtualMachines(context.Context, string) ([]*mo.VirtualMachine, error)
    UserHasRootLevelPrivilege(context.Context, string) (bool, error)
}

Client is an interface for interacting with the vSphere API.

type DialFunc Uses

type DialFunc func(_ context.Context, _ *url.URL, datacenter string) (Client, error)

DialFunc is a function type for dialing vSphere client connections.

type EnvironProviderConfig Uses

type EnvironProviderConfig struct {
    // Dial is a function used for dialing connections to vCenter/ESXi.
    Dial DialFunc
}

EnvironProviderConfig contains configuration for the EnvironProvider.

type OvaFileMetadata Uses

type OvaFileMetadata struct {
    URL      string
    Arch     string `json:"arch"`
    Size     int    `json:"size"`
    Path     string `json:"path"`
    FileType string `json:"ftype"`
    Sha256   string `json:"sha256"`
    Md5      string `json:"md5"`
}

type VsphereRenderer Uses

type VsphereRenderer struct{}

func (VsphereRenderer) Render Uses

func (VsphereRenderer) Render(cfg cloudinit.CloudConfig, os jujuos.OSType) ([]byte, error)

Directories

PathSynopsis
internal/ovatest
internal/vsphereclient

Package vsphere imports 43 packages (graph) and is imported by 31 packages. Updated 2019-10-23. Refresh now. Tools for package owners.