internal

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVMID

func GetVMID(xmlContent string) (vmID string, err error)

GetVMID This function is a hack to obtain VM ID. There could be a better pure WMI way to obtain the ID which requires more investigation We are currently using the XML from the embedded instance to obtain the VM ID

Types

type Instance

type Instance struct {
	XMLName          xml.Name         `xml:"INSTANCE"`
	ClassName        string           `xml:"CLASSNAME,attr"`
	Properties       []Property       `xml:"PROPERTY"`
	PropertiesObject []PropertyObject `xml:"PROPERTY.OBJECT"`
	PropertiesArray  []PropertyArray  `xml:"PROPERTY.ARRAY"`
}

type Property

type Property struct {
	XMLName     xml.Name `xml:"PROPERTY"`
	Name        string   `xml:"NAME,attr"`
	ClassOrigin string   `xml:"CLASSORIGIN,attr"`
	Type        string   `xml:"TYPE,attr"`
	Value       string   `xml:"VALUE"`
}

type PropertyArray

type PropertyArray struct {
	XMLName        xml.Name `xml:"PROPERTY.ARRAY"`
	Name           string   `xml:"NAME,attr"`
	ClassOrigin    string   `xml:"CLASSORIGIN,attr"`
	ReferenceClass string   `xml:"REFERENCECLASS,attr"`
	Value          Values   `xml:"VALUE.ARRAY"`
}

type PropertyObject

type PropertyObject struct {
	XMLName        xml.Name    `xml:"PROPERTY.OBJECT"`
	Name           string      `xml:"NAME,attr"`
	ClassOrigin    string      `xml:"CLASSORIGIN,attr"`
	ReferenceClass string      `xml:"REFERENCECLASS,attr"`
	Value          ValueObject `xml:"VALUE.OBJECT"`
}

type ValueObject

type ValueObject struct {
	XMLName  xml.Name `xml:"VALUE.OBJECT"`
	Name     string   `xml:"NAME,attr"`
	Instance *Instance
}

type Values

type Values struct {
	Value []string `xml:"VALUE"`
}

Jump to

Keyboard shortcuts

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