model

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datacenter

type Datacenter struct {
	Datacenter      *mo.Datacenter
	EventDispacher  *events.EventDispacher
	Hosts           map[mor]*mo.HostSystem
	Clusters        map[mor]*mo.ClusterComputeResource
	ResourcePools   map[mor]*mo.ResourcePool
	Datastores      map[mor]*mo.Datastore
	Networks        map[mor]*mo.Network
	VirtualMachines map[mor]*mo.VirtualMachine
	PerfMetrics     map[mor][]performance.PerfMetric
	PerfMetricsMux  sync.Mutex
}

Datacenter struct

func NewDatacenter

func NewDatacenter(datacenter *mo.Datacenter) *Datacenter

NewDatacenter Initialize datacenter struct

func (*Datacenter) AddPerfMetrics

func (dc *Datacenter) AddPerfMetrics(data map[types.ManagedObjectReference][]performance.PerfMetric)

AddTags appends a tag batch to dc Tags map

func (*Datacenter) FindHost

func (dc *Datacenter) FindHost(computeResourceReference mor) *mo.HostSystem

FindHost returns the child Host for a computeResource

func (*Datacenter) FindResourcePools

func (dc *Datacenter) FindResourcePools(clusterReference mor) (rp []*mo.ResourcePool)

FindResourcePools finds the ResourcePool associated to a Cluster except for the default resource pool

func (*Datacenter) GetPerfMetrics

func (dc *Datacenter) GetPerfMetrics(ref mor) []performance.PerfMetric

GetPerfMetrics returns the slice of Perf metrics for the given object reference

func (*Datacenter) GetResourcePool

func (dc *Datacenter) GetResourcePool(resourcePoolReference mor) (*mo.ResourcePool, bool)

GetResourcePool returns the name of the Resource Pool if is not the default

func (*Datacenter) IsDefaultResourcePool

func (dc *Datacenter) IsDefaultResourcePool(resourcePoolReference mor) bool

IsDefaultResourcePool returns true if the resource pool is the default

Jump to

Keyboard shortcuts

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