scvmm

package
v0.0.0-...-03c656d Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWinRMCPConnection

func GetWinRMCPConnection(config ProviderConfig) (*winrmcp.Winrmcp, error)

GetWinRMCPConnection sets up a winrmcp client that can be used to upload files to the DC.

func GetWinRMConnection

func GetWinRMConnection(config ProviderConfig) (*winrm.Client, error)

GetWinRMConnection returns a WinRM connection

func NewKerberosTransporter

func NewKerberosTransporter(config ProviderConfig) func() winrm.Transporter

func Provider

func Provider() *schema.Provider

Provider exports the provider schema

Types

type KerberosTransporter

type KerberosTransporter struct {
	Username string
	Password string
	Domain   string
	Hostname string
	Port     int
	Proto    string
	SPN      string
	KrbConf  string
	// contains filtered or unexported fields
}

func (*KerberosTransporter) Post

func (c *KerberosTransporter) Post(_ *winrm.Client, request *soap.SoapMessage) (string, error)

func (*KerberosTransporter) Transport

func (c *KerberosTransporter) Transport(endpoint *winrm.Endpoint) error

type ProviderConf

type ProviderConf struct {
	Configuration *ProviderConfig
	// contains filtered or unexported fields
}

ProviderConf holds structures that are useful to the provider at runtime.

func (ProviderConf) AcquireWinRMCPClient

func (pcfg ProviderConf) AcquireWinRMCPClient() (winRMCPClient *winrmcp.Winrmcp, err error)

AcquireWinRMCPClient get a thread safe WinRM client from the pool. Create a new one if the pool is empty

func (ProviderConf) AcquireWinRMClient

func (pcfg ProviderConf) AcquireWinRMClient() (winRMClient *winrm.Client, err error)

AcquireWinRMClient get a thread safe WinRM client from the pool. Create a new one if the pool is empty

func (ProviderConf) ReleaseWinRMCPClient

func (pcfg ProviderConf) ReleaseWinRMCPClient(winRMCPClient *winrmcp.Winrmcp)

ReleaseWinRMCPClient returns a thread safe WinRM client after usage to the pool.

func (ProviderConf) ReleaseWinRMClient

func (pcfg ProviderConf) ReleaseWinRMClient(winRMClient *winrm.Client)

ReleaseWinRMClient returns a thread safe WinRM client after usage to the pool.

type ProviderConfig

type ProviderConfig struct {
	WinRMUsername string
	WinRMPassword string
	WinRMHost     string
	WinRMPort     int
	WinRMProto    string
	WinRMInsecure bool
	KrbRealm      string
	KrbConfig     string
	KrbSpn        string
	WinRMUseNTLM  bool
}

ProviderConfig holds all the information necessary to configure the provider

func NewConfig

func NewConfig(d *schema.ResourceData) ProviderConfig

NewConfig returns a new Config struct populated with Resource Data.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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