commands

package
v5.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpCommandUsage = `` /* 1856-byte string literal not displayed */

	DestroyCommandUsage = `` /* 178-byte string literal not displayed */

	CreateLBsCommandUsage = `` /* 788-byte string literal not displayed */

	DeleteLBsCommandUsage = `Deletes load balancer(s)

  [--skip-if-missing]  Skips deleting load balancer(s) if it is not attached (optional)`

	LBsCommandUsage = "Prints attached load balancer(s)"

	VersionCommandUsage = "Prints version"

	UsageCommandUsage = "Prints helpful message for the given command"

	EnvIdCommandUsage = "Prints environment ID"

	SSHKeyCommandUsage = "Prints SSH private key for the jumpbox user. This can be used to ssh to the director/use the director as a gateway host."

	RotateCommandUsage = "Rotates SSH key for the jumpbox user."

	JumpboxAddressCommandUsage = "Prints BOSH jumpbox address"

	DirectorUsernameCommandUsage = "Prints BOSH director username"

	DirectorPasswordCommandUsage = "Prints BOSH director password"

	DirectorAddressCommandUsage = "Prints BOSH director address"

	DirectorCACertCommandUsage = "Prints BOSH director CA certificate"

	PrintEnvCommandUsage = "Prints required BOSH environment variables"

	LatestErrorCommandUsage = "Prints the output from the latest call to terraform"

	BOSHDeploymentVarsCommandUsage = "Prints required variables for BOSH deployment"

	JumpboxDeploymentVarsCommandUsage = "Prints required variables for jumpbox deployment"

	CloudConfigUsage = "Prints suggested cloud configuration for BOSH environment"
)
View Source
const (
	EnvIDCommand            = "env-id"
	JumpboxAddressCommand   = "jumpbox-address"
	DirectorUsernameCommand = "director-username"
	DirectorPasswordCommand = "director-password"
	DirectorAddressCommand  = "director-address"
	DirectorCACertCommand   = "director-ca-cert"

	EnvIDPropertyName            = "environment id"
	JumpboxAddressPropertyName   = "jumpbox address"
	DirectorUsernamePropertyName = "director username"
	DirectorPasswordPropertyName = "director password"
	DirectorAddressPropertyName  = "director address"
	DirectorCACertPropertyName   = "director ca cert"
)
View Source
const (
	UsageHeader = `` /* 252-byte string literal not displayed */

	CommandUsage = `
[%s command options]
  %s`
)
View Source
const BBLDevVersion = "dev"
View Source
const (
	CloudConfigCommand = "cloud-config"
)
View Source
const GlobalUsage = `` /* 1326-byte string literal not displayed */

Variables

View Source
var LBNotFound error = errors.New("no load balancer has been found for this bbl environment")

Functions

This section is empty.

Types

type AWSCreateLBs

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

func NewAWSCreateLBs

func NewAWSCreateLBs(cloudConfigManager cloudConfigManager, stateStore stateStore,
	terraformManager terraformApplier, environmentValidator EnvironmentValidator) AWSCreateLBs

func (AWSCreateLBs) Execute

func (c AWSCreateLBs) Execute(config CreateLBsConfig, state storage.State) error

type AWSCreateLBsConfig

type AWSCreateLBsConfig struct {
	LBType    string
	CertPath  string
	KeyPath   string
	ChainPath string
	Domain    string
}

type AWSDeleteLBs

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

func NewAWSDeleteLBs

func NewAWSDeleteLBs(cloudConfigManager cloudConfigManager, stateStore stateStore,
	environmentValidator EnvironmentValidator, terraformManager terraformApplier) AWSDeleteLBs

func (AWSDeleteLBs) Execute

func (c AWSDeleteLBs) Execute(state storage.State) error

type AWSLBs

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

func NewAWSLBs

func NewAWSLBs(terraformManager terraformOutputter, logger logger) AWSLBs

func (AWSLBs) Execute

func (l AWSLBs) Execute(subcommandFlags []string, state storage.State) error

type AWSUp

type AWSUp struct{}

func NewAWSUp

func NewAWSUp() AWSUp

func (AWSUp) Execute

func (u AWSUp) Execute(state storage.State) (storage.State, error)

type AzureDeleteLBs

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

func NewAzureDeleteLBs

func NewAzureDeleteLBs(cloudConfigManager cloudConfigManager, stateStore stateStore, terraformManager terraformApplier) AzureDeleteLBs

func (AzureDeleteLBs) Execute

func (a AzureDeleteLBs) Execute(state storage.State) error

type AzureUp

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

func NewAzureUp

func NewAzureUp(azureClient azureClient) AzureUp

func (AzureUp) Execute

func (u AzureUp) Execute(state storage.State) (storage.State, error)

type BOSHDeploymentVars

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

func NewBOSHDeploymentVars

func NewBOSHDeploymentVars(logger logger, boshManager boshManager, stateValidator stateValidator, terraform terraformOutputter) BOSHDeploymentVars

func (BOSHDeploymentVars) CheckFastFails

