package ovf

import "github.com/vmware/govmomi/ovf"

Package ovf provides functionality to unmarshal and inspect the structure of an OVF file. It is not a complete implementation of the specification and is intended to be used to import virtual infrastructure into vSphere.

For a complete specification of the OVF standard, refer to: https://www.dmtf.org/sites/default/files/standards/documents/DSP0243_2.1.0.pdf

Index

Constants

const (
	ResourceSubTypeSoundCardSB16          = "vmware.soundcard.sb16"
	ResourceSubTypeSoundCardEnsoniq1371   = "vmware.soundcard.ensoniq1371"
	ResourceSubTypeSoundCardHDAudio       = "vmware.soundcard.hdaudio"
	ResourceSubTypePCIController          = "vmware.pcicontroller"
	ResourceSubTypePS2Controller          = "vmware.ps2controller"
	ResourceSubTypeSIOController          = "vmware.siocontroller"
	ResourceSubTypeKeyboard               = "vmware.keyboard"
	ResourceSubTypePointingDevice         = "vmware.pointingdevice"
	ResourceSubTypeVMCI                   = "vmware.vmci"
	ResourceSubTypeUSBEHCI                = "vmware.usb.ehci" /* USB 2.0 */
	ResourceSubTypeUSBXHCI                = "vmware.usb.xhci" /* USB 3.0 */
	ResourceSubTypeCdromISO               = "vmware.cdrom.iso"
	ResourceSubTypeCDROMRemotePassthrough = "vmware.cdrom.remotepassthrough"
	ResourceSubTypeCDROMRemoteATAPI       = "vmware.cdrom.remoteatapi"
	ResourceSubTypeCDROMPassthrough       = "vmware.cdrom.passthrough"
	ResourceSubTypeCDROMATAPI             = "vmware.cdrom.atapi"
	ResourceSubTypeFloppyDevice           = "vmware.floppy.device"
	ResourceSubTypeFloppyImage            = "vmware.floppy.image"
	ResourceSubTypeFloppyRemoveDevice     = "vmware.floppy.remotedevice"
	ResourceSubTypeSCSIPassthrough        = "vmware.scsi.passthrough"
	ResourceSubTypeParallelPortDevice     = "vmware.parallelport.device"
	ResourceSubTypeParallelPortFile       = "vmware.parallelport.file"
	ResourceSubTypeSerialPortDevice       = "vmware.serialport.device"
	ResourceSubTypeSerialPortFile         = "vmware.serialport.file"
	ResourceSubTypeSerialPortPipe         = "vmware.serialport.pipe"
	ResourceSubTypeSerialPortURI          = "vmware.serialport.uri"
	ResourceSubTypeSerialPortThinPrint    = "vmware.serialport.thinprint"
	ResourceSubTypeSATAAHCI               = "vmware.sata.ahci"
	ResourceSubTypeSATAAHCIAlter          = "ahci"
	ResourceSubTypeNVMEController         = "vmware.nvme.controller"
	ResourceSubTypeNVDIMMController       = "vmware.nvdimm.controller"
	ResourceSubTypeNVDIMMDevice           = "vmware.nvdimm.device"
	ResourceSubTypePCIPassthrough         = "vmware.pci.passthrough"
	ResourceSubTypePCIPassthroughDVX      = "vmware.pci.passthrough-dvx"
	ResourceSubTypePCIPassthroughAH       = "vmware.pci.passthrough-ah"
	ResourceSubTypePCIPassthroughVMIOP    = "vmware.pci.passthrough-vmiop"
	ResourceSubTypePrecisionClock         = "vmware.precisionclock"
	ResourceSubTypeWatchdogTimer          = "vmware.watchdogtimer"
	ResourceSubTypeVTPM                   = "vmware.vtpm"
)

Functions

func ParseCapacityAllocationUnits

func ParseCapacityAllocationUnits(s string) int64

ParseCapacityAllocationUnits validates the string s is a valid programmatic unit with respect to the base unit 'byte' and parses the string to return the number of bytes s represents

Types

type AnnotationSection

type AnnotationSection struct {
	Section

	Annotation string `xml:"Annotation" json:"annotation,omitempty"`
}

type CIMResourceAllocationSettingData

