hyperv_winrm

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(clientConfig *ClientConfig) (*api.Provider, error)

Types

type ClientConfig

type ClientConfig struct {
	WinRmClient winrm_helper.Client
}

func (*ClientConfig) CreateOrUpdateVhd

func (c *ClientConfig) CreateOrUpdateVhd(ctx context.Context, path string, source string, sourceVm string, sourceDisk int, vhdType api.VhdType, parentPath string, size uint64, blockSize uint32, logicalSectorSize uint32, physicalSectorSize uint32) (err error)

func (*ClientConfig) CreateOrUpdateVmDvdDrives

func (c *ClientConfig) CreateOrUpdateVmDvdDrives(ctx context.Context, vmName string, dvdDrives []api.VmDvdDrive) (err error)

func (*ClientConfig) CreateOrUpdateVmFirmware

func (c *ClientConfig) CreateOrUpdateVmFirmware(
	ctx context.Context,
	vmName string,
	bootOrders []api.Gen2BootOrder,
	enableSecureBoot api.OnOffState,
	secureBootTemplate string,
	preferredNetworkBootProtocol api.IPProtocolPreference,
	consoleMode api.ConsoleModeType,
	pauseAfterBootFailure api.OnOffState,
) (err error)

func (*ClientConfig) CreateOrUpdateVmFirmwares

func (c *ClientConfig) CreateOrUpdateVmFirmwares(ctx context.Context, vmName string, vmFirmwares []api.VmFirmware) (err error)

func (*ClientConfig) CreateOrUpdateVmHardDiskDrives

func (c *ClientConfig) CreateOrUpdateVmHardDiskDrives(ctx context.Context, vmName string, hardDiskDrives []api.VmHardDiskDrive) (err error)

func (*ClientConfig) CreateOrUpdateVmIntegrationServices

func (c *ClientConfig) CreateOrUpdateVmIntegrationServices(ctx context.Context, vmName string, integrationServices []api.VmIntegrationService) (err error)

func (*ClientConfig) CreateOrUpdateVmNetworkAdapters

func (c *ClientConfig) CreateOrUpdateVmNetworkAdapters(ctx context.Context, vmName string, networkAdapters []api.VmNetworkAdapter) (err error)

func (*ClientConfig) CreateOrUpdateVmProcessor

func (c *ClientConfig) CreateOrUpdateVmProcessor(
	ctx context.Context,
	vmName string,
	compatibilityForMigrationEnabled bool,
	compatibilityForOlderOperatingSystemsEnabled bool,
	hwThreadCountPerCore int64,
	maximum int64,
	reserve int64,
	relativeWeight int32,
	maximumCountPerNumaNode int32,
	maximumCountPerNumaSocket int32,
	enableHostResourceProtection bool,
	exposeVirtualizationExtensions bool,
) (err error)

func (*ClientConfig) CreateOrUpdateVmProcessors

func (c *ClientConfig) CreateOrUpdateVmProcessors(ctx context.Context, vmName string, vmProcessors []api.VmProcessor) (err error)

func (*ClientConfig) CreateVMSwitch

func (c *ClientConfig) CreateVMSwitch(
	ctx context.Context,
	name string,
	notes string,
	allowManagementOS bool,
	embeddedTeamingEnabled bool,
	iovEnabled bool,
	packetDirectEnabled bool,
	bandwidthReservationMode api.VMSwitchBandwidthMode,
	switchType api.VMSwitchType,
	netAdapterNames []string,
	defaultFlowMinimumBandwidthAbsolute int64,
	defaultFlowMinimumBandwidthWeight int64,
	defaultQueueVmmqEnabled bool,
	defaultQueueVmmqQueuePairs int32,
	defaultQueueVrssEnabled bool,
) (err error)

func (*ClientConfig) CreateVm

