vcenter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Overview

Package vcenter contains vCenter object types.

Index

Constants

View Source
const (
	// ClusterDefaultResourcePoolName is the default resource pool name for a cluster.
	ClusterDefaultResourcePoolName = "Resources"

	// ClusterInventoryPath is the path for cluster inventory.
	ClusterInventoryPath = "/%s/host/%s"

	// DefaultDomain is the default vCenter domain.
	DefaultDomain = "VSPHERE.LOCAL"

	// HostSystemInventoryPath is the path for host system inventory.
	HostSystemInventoryPath = "/%s/host/%s/%s"

	// ResourcePoolInventoryPath is the path for resource pool inventory.
	ResourcePoolInventoryPath = "/%s/host/%s/Resources/%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	// Insecure controls whether to validate the vCenter server's certificate.
	Insecure bool `json:"insecure" yaml:"insecure"`

	// Password is the vCenter password.
	Password string `json:"password" yaml:"password"`

	// Username is the vCenter username.
	Username string `json:"username" yaml:"username"`

	// Host is the vCenter URL.
	Host string `json:"host" yaml:"host"`
}

Account contains vCenter account details.

func (Account) Userinfo

func (a Account) Userinfo() *url.Userinfo

Userinfo returns a vCenter account's credentials in Userinfo format.

type AdditionalDisk

type AdditionalDisk struct {
	Name      string
	Device    string
	Capacity  string
	Used      string
	Available string
	Usage     string
}

AdditionalDisk defines an additional disk.

type Datastore

type Datastore struct {
	Name string
	ID   string
}

Datastore defines a datastore

type HostDateInfo

type HostDateInfo struct {
	types.HostDateTimeInfo
	HostName      string
	NTPServers    []string
	Service       *types.HostService
	Current       *time.Time
	ClientStatus  string
	ServiceStatus string
}

HostDateInfo defines date information for a vCenter host system.

func (*HostDateInfo) Servers

func (i *HostDateInfo) Servers() []string

Servers returns a slice of NTP servers for a vCenter host system.

type HostSystem

type HostSystem struct {
	Name      string
	Reference string
}

HostSystem defines a vCenter host system.

type Metrics

type Metrics struct {
	CPUCores        string
	CPUUsage        string
	MemoryBytes     string
	MemoryUsage     string
	DiskUsage       string
	DiskProvisioned string
}

Metrics defines the VM metrics.

type Network

type Network struct {
	Type      string
	IP        string
	Interface string
}

Network defines a vCenter network.

type SSHInfo

type SSHInfo struct {
	Username   string
	Password   string
	PublicKey  []string
	PrivateKey []string
}

SSHInfo defines the SSH information.

type VM

type VM struct {
	Name           string
	Type           string
	Status         string
	IPAddress      string
	Host           string
	CPU            int32
	Memory         int32
	RootDiskSize   int32
	Network        []Network
	VMInfo         VMInfo
	SSHInfo        SSHInfo
	AdditionalDisk []AdditionalDisk
	Metrics        Metrics
	Storage        []Datastore
}

VM defines a vCenter virtual machine.

type VMInfo

type VMInfo struct {
	Folder    string
	Cluster   string
	Datastore string
	Network   string
}

VMInfo defines scope information for a vCenter VM.

Directories

Path Synopsis
Package entity contains vCenter objects/entities.
Package entity contains vCenter objects/entities.

Jump to

Keyboard shortcuts

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