Documentation ¶
Index ¶
- Constants
- func Connect(ctx context.Context, hostname string, username string, password string) (*govmomi.Client, error)
- func ExtractUrl(hostname string) (*url.URL, error)
- func Find(obj interface{}, key string) (interface{}, bool)
- func StringOrEnv(str string, envName string) (string, error)
- type Runner
- type VSphereRest
- type VsphereDatastore
- type VsphereDatastores
- type VsphereHost
Constants ¶
View Source
const ( EnvURL = "VC_URL" EnvUserName = "VC_USERNAME" EnvPassword = "VC_PASSWORD" EnvInsecure = "VC_INSECURE" )
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(ctx context.Context, hostname string, username string, password string) (*govmomi.Client, error)
Connect Function open connection to vCenter or ESXi.
Types ¶
type VSphereRest ¶
VSphereRest main rest api struct
func (*VSphereRest) GetDatastores ¶
func (rest *VSphereRest) GetDatastores(ctx context.Context, path string) (*VsphereDatastores, error)
GetDatastores upload a file to target datastore.
type VsphereDatastore ¶
type VsphereDatastore struct { DatacenterPath string `json:"DatacenterPath" yaml:"DatacenterPath"` InventoryPath string `json:"InventoryPath" yaml:"InventoryPath"` Name string `json:"Name" yaml:"Name"` Hosts map[string]VsphereHost `json:"Hosts" yaml:"Hosts"` Type types.HostFileSystemVolumeFileSystemType `json:"Type" yaml:"Type"` }
VsphereDatastore vsphere datastore Example /Datacenter is path
type VsphereDatastores ¶
type VsphereDatastores struct {
Datastores map[string]VsphereDatastore
}
type VsphereHost ¶
type VsphereHost struct { Reference string `json:"Reference" yaml:"Reference"` ManagementIPs []net.IP `json:"ManagementAddress" yaml:"ManagementAddress"` Disks []types.HostScsiDisk `json:"Disks" yaml:"Disks"` }
VsphereHost A datastore host
Click to show internal directories.
Click to hide internal directories.