type CIMResourceAllocationSettingData struct {
	ElementName string `xml:"ElementName" json:"elementName,omitempty"`
	InstanceID  string `xml:"InstanceID" json:"instanceID,omitempty"`

	ResourceType      *CIMResourceType `xml:"ResourceType" json:"resourceType,omitempty"`
	OtherResourceType *string          `xml:"OtherResourceType" json:"otherResourceType,omitempty"`
	ResourceSubType   *string          `xml:"ResourceSubType" json:"resourceSubType,omitempty"`

	AddressOnParent       *string  `xml:"AddressOnParent" json:"addressOnParent,omitempty"`
	Address               *string  `xml:"Address" json:"address,omitempty"`
	AllocationUnits       *string  `xml:"AllocationUnits" json:"allocationUnits,omitempty"`
	AutomaticAllocation   *bool    `xml:"AutomaticAllocation" json:"automaticAllocation,omitempty"`
	AutomaticDeallocation *bool    `xml:"AutomaticDeallocation" json:"automaticDeallocation,omitempty"`
	Caption               *string  `xml:"Caption" json:"caption,omitempty"`
	Connection            []string `xml:"Connection" json:"connection,omitempty"`
	ConsumerVisibility    *uint16  `xml:"ConsumerVisibility" json:"consumerVisibility,omitempty"`
	Description           *string  `xml:"Description" json:"description,omitempty"`
	HostResource          []string `xml:"HostResource" json:"hostResource,omitempty"`
	Limit                 *uint64  `xml:"Limit" json:"limit,omitempty"`
	MappingBehavior       *uint    `xml:"MappingBehavior" json:"mappingBehavior,omitempty"`
	Parent                *string  `xml:"Parent" json:"parent,omitempty"`
	PoolID                *string  `xml:"PoolID" json:"poolID,omitempty"`
	Reservation           *uint64  `xml:"Reservation" json:"reservation,omitempty"`
	VirtualQuantity       *uint    `xml:"VirtualQuantity" json:"virtualQuantity,omitempty"`
	VirtualQuantityUnits  *string  `xml:"VirtualQuantityUnits" json:"virtualQuantityUnits,omitempty"`
	Weight                *uint    `xml:"Weight" json:"weight,omitempty"`
}

type CIMResourceType

type CIMResourceType uint16

Source:

const (
	Other              CIMResourceType = 1
	ComputerSystem     CIMResourceType = 2
	Processor          CIMResourceType = 3
	Memory             CIMResourceType = 4
	IdeController      CIMResourceType = 5
	ParallelScsiHba    CIMResourceType = 6
	FcHba              CIMResourceType = 7
	IScsiHba           CIMResourceType = 8
	IbHba              CIMResourceType = 9
	EthernetAdapter    CIMResourceType = 10
	OtherNetwork       CIMResourceType = 11
	IoSlot             CIMResourceType = 12
	IoDevice           CIMResourceType = 13
	FloppyDrive        CIMResourceType = 14
	CdDrive            CIMResourceType = 15
	DvdDrive           CIMResourceType = 16
	DiskDrive          CIMResourceType = 17
	TapeDrive          CIMResourceType = 18
	StorageExtent      CIMResourceType = 19
	OtherStorage       CIMResourceType = 20
	SerialPort         CIMResourceType = 21
	ParallelPort       CIMResourceType = 22
	UsbController      CIMResourceType = 23
	Graphics           CIMResourceType = 24
	Ieee1394           CIMResourceType = 25
	PartitionableUnit  CIMResourceType = 26
	BasePartitionable  CIMResourceType = 27
	PowerSupply        CIMResourceType = 28
	CoolingDevice      CIMResourceType = 29
	EthernetSwitchPort CIMResourceType = 30
	LogicalDisk        CIMResourceType = 31
	StorageVolume      CIMResourceType = 32
	EthernetConnection CIMResourceType = 33
)

Please note, the iota pattern is not used to ensure these constants remain affixed to an explicit value.

type CIMStorageAllocationSettingData

