commands

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

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

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

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

	UpdateLBsCommandUsage = `` /* 330-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"

	DirectorUsernameCommandUsage = "Prints BOSH director username"

	DirectorPasswordCommandUsage = "Prints BOSH director password"

	DirectorAddressCommandUsage = "Prints BOSH director address"

	DirectorCACertCommandUsage = "Prints BOSH director CA certificate"
)
View Source
const (
	EnvIDCommand            = "env-id"
	SSHKeyCommand           = "ssh-key"
	DirectorUsernameCommand = "director-username"
	DirectorPasswordCommand = "director-password"
	DirectorAddressCommand  = "director-address"
	DirectorCACertCommand   = "director-ca-cert"
	BOSHCACertCommand       = "bosh-ca-cert"

	EnvIDPropertyName            = "environment id"
	SSHKeyPropertyName           = "ssh key"
	DirectorUsernamePropertyName = "director username"
	DirectorPasswordPropertyName = "director password"
	DirectorAddressPropertyName  = "director address"
	DirectorCACertPropertyName   = "director ca cert"
	BOSHCACertPropertyName       = "bosh ca cert"
)
View Source
const (
	HelpCommand = "help"

	UsageHeader = `` /* 162-byte string literal not displayed */

	CommandUsage = `
[%s command options]
  %s`
)
View Source
const (
	VersionCommand = "version"
	BBLDevVersion  = "dev"
)
View Source
const CreateLBsCommand = "create-lbs"
View Source
const (
	DeleteLBsCommand = "delete-lbs"
)
View Source
const (
	DestroyCommand = "destroy"
)
View Source
const GlobalUsage = `` /* 874-byte string literal not displayed */
View Source
const (
	LBsCommand = "lbs"
)
View Source
const (
	UpCommand = "up"
)
View Source
const UpdateLBsCommand = "update-lbs"

Variables

View Source
var BBLNotFound error = errors.New("a bbl environment could not be found, please create a new environment before running this command again")
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(logger logger, credentialValidator credentialValidator, certificateManager certificateManager,
	infrastructureManager infrastructureManager, availabilityZoneRetriever availabilityZoneRetriever, boshClientProvider boshClientProvider,
	boshCloudConfigurator boshCloudConfigurator, cloudConfigManager cloudConfigManager, certificateValidator certificateValidator,
	guidGenerator guidGenerator, stateStore stateStore) AWSCreateLBs

func (AWSCreateLBs) Execute

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

type AWSCreateLBsConfig

type AWSCreateLBsConfig struct {
	LBType       string
	CertPath     string
	KeyPath      string
	ChainPath    string
	SkipIfExists bool
}

type AWSDeleteLBs

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

func NewAWSDeleteLBs

func NewAWSDeleteLBs(credentialValidator credentialValidator, availabilityZoneRetriever availabilityZoneRetriever,
	certificateManager certificateManager, infrastructureManager infrastructureManager, logger logger,
	boshCloudConfigurator boshCloudConfigurator, cloudConfigManager cloudConfigManager,
	boshClientProvider boshClientProvider, stateStore stateStore,
) AWSDeleteLBs

func (AWSDeleteLBs) Execute

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

type AWSUp

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

func NewAWSUp

func NewAWSUp(
	credentialValidator credentialValidator, infrastructureManager infrastructureManager,
	keyPairSynchronizer keyPairSynchronizer, boshDeployer boshDeployer, stringGenerator stringGenerator,
	boshCloudConfigurator boshCloudConfigurator, availabilityZoneRetriever availabilityZoneRetriever,
	certificateDescriber certificateDescriber, cloudConfigManager cloudConfigManager,
	boshClientProvider boshClientProvider, stateStore stateStore,
	configProvider configProvider) AWSUp

func (AWSUp) Execute

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

type AWSUpConfig

type AWSUpConfig struct {
	AccessKeyID     string
	SecretAccessKey string
	Region          string
}

type Command

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

type CreateLBs

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

func NewCreateLBs

func NewCreateLBs(awsCreateLBs awsCreateLBs, gcpCreateLBs gcpCreateLBs, stateValidator stateValidator) CreateLBs

func (CreateLBs) Execute

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

func (CreateLBs) Usage

func (CreateLBs) Usage() string

type DeleteLBs

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

func NewDeleteLBs