func (c *ClientConfig) CreateVm(
	ctx context.Context,
	name string,
	path string,
	generation int,
	automaticCriticalErrorAction api.CriticalErrorAction,
	automaticCriticalErrorActionTimeout int32,
	automaticStartAction api.StartAction,
	automaticStartDelay int32,
	automaticStopAction api.StopAction,
	checkpointType api.CheckpointType,
	dynamicMemory bool,
	guestControlledCacheTypes bool,
	highMemoryMappedIoSpace int64,
	lockOnDisconnect api.OnOffState,
	lowMemoryMappedIoSpace int32,
	memoryMaximumBytes int64,
	memoryMinimumBytes int64,
	memoryStartupBytes int64,
	notes string,
	processorCount int64,
	smartPagingFilePath string,
	snapshotFileLocation string,
	staticMemory bool,
) (err error)

func (*ClientConfig) CreateVmDvdDrive

func (c *ClientConfig) CreateVmDvdDrive(
	ctx context.Context,
	vmName string,
	controllerNumber int,
	controllerLocation int,
	path string,
	resourcePoolName string,
) (err error)

func (*ClientConfig) CreateVmHardDiskDrive

func (c *ClientConfig) CreateVmHardDiskDrive(
	ctx context.Context,
	vmName string,
	controllerType api.ControllerType,
	controllerNumber int32,
	controllerLocation int32,
	path string,
	diskNumber uint32,
	resourcePoolName string,
	supportPersistentReservations bool,
	maximumIops uint64,
	minimumIops uint64,
	qosPolicyId string,
	overrideCacheAttributes api.CacheAttributes,

) (err error)

func (*ClientConfig) CreateVmNetworkAdapter

func (c *ClientConfig) CreateVmNetworkAdapter(
	ctx context.Context,
	vmName string,
	name string,
	switchName string,
	managementOs bool,
	isLegacy bool,
	dynamicMacAddress bool,
	staticMacAddress string,
	macAddressSpoofing api.OnOffState,
	dhcpGuard api.OnOffState,
	routerGuard api.OnOffState,
	portMirroring api.PortMirroring,
	ieeePriorityTag api.OnOffState,
	vmqWeight int,
	iovQueuePairsRequested int,
	iovInterruptModeration api.IovInterruptModerationValue,
	iovWeight int,
	ipsecOffloadMaximumSecurityAssociation int,
	maximumBandwidth int,
	minimumBandwidthAbsolute int,
	minimumBandwidthWeight int,
	mandatoryFeatureId []string,
	resourcePoolName string,
	testReplicaPoolName string,
	testReplicaSwitchName string,
	virtualSubnetId int,
	allowTeaming api.OnOffState,
	notMonitoredInCluster bool,
	stormLimit int,
	dynamicIpAddressLimit int,
	deviceNaming api.OnOffState,
	fixSpeed10G api.OnOffState,
	packetDirectNumProcs int,
	packetDirectModerationCount int,
	packetDirectModerationInterval int,
	vrssEnabled bool,
	vmmqEnabled bool,
	vmmqQueuePairs int,
	vlanAccess bool,
	vlanId int,
) (err error)

func (*ClientConfig) DeleteVMSwitch

func (c *ClientConfig) DeleteVMSwitch(ctx context.Context, name string) (err error)

func (*ClientConfig) DeleteVhd

func (c *ClientConfig) DeleteVhd(ctx context.Context, path string) (err error)

func (*ClientConfig) DeleteVm

func (c *ClientConfig) DeleteVm(ctx context.Context, name string) (err error)

func (*ClientConfig) DeleteVmDvdDrive

func (c *ClientConfig) DeleteVmDvdDrive(ctx context.Context, vmName string, controllerNumber int, controllerLocation int) (err error)

func (*ClientConfig) DeleteVmHardDiskDrive

func (c *ClientConfig) DeleteVmHardDiskDrive(ctx context.Context, vmname string, controllerNumber int32, controllerLocation int32) (err error)

func (*ClientConfig) DeleteVmNetworkAdapter