type CIMStorageAllocationSettingData struct {
	ElementName string `xml:"ElementName" json:"elementName"`
	InstanceID  string `xml:"InstanceID" json:"instanceID"`

	ResourceType      *CIMResourceType `xml:"ResourceType" json:"resourceType,omitempty"`
	OtherResourceType *string          `xml:"OtherResourceType" json:"otherResourceType,omitempty"`
	ResourceSubType   *string          `xml:"ResourceSubType" json:"resourceSubType,omitempty"`

	Access                       *uint16         `xml:"Access" json:"access,omitempty"`
	Address                      *string         `xml:"Address" json:"address,omitempty"`
	AddressOnParent              *string         `xml:"AddressOnParent" json:"addressOnParent,omitempty"`
	AllocationUnits              *string         `xml:"AllocationUnits" json:"allocationUnits,omitempty"`
	AutomaticAllocation          *bool           `xml:"AutomaticAllocation" json:"automaticAllocation,omitempty"`
	AutomaticDeallocation        *bool           `xml:"AutomaticDeallocation" json:"automaticDeallocation,omitempty"`
	Caption                      *string         `xml:"Caption" json:"caption,omitempty"`
	ChangeableType               *uint16         `xml:"ChangeableType" json:"changeableType,omitempty"`
	ComponentSetting             []types.AnyType `xml:"ComponentSetting" json:"componentSetting,omitempty"`
	ConfigurationName            *string         `xml:"ConfigurationName" json:"configurationName,omitempty"`
	Connection                   []string        `xml:"Connection" json:"connection,omitempty"`
	ConsumerVisibility           *uint16         `xml:"ConsumerVisibility" json:"consumerVisibility,omitempty"`
	Description                  *string         `xml:"Description" json:"description,omitempty"`
	Generation                   *uint64         `xml:"Generation" json:"generation,omitempty"`
	HostExtentName               *string         `xml:"HostExtentName" json:"hostExtentName,omitempty"`
	HostExtentNameFormat         *uint16         `xml:"HostExtentNameFormat" json:"hostExtentNameFormat,omitempty"`
	HostExtentNameNamespace      *uint16         `xml:"HostExtentNameNamespace" json:"hostExtentNameNamespace,omitempty"`
	HostExtentStartingAddress    *uint64         `xml:"HostExtentStartingAddress" json:"hostExtentStartingAddress,omitempty"`
	HostResource                 []string        `xml:"HostResource" json:"hostResource,omitempty"`
	HostResourceBlockSize        *uint64         `xml:"HostResourceBlockSize" json:"hostResourceBlockSize,omitempty"`
	Limit                        *uint64         `xml:"Limit" json:"limit,omitempty"`
	MappingBehavior              *uint           `xml:"MappingBehavior" json:"mappingBehavior,omitempty"`
	OtherHostExtentNameFormat    *string         `xml:"OtherHostExtentNameFormat" json:"otherHostExtentNameFormat,omitempty"`
	OtherHostExtentNameNamespace *string         `xml:"OtherHostExtentNameNamespace" json:"otherHostExtentNameNamespace,omitempty"`
	Parent                       *string         `xml:"Parent" json:"parent,omitempty"`
	PoolID                       *string         `xml:"PoolID" json:"poolID,omitempty"`
	Reservation                  *uint64         `xml:"Reservation" json:"reservation,omitempty"`
	SoID                         *string         `xml:"SoID" json:"soID,omitempty"`
	SoOrgID                      *string         `xml:"SoOrgID" json:"soOrgID,omitempty"`
	VirtualQuantity              *uint           `xml:"VirtualQuantity" json:"virtualQuantity,omitempty"`
	VirtualQuantityUnits         *string         `xml:"VirtualQuantityUnits" json:"virtualQuantityUnits,omitempty"`
	VirtualResourceBlockSize     *uint64         `xml:"VirtualResourceBlockSize" json:"virtualResourceBlockSize,omitempty"`
	Weight                       *uint           `xml:"Weight" json:"weight,omitempty"`
}

Source: http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2.24.0/CIM_StorageAllocationSettingData.xsd

type CIMVirtualSystemSettingData

