package
0.0.0-20240819180206-1aa1ecb48432
Repository: https://github.com/libopenstorage/cloudops.git
Documentation: pkg.go.dev

# README

To test vSphere

You will first need to have a vSphere environment and then provide details of the vcenter server and VM as below.

export VSPHERE_VCENTER=my-vc.demo.com
export VSPHERE_VCENTER_PORT=443
export [email protected]
export VSPHERE_PASSWORD=my-vc-password
export VSPHERE_INSECURE=true

# To get VSPHERE_VM_UUID, go to https://<vcenter-ip>/mob/?moid=<VM-MOREF>&doPath=config and get the "uuid" field value
# To get the VM-MOREF, select the VM in vcenter server and you will see a string of format "VirtualMachine:vm-155" in the URL. vm-155 is the moref.

export VSPHERE_VM_UUID=42124a20-d049-9c0a-0094-1552b320fb18
export VSPHERE_TEST_DATASTORE=<test-datastore-to-use>

# VSPHERE_TEST_DATASTORE above can be a vSphere datastore or datastore cluster name. When testing changes, it is recommended to test with both.

go test -v

# Packages

No description provided by the author
No description provided by the author

# Functions

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.
GetVMObject fetches the VirtualMachine object corresponding to the given virtual machine uuid.
IsDevMode checks if requirement env variables are set to run the pkg outside vsphere in dev mode.
IsStoragePod checks if the object with given name is a StoragePod (Datastore cluster).
NewClient creates a new vsphere cloudops instance.
ReadVSphereConfigFromEnv sources vsphere config from well known environment variables.

# Constants

DiskAttachMode for attaching vmdk to vms persistent, independent-persistent, independent-persistent.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
for tests.

# Structs

VirtualCenterConfig represents Virtual Center configuration.
VirtualDisk encapsulates the existing virtual disk object to add a managed object reference to the datastore of the disk.
VSphereConfig represents the vsphere configuration derived from https://github.com/kubernetes/kubernetes/blob/release-1.9/pkg/cloudprovider/providers/vsphere/vsphere_util.go#L94.
VSphereInstance Represents a vSphere instance where one or more kubernetes nodes are running.