Documentation ¶
Overview ¶
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 ¶
- type AnnotationSection
- type CIMResourceAllocationSettingData
- type CIMVirtualSystemSettingData
- type Content
- type DeploymentOptionConfiguration
- type DeploymentOptionSection
- type DiskSection
- type Env
- type EnvProperty
- type Envelope
- type EulaSection
- type File
- type Manager
- func (m *Manager) CreateDescriptor(ctx context.Context, obj mo.Reference, cdp types.OvfCreateDescriptorParams) (*types.OvfCreateDescriptorResult, error)
- func (m *Manager) CreateImportSpec(ctx context.Context, ovfDescriptor string, resourcePool mo.Reference, ...) (*types.OvfCreateImportSpecResult, error)
- func (m *Manager) ParseDescriptor(ctx context.Context, ovfDescriptor string, pdp types.OvfParseDescriptorParams) (*types.OvfParseDescriptorResult, error)
- func (m *Manager) ValidateHost(ctx context.Context, ovfDescriptor string, host mo.Reference, ...) (*types.OvfValidateHostResult, error)
- type Network
- type NetworkSection
- type OperatingSystemSection
- type PlatformSection
- type ProductSection
- type Property
- type PropertyConfigurationValue
- type PropertySection
- type ResourceAllocationSection
- type ResourceAllocationSettingData
- type Section
- type VirtualDiskDesc
- type VirtualHardwareSection
- type VirtualSystem
- type VirtualSystemSettingData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotationSection ¶
type CIMResourceAllocationSettingData ¶
type CIMResourceAllocationSettingData struct { ElementName string `xml:"ElementName"` InstanceID string `xml:"InstanceID"` ResourceType *uint16 `xml:"ResourceType"` OtherResourceType *string `xml:"OtherResourceType"` ResourceSubType *string `xml:"ResourceSubType"` AddressOnParent *string `xml:"AddressOnParent"` Address *string `xml:"Address"` AllocationUnits *string `xml:"AllocationUnits"` AutomaticAllocation *bool `xml:"AutomaticAllocation"` AutomaticDeallocation *bool `xml:"AutomaticDeallocation"` Caption *string `xml:"Caption"` Connection []string `xml:"Connection"` ConsumerVisibility *uint16 `xml:"ConsumerVisibility"` Description *string `xml:"Description"` HostResource []string `xml:"HostResource"` Limit *uint64 `xml:"Limit"` MappingBehavior *uint `xml:"MappingBehavior"` Parent *string `xml:"Parent"` PoolID *string `xml:"PoolID"` Reservation *uint64 `xml:"Reservation"` VirtualQuantity *uint `xml:"VirtualQuantity"` VirtualQuantityUnits *string `xml:"VirtualQuantityUnits"` Weight *uint `xml:"Weight"` }
type CIMVirtualSystemSettingData ¶
type CIMVirtualSystemSettingData struct { ElementName string `xml:"ElementName"` InstanceID string `xml:"InstanceID"` AutomaticRecoveryAction *uint8 `xml:"AutomaticRecoveryAction"` AutomaticShutdownAction *uint8 `xml:"AutomaticShutdownAction"` AutomaticStartupAction *uint8 `xml:"AutomaticStartupAction"` AutomaticStartupActionDelay *string `xml:"AutomaticStartupActionDelay>Interval"` AutomaticStartupActionSequenceNumber *uint16 `xml:"AutomaticStartupActionSequenceNumber"` Caption *string `xml:"Caption"` ConfigurationDataRoot *string `xml:"ConfigurationDataRoot"` ConfigurationFile *string `xml:"ConfigurationFile"` ConfigurationID *string `xml:"ConfigurationID"` CreationTime *string `xml:"CreationTime"` Description *string `xml:"Description"` LogDataRoot *string `xml:"LogDataRoot"` Notes []string `xml:"Notes"` RecoveryFile *string `xml:"RecoveryFile"` SnapshotDataRoot *string `xml:"SnapshotDataRoot"` SuspendDataRoot *string `xml:"SuspendDataRoot"` SwapFileDataRoot *string `xml:"SwapFileDataRoot"` VirtualSystemIdentifier *string `xml:"VirtualSystemIdentifier"` VirtualSystemType *string `xml:"VirtualSystemType"` }
type DeploymentOptionSection ¶
type DeploymentOptionSection struct { Section Configuration []DeploymentOptionConfiguration `xml:"Configuration"` }
type DiskSection ¶
type DiskSection struct { Section Disks []VirtualDiskDesc `xml:"Disk"` }
type Env ¶
type Env struct { XMLName xml.Name `xml:"http://schemas.dmtf.org/ovf/environment/1 Environment"` ID string `xml:"id,attr"` EsxID string `xml:"http://www.vmware.com/schema/ovfenv esxId,attr"` Platform *PlatformSection `xml:"PlatformSection"` Property *PropertySection `xml:"PropertySection"` }
func (Env) MarshalManual ¶ added in v0.3.0
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 Envelope ¶
type Envelope struct { References []File `xml:"References>File"` // Package level meta-data Annotation *AnnotationSection `xml:"AnnotationSection"` Product *ProductSection `xml:"ProductSection"` Network *NetworkSection `xml:"NetworkSection"` Disk *DiskSection `xml:"DiskSection"` OperatingSystem *OperatingSystemSection `xml:"OperatingSystemSection"` Eula *EulaSection `xml:"EulaSection"` VirtualHardware *VirtualHardwareSection `xml:"VirtualHardwareSection"` ResourceAllocation *ResourceAllocationSection `xml:"ResourceAllocationSection"` DeploymentOption *DeploymentOptionSection `xml:"DeploymentOptionSection"` // Content: A VirtualSystem or a VirtualSystemCollection VirtualSystem *VirtualSystem `xml:"VirtualSystem"` }
type EulaSection ¶
type Manager ¶ added in v0.16.0
type Manager struct { types.ManagedObjectReference // contains filtered or unexported fields }
func NewManager ¶ added in v0.16.0
func (*Manager) CreateDescriptor ¶ added in v0.16.0
func (m *Manager) CreateDescriptor(ctx context.Context, obj mo.Reference, cdp types.OvfCreateDescriptorParams) (*types.OvfCreateDescriptorResult, error)
CreateDescriptor wraps methods.CreateDescriptor
func (*Manager) CreateImportSpec ¶ added in v0.16.0
func (m *Manager) CreateImportSpec(ctx context.Context, ovfDescriptor string, resourcePool mo.Reference, datastore mo.Reference, cisp types.OvfCreateImportSpecParams) (*types.OvfCreateImportSpecResult, error)
CreateImportSpec wraps methods.CreateImportSpec
func (*Manager) ParseDescriptor ¶ added in v0.16.0
func (m *Manager) ParseDescriptor(ctx context.Context, ovfDescriptor string, pdp types.OvfParseDescriptorParams) (*types.OvfParseDescriptorResult, error)
ParseDescriptor wraps methods.ParseDescriptor
func (*Manager) ValidateHost ¶ added in v0.16.0
func (m *Manager) ValidateHost(ctx context.Context, ovfDescriptor string, host mo.Reference, vhp types.OvfValidateHostParams) (*types.OvfValidateHostResult, error)
ValidateHost wraps methods.ValidateHost
type NetworkSection ¶
type OperatingSystemSection ¶
type PlatformSection ¶
type ProductSection ¶
type ProductSection struct { Section Class *string `xml:"class,attr"` Instance *string `xml:"instance,attr"` Product string `xml:"Product"` Vendor string `xml:"Vendor"` Version string `xml:"Version"` FullVersion string `xml:"FullVersion"` ProductURL string `xml:"ProductUrl"` VendorURL string `xml:"VendorUrl"` AppURL string `xml:"AppUrl"` Property []Property `xml:"Property"` }
type Property ¶
type Property struct { Key string `xml:"key,attr"` Type string `xml:"type,attr"` Qualifiers *string `xml:"qualifiers,attr"` UserConfigurable *bool `xml:"userConfigurable,attr"` Default *string `xml:"value,attr"` Password *bool `xml:"password,attr"` Label *string `xml:"Label"` Description *string `xml:"Description"` Values []PropertyConfigurationValue `xml:"Value"` }
type PropertySection ¶
type PropertySection struct {
Properties []EnvProperty `xml:"Property"`
}
type ResourceAllocationSection ¶
type ResourceAllocationSection struct { Section Item []ResourceAllocationSettingData `xml:"Item"` }
type ResourceAllocationSettingData ¶
type ResourceAllocationSettingData struct { CIMResourceAllocationSettingData Required *bool `xml:"required,attr"` Configuration *string `xml:"configuration,attr"` Bound *string `xml:"bound,attr"` }
type VirtualDiskDesc ¶
type VirtualDiskDesc struct { DiskID string `xml:"diskId,attr"` FileRef *string `xml:"fileRef,attr"` Capacity string `xml:"capacity,attr"` CapacityAllocationUnits *string `xml:"capacityAllocationUnits,attr"` Format *string `xml:"format,attr"` PopulatedSize *int `xml:"populatedSize,attr"` ParentRef *string `xml:"parentRef,attr"` }
type VirtualHardwareSection ¶
type VirtualHardwareSection struct { Section ID *string `xml:"id,attr"` Transport *string `xml:"transport,attr"` System *VirtualSystemSettingData `xml:"System"` Item []ResourceAllocationSettingData `xml:"Item"` }
type VirtualSystem ¶
type VirtualSystem struct { Content Annotation []AnnotationSection `xml:"AnnotationSection"` Product []ProductSection `xml:"ProductSection"` OperatingSystem []OperatingSystemSection `xml:"OperatingSystemSection"` Eula []EulaSection `xml:"EulaSection"` VirtualHardware []VirtualHardwareSection `xml:"VirtualHardwareSection"` }
type VirtualSystemSettingData ¶
type VirtualSystemSettingData struct {
CIMVirtualSystemSettingData
}