type CIMVirtualSystemSettingData struct {
	ElementName string `xml:"ElementName" json:"elementName"`
	InstanceID  string `xml:"InstanceID" json:"instanceID"`

	AutomaticRecoveryAction              *uint8   `xml:"AutomaticRecoveryAction" json:"automaticRecoveryAction,omitempty"`
	AutomaticShutdownAction              *uint8   `xml:"AutomaticShutdownAction" json:"automaticShutdownAction,omitempty"`
	AutomaticStartupAction               *uint8   `xml:"AutomaticStartupAction" json:"automaticStartupAction,omitempty"`
	AutomaticStartupActionDelay          *string  `xml:"AutomaticStartupActionDelay>Interval" json:"automaticStartupActionDelay,omitempty"`
	AutomaticStartupActionSequenceNumber *uint16  `xml:"AutomaticStartupActionSequenceNumber" json:"automaticStartupActionSequenceNumber,omitempty"`
	Caption                              *string  `xml:"Caption" json:"caption,omitempty"`
	ConfigurationDataRoot                *string  `xml:"ConfigurationDataRoot" json:"configurationDataRoot,omitempty"`
	ConfigurationFile                    *string  `xml:"ConfigurationFile" json:"configurationFile,omitempty"`
	ConfigurationID                      *string  `xml:"ConfigurationID" json:"configurationID,omitempty"`
	CreationTime                         *string  `xml:"CreationTime" json:"creationTime,omitempty"`
	Description                          *string  `xml:"Description" json:"description,omitempty"`
	LogDataRoot                          *string  `xml:"LogDataRoot" json:"logDataRoot,omitempty"`
	Notes                                []string `xml:"Notes" json:"notes,omitempty"`
	RecoveryFile                         *string  `xml:"RecoveryFile" json:"recoveryFile,omitempty"`
	SnapshotDataRoot                     *string  `xml:"SnapshotDataRoot" json:"snapshotDataRoot,omitempty"`
	SuspendDataRoot                      *string  `xml:"SuspendDataRoot" json:"suspendDataRoot,omitempty"`
	SwapFileDataRoot                     *string  `xml:"SwapFileDataRoot" json:"swapFileDataRoot,omitempty"`
	VirtualSystemIdentifier              *string  `xml:"VirtualSystemIdentifier" json:"virtualSystemIdentifier,omitempty"`
	VirtualSystemType                    *string  `xml:"VirtualSystemType" json:"virtualSystemType,omitempty"`
}

type Config

type Config struct {
	Required *bool  `xml:"required,attr" json:"required,omitempty"`
	Key      string `xml:"key,attr" json:"key,omitempty"`
	Value    string `xml:"value,attr" json:"value,omitempty"`
}

type Content

type Content struct {
	ID   string  `xml:"id,attr" json:"id,omitempty"`
	Info string  `xml:"Info" json:"info,omitempty"`
	Name *string `xml:"Name" json:"name,omitempty"`
}

type CoresPerSocket

type CoresPerSocket struct {
	Required *bool `xml:"required,attr" json:"required,omitempty"`
	Value    int32 `xml:",chardata" json:"value,omitempty"`
}

type DeploymentOptionConfiguration

type DeploymentOptionConfiguration struct {
	ID      string `xml:"id,attr" json:"id"`
	Default *bool  `xml:"default,attr" json:"default,omitempty"`

	Label       string `xml:"Label" json:"label,omitempty"`
	Description string `xml:"Description" json:"description,omitempty"`
}

type DeploymentOptionSection

type DeploymentOptionSection struct {
	Section

	Configuration []DeploymentOptionConfiguration `xml:"Configuration" json:"configuration,omitempty"`
}

type DiskSection

type DiskSection struct {
	Section

	Disks []VirtualDiskDesc `xml:"Disk" json:"disk,omitempty"`
}

type Env

type Env struct {
	XMLName xml.Name `xml:"http://schemas.dmtf.org/ovf/environment/1 Environment" json:"xmlName"`
	ID      string   `xml:"id,attr" json:"id"`
	EsxID   string   `xml:"http://www.vmware.com/schema/ovfenv esxId,attr" json:"esxID"`

	Platform *PlatformSection `xml:"PlatformSection" json:"platformSection,omitempty"`
	Property *PropertySection `xml:"PropertySection" json:"propertySection,omitempty"`
}

func (Env) Marshal

func (e Env) Marshal() (string, error)

Marshal marshals Env to xml by using xml.Marshal.

func (Env) MarshalManual