func (b BOSHDeploymentVars) CheckFastFails(subcommandFlags []string, state storage.State) error

func (BOSHDeploymentVars) Execute

func (b BOSHDeploymentVars) Execute(args []string, state storage.State) error

func (BOSHDeploymentVars) Usage

func (BOSHDeploymentVars) Usage() string

type CloudConfig

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

func NewCloudConfig

func NewCloudConfig(logger logger, stateValidator stateValidator, cloudConfigManager cloudConfigManager) CloudConfig

func (CloudConfig) CheckFastFails

func (c CloudConfig) CheckFastFails(subcommandFlags []string, state storage.State) error

func (CloudConfig) Execute

func (c CloudConfig) Execute(args []string, state storage.State) error

func (CloudConfig) Usage

func (CloudConfig) Usage() string

type Command

type Command interface {
	CheckFastFails(subcommandFlags []string, state storage.State) error
	Execute(subcommandFlags []string, state storage.State) error
	Usage() string
}

type CreateLBs

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

func NewCreateLBs

func NewCreateLBs(createLBsCmd CreateLBsCmd, logger logger, stateValidator stateValidator, certificateValidator certificateValidator, boshManager boshManager) CreateLBs

func (CreateLBs) CheckFastFails

func (c CreateLBs) CheckFastFails(subcommandFlags []string, state storage.State) error

func (CreateLBs) Execute

func (c CreateLBs) Execute(args []string, state storage.State) error

func (CreateLBs) Usage

func (CreateLBs) Usage() string

type CreateLBsCmd

type CreateLBsCmd interface {
	Execute(createLBsConfig CreateLBsConfig, state storage.State) error
}

type CreateLBsConfig

type CreateLBsConfig struct {
	AWS AWSCreateLBsConfig
	GCP GCPCreateLBsConfig
}

type DeleteLBs

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

func NewDeleteLBs

func NewDeleteLBs(deleteLBs DeleteLBsCmd,
	logger logger, stateValidator stateValidator, boshManager boshManager) DeleteLBs

func (DeleteLBs) CheckFastFails

func (d DeleteLBs) CheckFastFails(subcommandFlags []string, state storage.State) error

func (DeleteLBs) Execute

func (d DeleteLBs) Execute(subcommandFlags []string, state storage.State) error

func (DeleteLBs) Usage

func (DeleteLBs) Usage() string

type DeleteLBsCmd

type DeleteLBsCmd interface {
	Execute(state storage.State) error
}

type Destroy

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

func NewDestroy

func NewDestroy(logger logger, stdin io.Reader,
	boshManager boshManager, stackManager stackManager,
	infrastructureManager infrastructureManager,
	certificateDeleter certificateDeleter, stateStore stateStore, stateValidator stateValidator,
	terraformManager terraformDestroyer, networkDeletionValidator NetworkDeletionValidator) Destroy

func (Destroy) CheckFastFails

func (d Destroy) CheckFastFails(subcommandFlags []string, state storage.State) error

func (Destroy) Execute

func (d Destroy) Execute(subcommandFlags []string, state storage.State) error

func (Destroy) Usage

func (Destroy) Usage() string

type EnvironmentValidator

type EnvironmentValidator interface {
	Validate(state storage.State) error
}

type GCPCreateLBs

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

func NewGCPCreateLBs

func NewGCPCreateLBs(terraformManager terraformApplier,
	cloudConfigManager cloudConfigManager,
	stateStore stateStore, environmentValidator EnvironmentValidator,
	availabilityZoneRetriever availabilityZoneRetriever) GCPCreateLBs

func (GCPCreateLBs) Execute

func (c GCPCreateLBs) Execute(config CreateLBsConfig, state storage.State) error

type GCPCreateLBsConfig

type GCPCreateLBsConfig struct {
	LBType   string
	CertPath string
	KeyPath  string
	Domain   string
}

type GCPDeleteLBs

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

func NewGCPDeleteLBs

func NewGCPDeleteLBs(stateStore stateStore, environmentValidator EnvironmentValidator,
	terraformManager terraformApplier, cloudConfigManager cloudConfigManager) GCPDeleteLBs

func (GCPDeleteLBs) Execute

func (g GCPDeleteLBs) Execute(state storage.State) error

type GCPLBs

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

func NewGCPLBs

func NewGCPLBs(terraformManager terraformOutputter, logger logger) GCPLBs

func (GCPLBs) Execute

func (l GCPLBs) Execute(subcommandFlags []string, state storage.State) error

type GCPUp

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

func NewGCPUp

func NewGCPUp(gcpAvailabilityZoneRetriever gcpAvailabilityZoneRetriever) GCPUp

func (GCPUp) Execute

func (u GCPUp) Execute(state storage.State) (storage.State, error)

type GlobalFlags

type GlobalFlags struct {
	AWSAccessKeyID     string
	AWSSecretAccessKey string
	AWSRegion          string
	StateDir           string
}

type JumpboxDeploymentVars

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

func NewJumpboxDeploymentVars

