resource

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_RESOURCE_TYPE_VIRTUAL_MACHINE                 string = "Virtual Machine"
	CLUSTER_RESOURCE_TYPE_VIRTUAL_MACHINE_CONFIGURATION   string = "Virtual Machine Configuration"
	CLUSTER_RESOURCE_TYPE_DISTRIBUTED_NETWORK_NAME        string = "Distributed Network Name"
	CLUSTER_RESOURCE_TYPE_CLUSTER_AWARE_UPDATING_RESOURCE string = "ClusterAwareUpdatingResource"
	CLUSTER_RESOURCE_TYPE_IP_ADDRESS                      string = "IP Address"
	CLUSTER_RESOURCE_TYPE_IPV6_ADDRESS                    string = "IPv6 Address"
	CLUSTER_RESOURCE_TYPE_NETWORK_NAME                    string = "Network Name"
	CLUSTER_RESOURCE_TYPE_STORAGE_POOL                    string = "Storage Pool"
	CLUSTER_RESOURCE_TYPE_PHYSICAL_DISK                   string = "Physical Disk"
	CLUSTER_RESOURCE_TYPE_FILE_SHARE_WITNESS              string = "File Share Witness"
	CLUSTER_RESOURCE_TYPE_HEALTH_SERVICE                  string = "Health Service"
	CLUSTER_RESOURCE_TYPE_GENERIC_SERVICE                 string = "Generic Service"
	CLUSTER_RESOURCE_TYPE_SDDC_MANAGEMENT                 string = "SDDC Management"
	CLUSTER_RESOURCE_TYPE_VIRTUAL_MACHNE_CLUSTER_WMI      string = "Virtual Machine Cluster WMI"
	CLUSTER_RESOURCE_TYPE_STORAGE_QOS_POLICY_MANAGER      string = "Storage QoS Policy Manager"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	*fc.MSCluster_Resource
}

func GetResource

func GetResource(whost *host.WmiHost, grpSetName string) (crSet *Resource, err error)

GetResource gets an existing virtual machine Make sure to call Close once done using this instance

func GetVirtualMachineResource

func GetVirtualMachineResource(whost *host.WmiHost, virtualMachineName string) (crgSet *Resource, err error)

GetVirtualMachineResource gets an existing virtual machine resource group Make sure to call Close once done using this instance

func GetVirtualMachineResourceByVmID

func GetVirtualMachineResourceByVmID(whost *host.WmiHost, vmID string) (crgSet *Resource, err error)

GetVirtualMachineResourceByVmID gets an existing virtual machine resource group Make sure to call Close once done using this instance

func NewResource

func NewResource(instance *wmi.WmiInstance) (*Resource, error)

NewResource

func (*Resource) GetPossibleOwnersEx1

func (c *Resource) GetPossibleOwnersEx1() (nodeNames []string, err error)

func (*Resource) State

func (c *Resource) State() (value int32, err error)

State gets the value of for the instance

type ResourceCollection

type ResourceCollection []*Resource

func GetResources

func GetResources(whost *host.WmiHost) (crSetcollection ResourceCollection, err error)

GetResource gets an existing virtual machine Make sure to call Close once done using this instance

func GetVirtualMachineResources

func GetVirtualMachineResources(whost *host.WmiHost) (crSetcollection ResourceCollection, err error)

GetVirtualMachineResources gets list of resource groups that are of type VirtualMachine Make sure to call Close once done using this instance

func NewResourceCollection

func NewResourceCollection(instances []*wmi.WmiInstance) (col ResourceCollection, err error)

func (*ResourceCollection) Close

func (instances *ResourceCollection) Close() (err error)

func (*ResourceCollection) String

func (instances *ResourceCollection) String() string

Jump to

Keyboard shortcuts

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