func (e Env) MarshalManual() string

MarshalManual manually marshals Env to xml suitable for a vApp guest. It exists to overcome the lack of expressiveness in Go's XML namespaces.

type EnvProperty

type EnvProperty struct {
	Key   string `xml:"key,attr" json:"key"`
	Value string `xml:"value,attr" json:"value,omitempty"`
}

type Envelope

type Envelope struct {
	References []File `xml:"References>File" json:"references,omitempty"`

	// Package level meta-data
	Disk             *DiskSection             `xml:"DiskSection,omitempty" json:"diskSection,omitempty"`
	Network          *NetworkSection          `xml:"NetworkSection,omitempty" json:"networkSection,omitempty"`
	DeploymentOption *DeploymentOptionSection `xml:"DeploymentOptionSection,omitempty" json:"deploymentOptionSection,omitempty"`

	// Content: A VirtualSystem or a VirtualSystemCollection
	VirtualSystem           *VirtualSystem           `xml:"VirtualSystem,omitempty" json:"virtualSystem,omitempty"`
	VirtualSystemCollection *VirtualSystemCollection `xml:"VirtualSystemCollection,omitempty" json:"virtualSystemCollection,omitempty"`
}

Envelope is defined according to https://www.dmtf.org/sites/default/files/standards/documents/DSP0243_2.1.1.pdf.

Section 9 describes the parent/child relationships.

A VirtualSystem may have zero or more VirtualHardware sections.

func Unmarshal

func Unmarshal(r io.Reader) (*Envelope, error)

func (Envelope) ToConfigSpec

func (e Envelope) ToConfigSpec() (types.VirtualMachineConfigSpec, error)

ToConfigSpec calls ToConfigSpecWithOptions with an empty ToConfigSpecOptions object.

func (Envelope) ToConfigSpecWithOptions

func (e Envelope) ToConfigSpecWithOptions(
	opts ToConfigSpecOptions) (types.VirtualMachineConfigSpec, error)

ToConfigSpecWithOptions transforms the envelope into a ConfigSpec that may be used to create a new virtual machine. Please note, at this time:

func (*Envelope) Write

func (e *Envelope) Write(w io.Writer) error

Write satisfies the flags.OutputWriter interface.

type ErrUnsupportedItem

type ErrUnsupportedItem struct {
	Name             string
	Index            int
	InstanceID       string
	ResourceType     CIMResourceType
	ResourceSubType  string
	LocalizedMessage string
}

ErrUnsupportedItem is returned by Envelope.ToConfigSpec when there is an invalid item configuration.

func AsErrUnsupportedItem

func AsErrUnsupportedItem(in error) (ErrUnsupportedItem, bool)

AsErrUnsupportedItem returns any possible wrapped ErrUnsupportedItem error from the provided error.

func (ErrUnsupportedItem) Error

func (e ErrUnsupportedItem) Error() string

type EulaSection

type EulaSection struct {
	Section

	License string `xml:"License" json:"license,omitempty"`
}

type File

type File struct {
	ID          string  `xml:"id,attr" json:"id,omitempty"`
	Href        string  `xml:"href,attr" json:"href,omitempty"`
	Size        uint    `xml:"size,attr" json:"size,omitempty"`
	Compression *string `xml:"compression,attr" json:"compression,omitempty"`
	ChunkSize   *int    `xml:"chunkSize,attr" json:"chunkSize,omitempty"`
}

type Manager

type Manager struct {
	types.ManagedObjectReference
	// contains filtered or unexported fields
}

func NewManager

func NewManager(c *vim25.Client) *Manager

func (*Manager) CreateDescriptor

CreateDescriptor wraps methods.CreateDescriptor

func (*Manager) CreateImportSpec

func (m *Manager) CreateImportSpec(ctx context.Context, ovfDescriptor string, resourcePool mo.Reference, datastore mo.Reference, cisp types.BaseOvfCreateImportSpecParams) (*types.OvfCreateImportSpecResult, error)

CreateImportSpec wraps methods.CreateImportSpec

func (*Manager) ParseDescriptor

func (m *Manager) ParseDescriptor(ctx context.Context, ovfDescriptor string, pdp types.OvfParseDescriptorParams) (*types.OvfParseDescriptorResult, error)

