Documentation ¶
Index ¶
- type Datacenter
- func (dc *Datacenter) AddPerfMetrics(data map[types.ManagedObjectReference][]performance.PerfMetric)
- func (dc *Datacenter) FindHost(computeResourceReference mor) *mo.HostSystem
- func (dc *Datacenter) FindResourcePools(clusterReference mor) (rp []*mo.ResourcePool)
- func (dc *Datacenter) GetPerfMetrics(ref mor) []performance.PerfMetric
- func (dc *Datacenter) GetResourcePool(resourcePoolReference mor) (*mo.ResourcePool, bool)
- func (dc *Datacenter) IsDefaultResourcePool(resourcePoolReference mor) bool
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
Click to show internal directories.
Click to hide internal directories.