func (c *ClientConfig) DeleteVmNetworkAdapter(ctx context.Context, vmName string, index int) (err error)

func (*ClientConfig) DisableVmIntegrationService

func (c *ClientConfig) DisableVmIntegrationService(ctx context.Context, vmName string, name string) (err error)

func (*ClientConfig) EnableVmIntegrationService

func (c *ClientConfig) EnableVmIntegrationService(ctx context.Context, vmName string, name string) (err error)

func (*ClientConfig) GetNoVmFirmwares

func (c *ClientConfig) GetNoVmFirmwares(ctx context.Context) (result []api.VmFirmware)

func (*ClientConfig) GetVMSwitch

func (c *ClientConfig) GetVMSwitch(ctx context.Context, name string) (result api.VmSwitch, err error)

func (*ClientConfig) GetVhd

func (c *ClientConfig) GetVhd(ctx context.Context, path string) (result api.Vhd, err error)

func (*ClientConfig) GetVm

func (c *ClientConfig) GetVm(ctx context.Context, name string) (result api.Vm, err error)

func (*ClientConfig) GetVmDvdDrives

func (c *ClientConfig) GetVmDvdDrives(ctx context.Context, vmName string) (result []api.VmDvdDrive, err error)

func (*ClientConfig) GetVmFirmware

func (c *ClientConfig) GetVmFirmware(ctx context.Context, vmName string) (result api.VmFirmware, err error)

func (*ClientConfig) GetVmFirmwares

func (c *ClientConfig) GetVmFirmwares(ctx context.Context, vmName string) (result []api.VmFirmware, err error)

func (*ClientConfig) GetVmHardDiskDrives

func (c *ClientConfig) GetVmHardDiskDrives(ctx context.Context, vmName string) (result []api.VmHardDiskDrive, err error)

func (*ClientConfig) GetVmIntegrationServices

func (c *ClientConfig) GetVmIntegrationServices(ctx context.Context, vmName string) (result []api.VmIntegrationService, err error)

func (*ClientConfig) GetVmNetworkAdapters

func (c *ClientConfig) GetVmNetworkAdapters(ctx context.Context, vmName string, networkAdaptersWaitForIps []api.VmNetworkAdapterWaitForIp) (result []api.VmNetworkAdapter, err error)

func (*ClientConfig) GetVmProcessor

func (c *ClientConfig) GetVmProcessor(ctx context.Context, vmName string) (result api.VmProcessor, err error)

func (*ClientConfig) GetVmProcessors

func (c *ClientConfig) GetVmProcessors(ctx context.Context, vmName string) (result []api.VmProcessor, err error)

func (*ClientConfig) GetVmStatus

func (c *ClientConfig) GetVmStatus(ctx context.Context, vmName string) (result api.VmStatus, err error)

func (*ClientConfig) ResizeVhd

func (c *ClientConfig) ResizeVhd(ctx context.Context, path string, size uint64) (err error)

func (*ClientConfig) UpdateVMSwitch

func (c *ClientConfig) UpdateVMSwitch(
	ctx context.Context,
	switchId string,
	switchName string,
	notes string,
	allowManagementOS bool,

	switchType api.VMSwitchType,
	netAdapterNames []string,
	defaultFlowMinimumBandwidthAbsolute int64,
	defaultFlowMinimumBandwidthWeight int64,
	defaultQueueVmmqEnabled bool,
	defaultQueueVmmqQueuePairs int32,
	defaultQueueVrssEnabled bool,
) (err error)

func (*ClientConfig) UpdateVm

func (c *ClientConfig) UpdateVm(
	ctx context.Context,
	name string,

	automaticCriticalErrorAction api.CriticalErrorAction,
	automaticCriticalErrorActionTimeout int32,
	automaticStartAction api.StartAction,
	automaticStartDelay int32,
	automaticStopAction api.StopAction,
	checkpointType api.CheckpointType,
	dynamicMemory bool,
	guestControlledCacheTypes bool,
	highMemoryMappedIoSpace int64,
	lockOnDisconnect api.OnOffState,
	lowMemoryMappedIoSpace int32,
	memoryMaximumBytes int64,
	memoryMinimumBytes int64,
	memoryStartupBytes int64,
	notes string,
	processorCount int64,
	smartPagingFilePath string,
	snapshotFileLocation string,
	staticMemory bool,
) (err error)

