powershell

package
v0.0.0-...-48ffce4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config) (result *comm, err error)

Creates a new packer.Communicator implementation over SSH. This takes an already existing TCP connection and SSH configuration.

Types

type Config

type Config struct {
	Driver        Driver
	Username      string
	Password      string
	RemoteHostUrl string
	Ui            packer.Ui
}

type Driver

type Driver interface {

	// Exec executes the given PowerShell command
	Exec(string) error

	// ExecRet executes the given PowerShell command and returns a value
	ExecRet(string) (string, error)

	ExecRemote(cmd *packer.RemoteCmd) error

	// Verify checks to make sure that this driver should function
	// properly. If there is any indication the driver can't function,
	// this will return an error.
	Verify() error
}

A driver is able to talk to PowerShell Azure and perform certain operations with it. Some of the operations on here may seem overly specific, but they were built specifically in mind to handle features of the HyperV builder for Packer, and to abstract differences in versions out of the builder steps, so sometimes the methods are extremely specific.

type PS4Driver

type PS4Driver struct {
	ExecPath string
}

func NewPS4Driver

func NewPS4Driver() (*PS4Driver, error)

func (*PS4Driver) Exec

func (d *PS4Driver) Exec(block string) error

func (*PS4Driver) ExecRemote

func (d *PS4Driver) ExecRemote(cmd *packer.RemoteCmd) error

func (*PS4Driver) ExecRet

func (d *PS4Driver) ExecRet(block string) (string, error)

func (*PS4Driver) Verify

func (d *PS4Driver) Verify() error

func (*PS4Driver) VerifyPSAzureModule

func (d *PS4Driver) VerifyPSAzureModule() error

Jump to

Keyboard shortcuts

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