spec

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParaVirtualSCSIController

func NewParaVirtualSCSIController(controller types.VirtualSCSIController) *types.ParaVirtualSCSIController

NewParaVirtualSCSIController returns ParaVirtualSCSIController spec.

func NewVirtualBusLogicController

func NewVirtualBusLogicController(controller types.VirtualSCSIController) *types.VirtualBusLogicController

NewVirtualBusLogicController returns VirtualBusLogicController spec.

func NewVirtualCdrom

func NewVirtualCdrom(device *types.VirtualIDEController) *types.VirtualCdrom

NewVirtualCdrom returns a virtual CDROM device.

func NewVirtualDisk

func NewVirtualDisk(controller types.BaseVirtualController) *types.VirtualDisk

NewVirtualDisk returns a new disk attached to the controller

func NewVirtualE1000

func NewVirtualE1000() *types.VirtualE1000

NewVirtualE1000 returns VirtualE1000 spec.

func NewVirtualFloppy

func NewVirtualFloppy(device *types.VirtualIDEController) *types.VirtualFloppy

NewVirtualFloppy adds a floppy device in a virtual machine.

func NewVirtualIDEController

func NewVirtualIDEController(key int32) *types.VirtualIDEController

NewVirtualIDEController returns a VirtualIDEController spec with key.

func NewVirtualIDEDisk

func NewVirtualIDEDisk(controller types.VirtualIDEController) *types.VirtualDisk

NewVirtualIDEDisk returns a new disk attached to the IDE controller

func NewVirtualLsiLogicController

func NewVirtualLsiLogicController(controller types.VirtualSCSIController) *types.VirtualLsiLogicController

NewVirtualLsiLogicController returns a VirtualLsiLogicController spec

func NewVirtualLsiLogicSASController

func NewVirtualLsiLogicSASController(controller types.VirtualSCSIController) *types.VirtualLsiLogicSASController

NewVirtualLsiLogicSASController returns VirtualLsiLogicSASController spec.

func NewVirtualPCNet32

func NewVirtualPCNet32() *types.VirtualPCNet32

NewVirtualPCNet32 returns VirtualPCNet32 spec.

func NewVirtualSCSIController

func NewVirtualSCSIController(bus int32, key int32) types.VirtualSCSIController

NewVirtualSCSIController returns a VirtualSCSIController with bus number and key.

func NewVirtualSCSIDisk

func NewVirtualSCSIDisk(controller types.VirtualSCSIController) *types.VirtualDisk

NewVirtualSCSIDisk returns a new disk attached to the SCSI controller

func NewVirtualVmxnet3

func NewVirtualVmxnet3() *types.VirtualVmxnet3

NewVirtualVmxnet3 returns VirtualVmxnet3 spec.

func VirtualDeviceSlotNumber

func VirtualDeviceSlotNumber(d types.BaseVirtualDevice) int32

VirtualDeviceSlotNumber returns the PCI slot number of a device

Types

type VirtualMachineConfigSpec

type VirtualMachineConfigSpec struct {
	*session.Session

	*types.VirtualMachineConfigSpec
	// contains filtered or unexported fields
}

VirtualMachineConfigSpec type

func NewVirtualMachineConfigSpec

func NewVirtualMachineConfigSpec(ctx context.Context, session *session.Session, config *VirtualMachineConfigSpecConfig) (*VirtualMachineConfigSpec, error)

NewVirtualMachineConfigSpec returns a VirtualMachineConfigSpec

func (*VirtualMachineConfigSpec) AddAndCreateVirtualDevice

func (s *VirtualMachineConfigSpec) AddAndCreateVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec

AddAndCreateVirtualDevice appends an Add operation to the DeviceChange list

func (*VirtualMachineConfigSpec) AddParaVirtualSCSIController

func (s *VirtualMachineConfigSpec) AddParaVirtualSCSIController(device *types.ParaVirtualSCSIController) *VirtualMachineConfigSpec

AddParaVirtualSCSIController adds a paravirtualized SCSI controller.

func (*VirtualMachineConfigSpec) AddVirtualBusLogicController

func (s *VirtualMachineConfigSpec) AddVirtualBusLogicController(device *types.VirtualBusLogicController) *VirtualMachineConfigSpec

