boshcli

package
v0.0.0-...-56aa1ee Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI struct holds the abstraction of execCmd

func (*CLI) CreateEnv

func (c *CLI) CreateEnv(store Store, config IAASEnvironment, password, cert, key, ca string, tags map[string]string) error

func (*CLI) DeleteEnv

func (c *CLI) DeleteEnv(store Store, config IAASEnvironment, password, cert, key, ca string, tags map[string]string) error

func (*CLI) Locks

func (c *CLI) Locks(config IAASEnvironment, ip, password, ca string) ([]byte, error)

Locks runs bosh locks

func (*CLI) Recreate

func (c *CLI) Recreate(config IAASEnvironment, ip, password, ca string) error

Recreate runs BOSH recreate

func (*CLI) RunAuthenticatedCommand

func (c *CLI) RunAuthenticatedCommand(action, ip, password, ca string, detach bool, stdout io.Writer, flags ...string) error

RunAuthenticatedCommand runs the bosh command `action` with flags `flags` specifying `detach` will cause the task to detach once a deployment starts `detach` is currently only implemented with the action `deploy`

func (*CLI) UpdateCloudConfig

func (c *CLI) UpdateCloudConfig(config IAASEnvironment, ip, password, ca string) error

UpdateCloudConfig generates cloud config from template and use it to update bosh cloud config

func (*CLI) UploadConcourseStemcell

func (c *CLI) UploadConcourseStemcell(config IAASEnvironment, ip, password, ca string) error

UploadConcourseStemcell uploads a stemcell for the chosen IAAS

type IAASEnvironment

type IAASEnvironment interface {
	ConfigureDirectorManifestCPI() (string, error)
	ConfigureDirectorCloudConfig() (string, error)
	ConfigureConcourseStemcell() (string, error)
	IAASCheck() iaas.Name
}

IAASEnvironment exposes ConfigureDirectorManifestCPI

type ICLI

type ICLI interface {
	CreateEnv(store Store, config IAASEnvironment, password, cert, key, ca string, tags map[string]string) error
	DeleteEnv(store Store, config IAASEnvironment, password, cert, key, ca string, tags map[string]string) error
	RunAuthenticatedCommand(action, ip, password, ca string, detach bool, stdout io.Writer, flags ...string) error
	Locks(config IAASEnvironment, ip, password, ca string) ([]byte, error)
	Recreate(config IAASEnvironment, ip, password, ca string) error
	UpdateCloudConfig(config IAASEnvironment, ip, password, ca string) error
	UploadConcourseStemcell(config IAASEnvironment, ip, password, ca string) error
}

func New

func New(ops ...Option) (ICLI, error)

New provides a new CLI

type Option

type Option func(*CLI) error

Option defines the arbitary element of Options for New

func BOSHPath

func BOSHPath(path string) Option

BOSHPath returns the path of the bosh-cli as an Option

func DownloadBOSH

func DownloadBOSH() Option

DownloadBOSH returns the dowloaded boshcli path Option

type Store

type Store interface {
	Set(key string, value []byte) error
	// Get must return a zero length byte slice and a nil error when the key is not present in the store
	Get(string) ([]byte, error)
}

Store exposes its methods

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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