func NewDeleteLBs(gcpDeleteLBs gcpDeleteLBs, awsDeleteLBs awsDeleteLBs,
	logger logger, stateValidator stateValidator) DeleteLBs

func (DeleteLBs) Execute

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

func (DeleteLBs) Usage

func (DeleteLBs) Usage() string

type Destroy

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

func NewDestroy

func NewDestroy(credentialValidator credentialValidator, logger logger, stdin io.Reader,
	boshDeleter boshDeleter, vpcStatusChecker vpcStatusChecker, stackManager stackManager,
	stringGenerator stringGenerator, infrastructureManager infrastructureManager, awsKeyPairDeleter awsKeyPairDeleter,
	gcpKeyPairDeleter gcpKeyPairDeleter, certificateDeleter certificateDeleter, stateStore stateStore, stateValidator stateValidator,
	terraformExecutor terraformExecutor, terraformOutputter terraformOutputter, networkInstancesChecker networkInstancesChecker) Destroy

func (Destroy) Execute

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

func (Destroy) Usage

func (Destroy) Usage() string

type EnvGetter

type EnvGetter struct{}

func NewEnvGetter

func NewEnvGetter() EnvGetter

func (EnvGetter) Get

func (EnvGetter) Get(name string) string

type GCPCreateLBs

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

func NewGCPCreateLBs

func NewGCPCreateLBs(terraformExecutor terraformExecutor, terraformOutputter terraformOutputter,
	cloudConfigGenerator gcpCloudConfigGenerator, boshClientProvider boshClientProvider, zones zones,
	stateStore stateStore, logger logger) GCPCreateLBs

func (GCPCreateLBs) Execute

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

type GCPCreateLBsConfig

type GCPCreateLBsConfig struct {
	LBType       string
	CertPath     string
	KeyPath      string
	SkipIfExists bool
}

type GCPDeleteLBs

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

func NewGCPDeleteLBs

func NewGCPDeleteLBs(terraformOutputter terraformOutputter, cloudConfigGenerator gcpCloudConfigGenerator,
	zones zones, logger logger, boshClientProvider boshClientProvider, stateStore stateStore,
	terraformExecutor terraformExecutor) GCPDeleteLBs

func (GCPDeleteLBs) Execute

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

type GCPUp

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

func NewGCPUp

func NewGCPUp(stateStore stateStore, keyPairUpdater keyPairUpdater, gcpProvider gcpProvider, terraformExecutor terraformExecutor, boshDeployer boshDeployer,
	stringGenerator stringGenerator, logger logger, boshClientProvider boshClientProvider, cloudConfigGenerator gcpCloudConfigGenerator,
	terraformOutputter terraformOutputter, zones zones) GCPUp

func (GCPUp) Execute

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

type GCPUpConfig

type GCPUpConfig struct {
	ServiceAccountKeyPath string
	ProjectID             string
	Zone                  string
	Region                string
}

type GlobalFlags

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

type LBs

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

func NewLBs

func NewLBs(credentialValidator credentialValidator, stateValidator stateValidator, infrastructureManager infrastructureManager, stdout io.Writer) LBs

func (LBs) Execute

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

func (LBs) Usage

func (LBs) Usage() string

type StateQuery

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

func NewStateQuery

func NewStateQuery(logger logger, stateValidator stateValidator, propertyName string, getProperty getPropertyFunc) StateQuery

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(awsUp awsUp, gcpUp gcpUp, envGetter envGetter,
	envIDGenerator envIDGenerator) Up

func (Up) Execute

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

func (Up) Usage

func (Up) Usage() string

type UpdateLBs

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

func NewUpdateLBs

func NewUpdateLBs(credentialValidator credentialValidator, certificateManager certificateManager,
	availabilityZoneRetriever availabilityZoneRetriever, infrastructureManager infrastructureManager, boshClientProvider boshClientProvider,
	logger logger, certificateValidator certificateValidator, guidGenerator guidGenerator, stateStore stateStore,
	stateValidator stateValidator) UpdateLBs

func (UpdateLBs) Execute

func (c UpdateLBs) Execute(subcommandFlags []string, state storage.State) error

func (UpdateLBs) Usage

func (UpdateLBs) Usage() string

type Usage

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

func NewUsage

func NewUsage(stdout io.Writer) Usage

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, stdout io.Writer) Version

func (Version) Execute

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

func (Version) Usage

func (Version) Usage() string

Jump to

Keyboard shortcuts

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