func NewJumpboxDeploymentVars(logger logger, boshManager boshManager, stateValidator stateValidator, terraform terraformOutputter) JumpboxDeploymentVars

func (JumpboxDeploymentVars) CheckFastFails

func (b JumpboxDeploymentVars) CheckFastFails(subcommandFlags []string, state storage.State) error

func (JumpboxDeploymentVars) Execute

func (b JumpboxDeploymentVars) Execute(args []string, state storage.State) error

func (JumpboxDeploymentVars) Usage

func (JumpboxDeploymentVars) Usage() string

type LBs

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

func NewLBs

func NewLBs(lbs LBsCmd, stateValidator stateValidator) LBs

func (LBs) CheckFastFails

func (l LBs) CheckFastFails(subcommandFlags []string, state storage.State) error

func (LBs) Execute

func (l LBs) Execute(subcommandFlags []string, state storage.State) error

func (LBs) Usage

func (LBs) Usage() string

type LBsCmd

type LBsCmd interface {
	Execute([]string, storage.State) error
}

type LatestError

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

func NewLatestError

func NewLatestError(logger logger, stateValidator stateValidator) LatestError

func (LatestError) CheckFastFails

func (l LatestError) CheckFastFails(subcommandFlags []string, state storage.State) error

func (LatestError) Execute

func (l LatestError) Execute(subcommandFlags []string, bblState storage.State) error

func (LatestError) Usage

func (LatestError) Usage() string

type NetworkDeletionValidator

type NetworkDeletionValidator interface {
	ValidateSafeToDelete(networkName string, envID string) error
}

type PrintEnv

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

func NewPrintEnv

func NewPrintEnv(logger logger, stateValidator stateValidator, terraformManager terraformOutputter) PrintEnv

func (PrintEnv) CheckFastFails

func (p PrintEnv) CheckFastFails(subcommandFlags []string, state storage.State) error

func (PrintEnv) Execute

func (p PrintEnv) Execute(args []string, state storage.State) error

func (PrintEnv) Usage

func (PrintEnv) Usage() string

type Rotate

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

func NewRotate

func NewRotate(stateValidator stateValidator, sshKeyDeleter sshKeyDeleter, up up) Rotate

func (Rotate) CheckFastFails

func (r Rotate) CheckFastFails(subcommandFlags []string, state storage.State) error

func (Rotate) Execute

func (r Rotate) Execute(args []string, state storage.State) error

func (Rotate) Usage

func (Rotate) Usage() string

type SSHKey

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

func NewSSHKey

func NewSSHKey(logger logger, stateValidator stateValidator, sshKeyGetter sshKeyGetter) SSHKey

func (SSHKey) CheckFastFails

func (s SSHKey) CheckFastFails(subcommandFlags []string, state storage.State) error

func (SSHKey) Execute

func (s SSHKey) Execute(subcommandFlags []string, state storage.State) error

func (SSHKey) Usage

func (SSHKey) Usage() string

type StateQuery

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

func NewStateQuery

func NewStateQuery(logger logger, stateValidator stateValidator, terraformManager terraformOutputter, infrastructureManager infrastructureManager, propertyName string) StateQuery

func (StateQuery) CheckFastFails

func (s StateQuery) CheckFastFails(subcommandFlags []string, state storage.State) error

func (StateQuery) Execute

func (s StateQuery) Execute(subcommandFlags []string, state storage.State) error

func (StateQuery) Usage

func (s StateQuery) Usage() string

type Up

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

func NewUp

func NewUp(upCmd UpCmd, boshManager boshManager, cloudConfigManager cloudConfigManager,
	stateStore stateStore, envIDManager envIDManager, terraformManager terraformApplier) Up

func (Up) CheckFastFails

func (u Up) CheckFastFails(args []string, state storage.State) error

func (Up) Execute

func (u Up) Execute(args []string, state storage.State) error

func (Up) ParseArgs

func (u Up) ParseArgs(args []string, state storage.State) (UpConfig, error)

func (Up) Usage

func (Up) Usage() string

type UpCmd

type UpCmd interface {
	Execute(storage.State) (storage.State, error)
}

type UpConfig

type UpConfig struct {
	Name       string
	OpsFile    string
	NoDirector bool
}

type Usage

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

func NewUsage

func NewUsage(logger logger) Usage

func (Usage) CheckFastFails

func (u Usage) CheckFastFails(subcommandFlags []string, state storage.State) error

func (Usage) Execute

func (u Usage) Execute(subcommandFlags []string, state storage.State) error

func (Usage) Print

func (u Usage) Print()

func (Usage) PrintCommandUsage

func (u Usage) PrintCommandUsage(command, message string)

func (Usage) Usage

func (Usage) Usage() string

type Version

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

func NewVersion

func NewVersion(version string, logger logger) Version

func (Version) CheckFastFails

func (v Version) CheckFastFails(subcommandFlags []string, state storage.State) error

func (Version) Execute

func (v Version) Execute(subcommandFlags []string, state storage.State) error

func (Version) Usage

func (Version) Usage() string

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