func (*ClientConfig) UpdateVmDvdDrive

func (c *ClientConfig) UpdateVmDvdDrive(
	ctx context.Context,
	vmName string,
	controllerNumber int,
	controllerLocation int,
	toControllerNumber int,
	toControllerLocation int,
	path string,
	resourcePoolName string,
) (err error)

func (*ClientConfig) UpdateVmHardDiskDrive

func (c *ClientConfig) UpdateVmHardDiskDrive(
	ctx context.Context,
	vmName string,
	controllerNumber int32,
	controllerLocation int32,
	controllerType api.ControllerType,
	toControllerNumber int32,
	toControllerLocation int32,
	path string,
	diskNumber uint32,
	resourcePoolName string,
	supportPersistentReservations bool,
	maximumIops uint64,
	minimumIops uint64,
	qosPolicyId string,
	overrideCacheAttributes api.CacheAttributes,
) (err error)

func (*ClientConfig) UpdateVmNetworkAdapter

func (c *ClientConfig) UpdateVmNetworkAdapter(
	ctx context.Context,
	vmName string,
	index int,
	name string,
	switchName string,
	managementOs bool,
	isLegacy bool,
	dynamicMacAddress bool,
	staticMacAddress string,
	macAddressSpoofing api.OnOffState,
	dhcpGuard api.OnOffState,
	routerGuard api.OnOffState,
	portMirroring api.PortMirroring,
	ieeePriorityTag api.OnOffState,
	vmqWeight int,
	iovQueuePairsRequested int,
	iovInterruptModeration api.IovInterruptModerationValue,
	iovWeight int,
	ipsecOffloadMaximumSecurityAssociation int,
	maximumBandwidth int,
	minimumBandwidthAbsolute int,
	minimumBandwidthWeight int,
	mandatoryFeatureId []string,
	resourcePoolName string,
	testReplicaPoolName string,
	testReplicaSwitchName string,
	virtualSubnetId int,
	allowTeaming api.OnOffState,
	notMonitoredInCluster bool,
	stormLimit int,
	dynamicIpAddressLimit int,
	deviceNaming api.OnOffState,
	fixSpeed10G api.OnOffState,
	packetDirectNumProcs int,
	packetDirectModerationCount int,
	packetDirectModerationInterval int,
	vrssEnabled bool,
	vmmqEnabled bool,
	vmmqQueuePairs int,
	vlanAccess bool,
	vlanId int,
) (err error)

func (*ClientConfig) UpdateVmStatus

func (c *ClientConfig) UpdateVmStatus(
	ctx context.Context,
	vmName string,
	timeout uint32,
	pollPeriod uint32,
	state api.VmState,
) (err error)

func (*ClientConfig) VMSwitchExists

func (c *ClientConfig) VMSwitchExists(ctx context.Context, name string) (result api.VmSwitchExists, err error)

func (*ClientConfig) VhdExists

func (c *ClientConfig) VhdExists(ctx context.Context, path string) (result api.VhdExists, err error)

func (*ClientConfig) VmExists

func (c *ClientConfig) VmExists(ctx context.Context, name string) (result api.VmExists, err error)

func (*ClientConfig) WaitForVmNetworkAdaptersIps

func (c *ClientConfig) WaitForVmNetworkAdaptersIps(
	ctx context.Context,
	vmName string,
	timeout uint32,
	pollPeriod uint32,
	vmNetworkAdaptersWaitForIps []api.VmNetworkAdapterWaitForIp,
) (err error)

Jump to

Keyboard shortcuts

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