ParseDescriptor wraps methods.ParseDescriptor

func (*Manager) ValidateHost

func (m *Manager) ValidateHost(ctx context.Context, ovfDescriptor string, host mo.Reference, vhp types.OvfValidateHostParams) (*types.OvfValidateHostResult, error)

ValidateHost wraps methods.ValidateHost

type Network

type Network struct {
	Name string `xml:"name,attr" json:"name,omitempty"`

	Description string `xml:"Description" json:"description,omitempty"`
}

type NetworkSection

type NetworkSection struct {
	Section

	Networks []Network `xml:"Network" json:"network,omitempty"`
}

type OperatingSystemSection

type OperatingSystemSection struct {
	Section

	ID      int16   `xml:"id,attr" json:"id"`
	Version *string `xml:"version,attr" json:"version,omitempty"`
	OSType  *string `xml:"osType,attr" json:"osType,omitempty"`

	Description *string `xml:"Description" json:"description,omitempty"`
}

type PlatformSection

type PlatformSection struct {
	Kind    string `xml:"Kind" json:"kind,omitempty"`
	Version string `xml:"Version" json:"version,omitempty"`
	Vendor  string `xml:"Vendor" json:"vendor,omitempty"`
	Locale  string `xml:"Locale" json:"locale,omitempty"`
}

type ProductSection

type ProductSection struct {
	Section

	Class    *string `xml:"class,attr" json:"class,omitempty"`
	Instance *string `xml:"instance,attr" json:"instance,omitempty"`

	Product     string     `xml:"Product" json:"product,omitempty"`
	Vendor      string     `xml:"Vendor" json:"vendor,omitempty"`
	Version     string     `xml:"Version" json:"version,omitempty"`
	FullVersion string     `xml:"FullVersion" json:"fullVersion,omitempty"`
	ProductURL  string     `xml:"ProductUrl" json:"productUrl,omitempty"`
	VendorURL   string     `xml:"VendorUrl" json:"vendorUrl,omitempty"`
	AppURL      string     `xml:"AppUrl" json:"appUrl,omitempty"`
	Property    []Property `xml:"Property" json:"property,omitempty"`
}

func (ProductSection) Key

func (p ProductSection) Key(prop Property) string

type Property

type Property struct {
	Key              string  `xml:"key,attr" json:"key,omitempty"`
	Type             string  `xml:"type,attr" json:"type,omitempty"`
	Qualifiers       *string `xml:"qualifiers,attr" json:"qualifiers,omitempty"`
	UserConfigurable *bool   `xml:"userConfigurable,attr" json:"userConfigurable,omitempty"`
	Default          *string `xml:"value,attr" json:"default,omitempty"`
	Password         *bool   `xml:"password,attr" json:"password,omitempty"`
	Configuration    *string `xml:"configuration,attr" json:"configuration,omitempty"`

	Label       *string `xml:"Label" json:"label,omitempty"`
	Description *string `xml:"Description" json:"description,omitempty"`

	Values []PropertyConfigurationValue `xml:"Value" json:"value,omitempty"`
}

type PropertyConfigurationValue

type PropertyConfigurationValue struct {
	Value         string  `xml:"value,attr" json:"value,omitempty"`
	Configuration *string `xml:"configuration,attr" json:"configuration,omitempty"`
}

type PropertySection

type PropertySection struct {
	Properties []EnvProperty `xml:"Property" json:"property,omitempty"`
}

type ResourceAllocationSection

type ResourceAllocationSection struct {
	Section

	Item []ResourceAllocationSettingData `xml:"Item" json:"item,omitempty"`
}

type ResourceAllocationSettingData

type ResourceAllocationSettingData struct {
	CIMResourceAllocationSettingData

	Required       *bool           `xml:"required,attr" json:"required,omitempty"`
	Configuration  *string         `xml:"configuration,attr" json:"configuration,omitempty"`
	Bound          *string         `xml:"bound,attr" json:"bound,omitempty"`
	Config         []Config        `xml:"Config" json:"config,omitempty"`
	CoresPerSocket *CoresPerSocket `xml:"CoresPerSocket" json:"coresPerSocket,omitempty"`
}

type Section