AddVirtualBusLogicController adds a BusLogic SCSI controller.

func (*VirtualMachineConfigSpec) AddVirtualCdrom

AddVirtualCdrom adds a CD-ROM device in a virtual machine.

func (*VirtualMachineConfigSpec) AddVirtualDevice

AddVirtualDevice appends an Add operation to the DeviceChange list

func (*VirtualMachineConfigSpec) AddVirtualDisk

AddVirtualDisk adds a virtual disk to a virtual machine.

func (*VirtualMachineConfigSpec) AddVirtualE1000

AddVirtualE1000 adds a VirtualE1000 device.

func (*VirtualMachineConfigSpec) AddVirtualFloppy

AddVirtualFloppy adds a floppy device in a virtual machine.

func (*VirtualMachineConfigSpec) AddVirtualIDEController

func (s *VirtualMachineConfigSpec) AddVirtualIDEController(device *types.VirtualIDEController) *VirtualMachineConfigSpec

AddVirtualIDEController adds a virtual IDE controller.

func (*VirtualMachineConfigSpec) AddVirtualLsiLogicController

func (s *VirtualMachineConfigSpec) AddVirtualLsiLogicController(device *types.VirtualLsiLogicController) *VirtualMachineConfigSpec

AddVirtualLsiLogicController adds a LSI Logic SCSI controller.

func (*VirtualMachineConfigSpec) AddVirtualLsiLogicSASController

func (s *VirtualMachineConfigSpec) AddVirtualLsiLogicSASController(device *types.VirtualLsiLogicSASController) *VirtualMachineConfigSpec

AddVirtualLsiLogicSASController add a LSI Logic SAS SCSI controller.

func (*VirtualMachineConfigSpec) AddVirtualPCNet32

AddVirtualPCNet32 adds a VirtualPCNet32 device.

func (*VirtualMachineConfigSpec) AddVirtualVmxnet3

AddVirtualVmxnet3 adds a VirtualVmxnet3 device.

func (*VirtualMachineConfigSpec) AssignSlotNumber

func (s *VirtualMachineConfigSpec) AssignSlotNumber(dev types.BaseVirtualDevice, known map[int32]bool) int32

AssignSlotNumber assigns a specific PCI slot number to the specified device. This ensures that the slot is valid and not in use by anything else in the spec

func (*VirtualMachineConfigSpec) BootMediaPath

func (s *VirtualMachineConfigSpec) BootMediaPath() string

BootMediaPath returns the image path

func (*VirtualMachineConfigSpec) CollectSlotNumbers

func (s *VirtualMachineConfigSpec) CollectSlotNumbers(known map[int32]bool) map[int32]bool

CollectSlotNumbers returns a collection of all the PCI slot numbers for devices in the spec Can take a nil map as argument

func (*VirtualMachineConfigSpec) FindNICs

func (*VirtualMachineConfigSpec) ID

ID returns the ID of the VM

func (*VirtualMachineConfigSpec) ImageStoreName

func (s *VirtualMachineConfigSpec) ImageStoreName() string

ImageStoreName returns the image store name

func (*VirtualMachineConfigSpec) ImageStorePath

func (s *VirtualMachineConfigSpec) ImageStorePath() *url.URL

ImageStorePath returns the image store url

func (*VirtualMachineConfigSpec) Name

func (s *VirtualMachineConfigSpec) Name() string

Name returns the name of the VM

func (*VirtualMachineConfigSpec) ParentImageID

func (s *VirtualMachineConfigSpec) ParentImageID() string

ParentImageID returns the ID of the image that VM is based on

func (*VirtualMachineConfigSpec) RemoveAndDestroyVirtualDevice

func (s *VirtualMachineConfigSpec) RemoveAndDestroyVirtualDevice(device types.BaseVirtualDevice) *VirtualMachineConfigSpec

RemoveAndDestroyVirtualDevice appends a Remove operation to the DeviceChange list

func (*VirtualMachineConfigSpec) RemoveParaVirtualSCSIController

func (s *VirtualMachineConfigSpec) RemoveParaVirtualSCSIController(device *types.ParaVirtualSCSIController) *VirtualMachineConfigSpec

RemoveParaVirtualSCSIController removes a paravirtualized SCSI controller.

func (*VirtualMachineConfigSpec) RemoveVirtualBusLogicController

