Documentation ¶
Index ¶
- func GetStoragePodMoList(ctx context.Context, client *vim25.Client, ...) ([]mo.StoragePod, error)
- func GetVMObject(ctx context.Context, conn *vclib.VSphereConnection, vmUUID string) (*vclib.VirtualMachine, error)
- func IsDevMode() bool
- func IsStoragePod(ctx context.Context, vmObj *vclib.VirtualMachine, name string) (bool, *object.StoragePod, error)
- func NewClient(cfg *VSphereConfig) (storageops.Ops, error)
- type VSphereConfig
- type VSphereInstance
- type VirtualCenterConfig
- type VirtualDisk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStoragePodMoList ¶
func GetStoragePodMoList( ctx context.Context, client *vim25.Client, storagePodRefs []types.ManagedObjectReference, properties []string) ([]mo.StoragePod, error)
GetStoragePodMoList fetches the managed storage pod objects for the given references
Only the properties is the given property list will be populated in the response
func GetVMObject ¶
func GetVMObject(ctx context.Context, conn *vclib.VSphereConnection, vmUUID string) (*vclib.VirtualMachine, error)
GetVMObject fetches the VirtualMachine object corresponding to the given virtual machine uuid
func IsDevMode ¶
func IsDevMode() bool
IsDevMode checks if requirement env variables are set to run the pkg outside vsphere in dev mode
func IsStoragePod ¶
func IsStoragePod(ctx context.Context, vmObj *vclib.VirtualMachine, name string) (bool, *object.StoragePod, error)
IsStoragePod checks if the object with given name is a StoragePod (Datastore cluster)
func NewClient ¶
func NewClient(cfg *VSphereConfig) (storageops.Ops, error)
NewClient creates a new vsphere storageops instance
Types ¶
type VSphereConfig ¶
type VSphereConfig struct { // User is the vCenter username. User string // Password is the vCenter password in clear text. Password string // VCenterIP is the vcenter IP to connect on VCenterIP string // VCenterPort is the vcenter port to connect on VCenterPort string // InsecureFlag True if vCenter uses self-signed cert. InsecureFlag bool // RoundTripperCount is the Soap round tripper count (retries = RoundTripper - 1) RoundTripperCount uint // VMUUID is the VM Instance UUID of virtual machine which can be retrieved from instanceUuid // property in VmConfigInfo, or also set as vc.uuid in VMX file. // If not set, will be fetched from the machine via sysfs (requires root) VMUUID string }
derived from https://github.com/kubernetes/kubernetes/blob/release-1.9/pkg/cloudprovider/providers/vsphere/vsphere_util.go#L94 VSphereConfig represents the vsphere configuration
func ReadVSphereConfigFromEnv ¶
func ReadVSphereConfigFromEnv() (*VSphereConfig, error)
type VSphereInstance ¶
type VSphereInstance struct {
// contains filtered or unexported fields
}
Represents a vSphere instance where one or more kubernetes nodes are running.
type VirtualCenterConfig ¶
type VirtualCenterConfig struct { // vCenter username. User string // vCenter password in clear text. Password string // vCenter port VCenterPort string // Datacenter in which VMs are located. Datacenter string // Soap round tripper count (retries = RoundTripper - 1) RoundTripperCount uint }
Structure that represents Virtual Center configuration
type VirtualDisk ¶
type VirtualDisk struct { diskmanagers.VirtualDisk // DatastoreRef is the managed object reference of the datastore on which the disk belongs DatastoreRef types.ManagedObjectReference }
VirtualDisk encapsulates the existing virtual disk object to add a managed object reference to the datastore of the disk