type Section struct {
	Required *bool  `xml:"required,attr" json:"required,omitempty"`
	Info     string `xml:"Info" json:"info,omitempty"`
	Category string `xml:"Category" json:"category,omitempty"`
}

type StorageAllocationSettingData

type StorageAllocationSettingData struct {
	CIMStorageAllocationSettingData

	Required      *bool   `xml:"required,attr" json:"required,omitempty"`
	Configuration *string `xml:"configuration,attr" json:"configuration,omitempty"`
	Bound         *string `xml:"bound,attr" json:"bound,omitempty"`
}

type ToConfigSpecOptions

type ToConfigSpecOptions struct {

	// Strict indicates that an error should be returned on Item elements in
	// a VirtualHardware section that have an unknown ResourceType, i.e. a value
	// that falls outside the range of the enum CIMResourceType.
	Strict bool
}

ToConfigSpecOptions influence the behavior of the ToConfigSpecWithOptions function.

type VirtualDiskDesc

type VirtualDiskDesc struct {
	DiskID                  string  `xml:"diskId,attr" json:"diskId,omitempty"`
	FileRef                 *string `xml:"fileRef,attr" json:"fileRef,omitempty"`
	Capacity                string  `xml:"capacity,attr" json:"capacity,omitempty"`
	CapacityAllocationUnits *string `xml:"capacityAllocationUnits,attr" json:"capacityAllocationUnits,omitempty"`
	Format                  *string `xml:"format,attr" json:"format,omitempty"`
	PopulatedSize           *int    `xml:"populatedSize,attr" json:"populatedSize,omitempty"`
	ParentRef               *string `xml:"parentRef,attr" json:"parentRef,omitempty"`
}

type VirtualHardwareSection

type VirtualHardwareSection struct {
	Section

	ID        *string `xml:"id,attr" json:"id"`
	Transport *string `xml:"transport,attr" json:"transport,omitempty"`

	System      *VirtualSystemSettingData       `xml:"System" json:"system,omitempty"`
	Item        []ResourceAllocationSettingData `xml:"Item" json:"item,omitempty"`
	StorageItem []StorageAllocationSettingData  `xml:"StorageItem" json:"storageItem,omitempty"`
	Config      []Config                        `xml:"Config" json:"config,omitempty"`
	ExtraConfig []Config                        `xml:"ExtraConfig" json:"extraConfig,omitempty"`
}

type VirtualSystem

type VirtualSystem struct {
	Content

	Annotation      *AnnotationSection       `xml:"AnnotationSection,omitempty" json:"annotationSection,omitempty"`
	Product         []ProductSection         `xml:"ProductSection,omitempty" json:"productSection,omitempty"`
	Eula            []EulaSection            `xml:"EulaSection,omitempty" json:"eulaSection,omitempty"`
	OperatingSystem *OperatingSystemSection  `xml:"OperatingSystemSection,omitempty" json:"operatingSystemSection,omitempty"`
	VirtualHardware []VirtualHardwareSection `xml:"VirtualHardwareSection,omitempty" json:"virtualHardwareSection,omitempty"`
}

type VirtualSystemCollection

type VirtualSystemCollection struct {
	Content

	// Collection level meta-data
	ResourceAllocation *ResourceAllocationSection `xml:"ResourceAllocationSection,omitempty" json:"resourceAllocationSection,omitempty"`
	Annotation         *AnnotationSection         `xml:"AnnotationSection,omitempty" json:"annotationSection,omitempty"`
	Product            []ProductSection           `xml:"ProductSection,omitempty" json:"productSection,omitempty"`
	Eula               []EulaSection              `xml:"EulaSection,omitempty" json:"eulaSection,omitempty"`

	// Content: One or more VirtualSystems
	VirtualSystem []VirtualSystem `xml:"VirtualSystem,omitempty" json:"virtualSystem,omitempty"`
}

type VirtualSystemSettingData

type VirtualSystemSettingData struct {
	CIMVirtualSystemSettingData
}

Source Files

cim.go configspec.go doc.go env.go envelope.go manager.go ovf.go parser.go

Directories

PathSynopsis
ovf/importer
Version
v0.48.1 (latest)
Published
Feb 11, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
2 months ago

Tools for package owners.