func (s *VirtualMachineConfigSpec) RemoveVirtualBusLogicController(device *types.VirtualBusLogicController) *VirtualMachineConfigSpec

RemoveVirtualBusLogicController removes a BusLogic SCSI controller.

func (*VirtualMachineConfigSpec) RemoveVirtualCdrom

func (s *VirtualMachineConfigSpec) RemoveVirtualCdrom(device *types.VirtualCdrom) *VirtualMachineConfigSpec

RemoveVirtualCdrom adds a CD-ROM device in a virtual machine.

func (*VirtualMachineConfigSpec) RemoveVirtualDevice

RemoveVirtualDevice appends a Remove operation to the DeviceChange list

func (*VirtualMachineConfigSpec) RemoveVirtualDisk

func (s *VirtualMachineConfigSpec) RemoveVirtualDisk(device *types.VirtualDisk) *VirtualMachineConfigSpec

RemoveVirtualDisk remvoes the virtual disk from a virtual machine.

func (*VirtualMachineConfigSpec) RemoveVirtualE1000

func (s *VirtualMachineConfigSpec) RemoveVirtualE1000(device *types.VirtualE1000) *VirtualMachineConfigSpec

RemoveVirtualE1000 adds a VirtualE1000 device.

func (*VirtualMachineConfigSpec) RemoveVirtualFloppyDevice

func (s *VirtualMachineConfigSpec) RemoveVirtualFloppyDevice(device *types.VirtualFloppy) *VirtualMachineConfigSpec

RemoveVirtualFloppyDevice removes a floppy device from the virtual machine.

func (*VirtualMachineConfigSpec) RemoveVirtualIDEController

func (s *VirtualMachineConfigSpec) RemoveVirtualIDEController(device *types.VirtualIDEController) *VirtualMachineConfigSpec

RemoveVirtualIDEController removes a virtual IDE controller.

func (*VirtualMachineConfigSpec) RemoveVirtualLsiLogicController

func (s *VirtualMachineConfigSpec) RemoveVirtualLsiLogicController(device *types.VirtualLsiLogicController) *VirtualMachineConfigSpec

RemoveVirtualLsiLogicController removes a LSI Logic SCSI controller.

func (*VirtualMachineConfigSpec) RemoveVirtualLsiLogicSASController

func (s *VirtualMachineConfigSpec) RemoveVirtualLsiLogicSASController(device *types.VirtualLsiLogicSASController) *VirtualMachineConfigSpec

RemoveVirtualLsiLogicSASController removes a LSI Logic SAS SCSI controller.

func (*VirtualMachineConfigSpec) RemoveVirtualPCNet32

func (s *VirtualMachineConfigSpec) RemoveVirtualPCNet32(device *types.VirtualPCNet32) *VirtualMachineConfigSpec

RemoveVirtualPCNet32 adds a VirtualPCNet32 device.

func (*VirtualMachineConfigSpec) RemoveVirtualVmxnet3

func (s *VirtualMachineConfigSpec) RemoveVirtualVmxnet3(device *types.VirtualVmxnet3) *VirtualMachineConfigSpec

RemoveVirtualVmxnet3 adds a VirtualVmxnet3 device.

func (*VirtualMachineConfigSpec) Spec

Spec returns the base types.VirtualMachineConfigSpec object

func (*VirtualMachineConfigSpec) VMPathName

func (s *VirtualMachineConfigSpec) VMPathName() string

VMPathName returns the VM folder path

type VirtualMachineConfigSpecConfig

type VirtualMachineConfigSpecConfig struct {
	// ID of the VM
	ID         string
	BiosUUID   string
	VMFullName string

	// ParentImageID of the VM
	ParentImageID string

	// Name of the VM
	Name string

	// Number of CPUs
	NumCPUs int32
	// Memory - in MB
	MemoryMB int64

	// VMFork enabled
	VMForkEnabled bool

	// datastore path of the media file we boot from
	BootMediaPath string

	// datastore path of the VM
	VMPathName string

	// Name of the image store
	ImageStoreName string

	// url path to image store
	ImageStorePath *url.URL

	// Temporary
	Metadata *executor.ExecutorConfig
}

VirtualMachineConfigSpecConfig holds the config values

Jump to

Keyboard shortcuts

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