cmd

package
v2.0.14+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const VersionLabel = "[DEV BUILD]"

Variables

View Source
var InstanceTableHeader = InstanceTableValues{
	Name:    boshtbl.NewValueString("Instance"),
	Process: boshtbl.NewValueString("Process"),

	ProcessState: boshtbl.NewValueString("Process State"),
	AZ:           boshtbl.NewValueString("AZ"),
	VMType:       boshtbl.NewValueString("VM Type"),
	IPs:          boshtbl.NewValueString("IPs"),

	State:        boshtbl.NewValueString("State"),
	VMCID:        boshtbl.NewValueString("VM CID"),
	DiskCIDs:     boshtbl.NewValueString("Disk CIDs"),
	AgentID:      boshtbl.NewValueString("Agent ID"),
	Index:        boshtbl.NewValueString("Index"),
	Resurrection: boshtbl.NewValueString("Resurrection\nPaused"),
	Bootstrap:    boshtbl.NewValueString("Bootstrap"),
	Ignore:       boshtbl.NewValueString("Ignore"),

	DNS: boshtbl.NewValueString("DNS A Records"),

	Uptime: boshtbl.NewValueString("Uptime"),
	Load:   boshtbl.NewValueString("Load\n(1m, 5m, 15m)"),

	CPUTotal: boshtbl.NewValueString("CPU\nTotal"),
	CPUUser:  boshtbl.NewValueString("CPU\nUser"),
	CPUSys:   boshtbl.NewValueString("CPU\nSys"),
	CPUWait:  boshtbl.NewValueString("CPU\nWait"),

	Memory: boshtbl.NewValueString("Memory\nUsage"),
	Swap:   boshtbl.NewValueString("Swap\nUsage"),

	SystemDisk:     boshtbl.NewValueString("System\nDisk Usage"),
	EphemeralDisk:  boshtbl.NewValueString("Ephemeral\nDisk Usage"),
	PersistentDisk: boshtbl.NewValueString("Persistent\nDisk Usage"),
}

Functions

func NewEnvFactory

func NewEnvFactory(deps BasicDeps, manifestPath string, statePath string, manifestVars boshtpl.Variables, manifestOp patch.Op) *envFactory

func NewValueStringPercent

func NewValueStringPercent(str string) boshtbl.Value

Types

type AddBlobArgs

type AddBlobArgs struct {
	Path      string `positional-arg-name:"PATH"`
	BlobsPath string `positional-arg-name:"BLOBS-PATH"`
}

type AddBlobCmd

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

func NewAddBlobCmd

func NewAddBlobCmd(blobsDir boshreldir.BlobsDir, fs boshsys.FileSystem, ui boshui.UI) AddBlobCmd

func (AddBlobCmd) Run

func (c AddBlobCmd) Run(opts AddBlobOpts) error

type AddBlobOpts

type AddBlobOpts struct {
	Args AddBlobArgs `positional-args:"true" required:"true"`

	Directory DirOrCWDArg `long:"dir" description:"Release directory path if not current working directory" default:"."`
	// contains filtered or unexported fields
}

func (AddBlobOpts) Execute

func (c AddBlobOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type AliasEnvArgs added in v0.0.96

type AliasEnvArgs struct {
	Alias string `positional-arg-name:"ALIAS" description:"Environment alias"`
}

type AliasEnvCmd added in v0.0.96

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

func NewAliasEnvCmd added in v0.0.96

func NewAliasEnvCmd(
	sessionFactory func(cmdconf.Config) Session,
	config cmdconf.Config,
	ui boshui.UI,
) AliasEnvCmd

func (AliasEnvCmd) Run added in v0.0.96

func (c AliasEnvCmd) Run(opts AliasEnvOpts) error

type AliasEnvOpts added in v0.0.96

type AliasEnvOpts struct {
	Args AliasEnvArgs `positional-args:"true" required:"true"`

	URL    string
	CACert CACertArg
	// contains filtered or unexported fields
}

func (AliasEnvOpts) Execute added in v0.0.96

func (c AliasEnvOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type AllOrInstanceGroupOrInstanceSlugArgs added in v0.0.102

type AllOrInstanceGroupOrInstanceSlugArgs struct {
	Slug boshdir.AllOrInstanceGroupOrInstanceSlug `positional-arg-name:"INSTANCE-GROUP[/INSTANCE-ID]"`
}

type AttachDiskArgs added in v0.0.105

type AttachDiskArgs struct {
	Slug    boshdir.InstanceSlug `positional-arg-name:"INSTANCE-GROUP/INSTANCE-ID"`
	DiskCID string               `positional-arg-name:"DISK-CID"`
}

type AttachDiskCmd added in v0.0.105

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

func NewAttachDiskCmd added in v0.0.105

func NewAttachDiskCmd(deployment boshdir.Deployment) AttachDiskCmd

func (AttachDiskCmd) Run added in v0.0.105

func (c AttachDiskCmd) Run(opts AttachDiskOpts) error

type AttachDiskOpts added in v0.0.105

type AttachDiskOpts struct {
	Args AttachDiskArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (AttachDiskOpts) Execute added in v0.0.105

func (c AttachDiskOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type BackUpArgs

type BackUpArgs struct {
	Path FileArg `positional-arg-name:"PATH"`
}

type BackUpOpts

type BackUpOpts struct {
	Args BackUpArgs `positional-args:"true" required:"true"`

	Force bool `long:"force" description:"Overwrite if the backup file already exists"`
	// contains filtered or unexported fields
}

func (BackUpOpts) Execute

func (c BackUpOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type BasicDeps

type BasicDeps struct {
	FS     boshsys.FileSystem
	UI     *boshui.ConfUI
	Logger boshlog.Logger

	UUIDGen                  boshuuid.Generator
	CmdRunner                boshsys.CmdRunner
	Compressor               boshcmd.Compressor
	DigestCalculator         bicrypto.DigestCalculator
	DigestCreationAlgorithms []boshcrypto.Algorithm

	Time clock.Clock
}

func NewBasicDeps

func NewBasicDeps(ui *boshui.ConfUI, logger boshlog.Logger) BasicDeps

func NewBasicDepsWithFS added in v0.0.139

func NewBasicDepsWithFS(ui *boshui.ConfUI, fs boshsys.FileSystem, logger boshlog.Logger) BasicDeps

func (BasicDeps) WithSha2CheckSumming added in v0.0.154

func (b BasicDeps) WithSha2CheckSumming() BasicDeps

type BasicLoginStrategy

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

func NewBasicLoginStrategy

func NewBasicLoginStrategy(
	sessionFactory func(cmdconf.Config) Session,
	config cmdconf.Config,
	ui boshui.UI,
) BasicLoginStrategy

func (BasicLoginStrategy) Try

func (s BasicLoginStrategy) Try() error

type BlobsCmd

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

func NewBlobsCmd

func NewBlobsCmd(blobsDir boshreldir.BlobsDir, ui boshui.UI) BlobsCmd

func (BlobsCmd) Run

func (c BlobsCmd) Run() error

type BlobsOpts

type BlobsOpts struct {
	Directory DirOrCWDArg `long:"dir" description:"Release directory path if not current working directory" default:"."`
	// contains filtered or unexported fields
}

Blobs

func (BlobsOpts) Execute

func (c BlobsOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type BoolArg

type BoolArg bool

func (*BoolArg) UnmarshalFlag

func (v *BoolArg) UnmarshalFlag(data string) error

type BoshOpts

type BoshOpts struct {
	VersionOpt func() error `long:"version" short:"v" description:"Show CLI version"`

	ConfigPathOpt string `long:"config" description:"Config file path" env:"BOSH_CONFIG" default:"~/.bosh/config"`

	EnvironmentOpt string    `long:"environment" short:"e" description:"Director environment name or URL" env:"BOSH_ENVIRONMENT"`
	CACertOpt      CACertArg `long:"ca-cert"               description:"Director CA certificate path or value" env:"BOSH_CA_CERT"`
	Sha2           bool      `long:"sha2"                  description:"Use sha256 checksums. Requires recent director and stemcells."`

	// Hidden
	UsernameOpt string `long:"user" hidden:"true" env:"BOSH_USER"`

	// Specify client credentials
	ClientOpt       string `long:"client"        description:"Override username or UAA client"        env:"BOSH_CLIENT"`
	ClientSecretOpt string `long:"client-secret" description:"Override password or UAA client secret" env:"BOSH_CLIENT_SECRET"`

	DeploymentOpt string `long:"deployment" short:"d" description:"Deployment name" env:"BOSH_DEPLOYMENT"`

	// Output formatting
	ColumnOpt         []ColumnOpt `long:"column"                    description:"Filter to show only given column(s)"`
	JSONOpt           bool        `long:"json"                      description:"Output as JSON"`
	TTYOpt            bool        `long:"tty"                       description:"Force TTY-like output"`
	NoColorOpt        bool        `long:"no-color"                  description:"Toggle colorized output"`
	NonInteractiveOpt bool        `long:"non-interactive" short:"n" description:"Don't ask for user input"`

	Help HelpOpts `command:"help" description:"Show this help message"`

	// Environments
	Environment  EnvironmentOpts  `command:"environment"  alias:"env"  description:"Show environment"`
	Environments EnvironmentsOpts `command:"environments" alias:"envs" description:"List environments"`
	CreateEnv    CreateEnvOpts    `command:"create-env"                description:"Create or update BOSH environment"`
	DeleteEnv    DeleteEnvOpts    `command:"delete-env"                description:"Delete BOSH environment"`
	AliasEnv     AliasEnvOpts     `command:"alias-env"                 description:"Alias environment to save URL and CA certificate"`

	// Authentication
	LogIn  LogInOpts  `command:"log-in"  alias:"l" alias:"login"  description:"Log in"`
	LogOut LogOutOpts `command:"log-out"           alias:"logout" description:"Log out"`

	// Tasks
	Task       TaskOpts       `command:"task"        alias:"t"  description:"Show task status and start tracking its output"`
	Tasks      TasksOpts      `command:"tasks"       alias:"ts" description:"List running or recent tasks"`
	CancelTask CancelTaskOpts `command:"cancel-task" alias:"ct" description:"Cancel task at its next checkpoint"`

	// Misc
	Locks   LocksOpts   `command:"locks"    description:"List current locks"`
	CleanUp CleanUpOpts `command:"clean-up" description:"Clean up releases, stemcells, disks, etc."`
	BackUp  BackUpOpts  `command:"back-up"  description:"Back up the Director database to a tarball"`

	// Disks
	AttachDisk AttachDiskOpts `command:"attach-disk" description:"Attaches an disk to an instance and replaces the current disk"`

	// Cloud config
	CloudConfig       CloudConfigOpts       `command:"cloud-config"        alias:"cc"  description:"Show current cloud config"`
	UpdateCloudConfig UpdateCloudConfigOpts `command:"update-cloud-config" alias:"ucc" description:"Update current cloud config"`

	// CPI Config
	CPIConfig       CPIConfigOpts       `command:"cpi-config"        description:"Show current CPI config"`
	UpdateCPIConfig UpdateCPIConfigOpts `command:"update-cpi-config" description:"Update current CPI config"`

	// Runtime config
	RuntimeConfig       RuntimeConfigOpts       `command:"runtime-config"        alias:"rc"  description:"Show current runtime config"`
	UpdateRuntimeConfig UpdateRuntimeConfigOpts `command:"update-runtime-config" alias:"urc" description:"Update current runtime config"`

	// Deployments
	Deployment       DeploymentOpts       `command:"deployment"        alias:"dep"             description:"Show deployment information"`
	Deployments      DeploymentsOpts      `command:"deployments"       alias:"ds" alias:"deps" description:"List deployments"`
	DeleteDeployment DeleteDeploymentOpts `command:"delete-deployment" alias:"deld"            description:"Delete deployment"`

	Deploy   DeployOpts   `` /* 143-byte string literal not displayed */
	Manifest ManifestOpts `command:"manifest" alias:"m" alias:"man" alias:"download-manifest" description:"Download deployment manifest locally"`

	Interpolate InterpolateOpts `command:"interpolate" alias:"int" description:"Interpolates variables into a manifest"`

	// Events
	Events EventsOpts `command:"events" description:"List events"`
	Event  EventOpts  `command:"event" description:"Show event details"`

	// Stemcells
	Stemcells      StemcellsOpts      `command:"stemcells"       alias:"ss" alias:"stems" description:"List stemcells"`
	UploadStemcell UploadStemcellOpts `command:"upload-stemcell" alias:"us"               description:"Upload stemcell"`
	DeleteStemcell DeleteStemcellOpts `command:"delete-stemcell" alias:"dels"             description:"Delete stemcell"`
	RepackStemcell RepackStemcellOpts `command:"repack-stemcell"                          description:"Repack stemcell"`

	// Releases
	Releases       ReleasesOpts       `command:"releases"        alias:"rs" alias:"rels" description:"List releases"`
	UploadRelease  UploadReleaseOpts  `command:"upload-release"  alias:"ur"              description:"Upload release"`
	ExportRelease  ExportReleaseOpts  `command:"export-release"  alias:"expr"            description:"Export the compiled release to a tarball"`
	InspectRelease InspectReleaseOpts `` /* 136-byte string literal not displayed */
	DeleteRelease  DeleteReleaseOpts  `command:"delete-release"  alias:"delr"            description:"Delete release"`

	// Errands
	Errands   ErrandsOpts   `command:"errands"    alias:"es" alias:"errs" description:"List errands"`
	RunErrand RunErrandOpts `command:"run-errand" alias:"re"              description:"Run errand"`

	// Disks
	Disks      DisksOpts      `command:"disks"       description:"List disks"`
	DeleteDisk DeleteDiskOpts `command:"delete-disk" description:"Delete disk"`

	// Snapshots
	Snapshots       SnapshotsOpts       `command:"snapshots"        alias:"snaps"    description:"List snapshots"`
	TakeSnapshot    TakeSnapshotOpts    `command:"take-snapshot"    alias:"tsnap"    description:"Take snapshot"`
	DeleteSnapshot  DeleteSnapshotOpts  `command:"delete-snapshot"  alias:"delsnap"  description:"Delete snapshot"`
	DeleteSnapshots DeleteSnapshotsOpts `command:"delete-snapshots" alias:"delsnaps" description:"Delete all snapshots in a deployment"`

	// Instances
	Instances          InstancesOpts          `command:"instances"       alias:"is" alias:"ins"         description:"List all instances in a deployment"`
	VMs                VMsOpts                `command:"vms"                                            description:"List all VMs in all deployments"`
	UpdateResurrection UpdateResurrectionOpts `command:"update-resurrection"                            description:"Enable/disable resurrection"`
	Ignore             IgnoreOpts             `command:"ignore"                                         description:"Ignore an instance"`
	Unignore           UnignoreOpts           `command:"unignore"                                       description:"Unignore an instance"`
	CloudCheck         CloudCheckOpts         `command:"cloud-check"     alias:"cck" alias:"cloudcheck" description:"Cloud consistency check and interactive repair"`

	// Instance management
	Logs     LogsOpts     `command:"logs"     description:"Fetch logs from instance(s)"`
	Start    StartOpts    `command:"start"    description:"Start instance(s)"`
	Stop     StopOpts     `command:"stop"     description:"Stop instance(s)"`
	Restart  RestartOpts  `command:"restart"  description:"Restart instance(s)"`
	Recreate RecreateOpts `command:"recreate" description:"Recreate instance(s)"`
	DeleteVM DeleteVMOpts `command:"delete-vm" description:"Delete VM"`

	// SSH instance
	SSH SSHOpts `command:"ssh" description:"SSH into instance(s)"`
	SCP SCPOpts `command:"scp" description:"SCP to/from instance(s)"`

	// Release creation
	InitRelease     InitReleaseOpts     `command:"init-release"                  description:"Initialize release"`
	ResetRelease    ResetReleaseOpts    `command:"reset-release"                 description:"Reset release"`
	GenerateJob     GenerateJobOpts     `command:"generate-job"                  description:"Generate job"`
	GeneratePackage GeneratePackageOpts `command:"generate-package"              description:"Generate package"`
	CreateRelease   CreateReleaseOpts   `command:"create-release"   alias:"cr"   description:"Create release"`
	// Hidden
	Sha2ifyRelease  Sha2ifyReleaseOpts  `command:"sha2ify-release" hidden:"true" description:"Convert a sha128 release tarball to sha256"`
	FinalizeRelease FinalizeReleaseOpts `command:"finalize-release" alias:"finr" description:"Create final release from dev release tarball"`

	// Blob management
	Blobs       BlobsOpts       `command:"blobs"        description:"List blobs"`
	AddBlob     AddBlobOpts     `command:"add-blob"     description:"Add blob"`
	RemoveBlob  RemoveBlobOpts  `command:"remove-blob"  description:"Remove blob"`
	SyncBlobs   SyncBlobsOpts   `command:"sync-blobs"   description:"Sync blobs"`
	UploadBlobs UploadBlobsOpts `command:"upload-blobs" description:"Upload blobs"`

	Variables VariablesOpts `command:"variables" alias:"vars" description:"List variables"`
}

type CACertArg added in v0.0.120

type CACertArg struct {
	FS boshsys.FileSystem

	Content string
}

func (*CACertArg) UnmarshalFlag added in v0.0.120

func (a *CACertArg) UnmarshalFlag(data string) error

type CPIConfigCmd added in v0.0.105

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

func NewCPIConfigCmd added in v0.0.105

func NewCPIConfigCmd(ui boshui.UI, director boshdir.Director) CPIConfigCmd

func (CPIConfigCmd) Run added in v0.0.105

func (c CPIConfigCmd) Run() error

type CPIConfigOpts added in v0.0.105

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

func (CPIConfigOpts) Execute added in v0.0.105

func (c CPIConfigOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type CancelTaskCmd

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

func NewCancelTaskCmd

func NewCancelTaskCmd(director boshdir.Director) CancelTaskCmd

func (CancelTaskCmd) Run

func (c CancelTaskCmd) Run(opts CancelTaskOpts) error

type CancelTaskOpts

type CancelTaskOpts struct {
	Args TaskArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (CancelTaskOpts) Execute

func (c CancelTaskOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type CleanUpCmd

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

func NewCleanUpCmd

func NewCleanUpCmd(ui boshui.UI, director boshdir.Director) CleanUpCmd

func (CleanUpCmd) Run

func (c CleanUpCmd) Run(opts CleanUpOpts) error

type CleanUpOpts

type CleanUpOpts struct {
	All bool `long:"all" description:"Remove all unused releases, stemcells, etc.; otherwise most recent resources will be kept"`
	// contains filtered or unexported fields
}

func (CleanUpOpts) Execute

func (c CleanUpOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type CloudCheckCmd

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

func NewCloudCheckCmd

func NewCloudCheckCmd(deployment boshdir.Deployment, ui boshui.UI) CloudCheckCmd

func (CloudCheckCmd) Run

func (c CloudCheckCmd) Run(opts CloudCheckOpts) error

type CloudCheckOpts

type CloudCheckOpts struct {
	Auto   bool `long:"auto"   short:"a" description:"Resolve problems automatically"`
	Report bool `long:"report" short:"r" description:"Only generate report; don't attempt to resolve problems"`
	// contains filtered or unexported fields
}

func (CloudCheckOpts) Execute

func (c CloudCheckOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type CloudConfigCmd

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

func NewCloudConfigCmd

func NewCloudConfigCmd(ui boshui.UI, director boshdir.Director) CloudConfigCmd

func (CloudConfigCmd) Run

func (c CloudConfigCmd) Run() error

type CloudConfigOpts

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

Cloud config

func (CloudConfigOpts) Execute

func (c CloudConfigOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type Cmd

type Cmd struct {
	BoshOpts BoshOpts
	Opts     interface{}
	// contains filtered or unexported fields
}

func NewCmd

func NewCmd(boshOpts BoshOpts, opts interface{}, deps BasicDeps) Cmd

func (Cmd) Execute

func (c Cmd) Execute() (cmdErr error)

type ColumnOpt

type ColumnOpt struct {
	table.Header
}

func (*ColumnOpt) UnmarshalFlag

func (a *ColumnOpt) UnmarshalFlag(arg string) error

type CreateEnvArgs

type CreateEnvArgs struct {
	Manifest FileBytesWithPathArg `positional-arg-name:"PATH" description:"Path to a manifest file"`
}

type CreateEnvCmd

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

func NewCreateEnvCmd

func NewCreateEnvCmd(ui boshui.UI, envProvider func(string, string, boshtpl.Variables, patch.Op) DeploymentPreparer) *CreateEnvCmd

func (*CreateEnvCmd) Run

func (c *CreateEnvCmd) Run(stage boshui.Stage, opts CreateEnvOpts) error

type CreateEnvOpts

type CreateEnvOpts struct {
	Args CreateEnvArgs `positional-args:"true" required:"true"`
	VarFlags
	OpsFlags
	StatePath string `long:"state" value-name:"PATH" description:"State file path"`
	// contains filtered or unexported fields
}

Original bosh-init

func (CreateEnvOpts) Execute

func (c CreateEnvOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type CreateReleaseArgs

type CreateReleaseArgs struct {
	Manifest FileBytesWithPathArg `positional-arg-name:"PATH"`
}

type CreateReleaseCmd

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

func NewCreateReleaseCmd

func NewCreateReleaseCmd(
	releaseDirFactory func(DirOrCWDArg) (boshrel.Reader, boshreldir.ReleaseDir),
	releaseWriter boshrel.Writer,
	fs boshsys.FileSystem,
	ui boshui.UI,
) CreateReleaseCmd

func (CreateReleaseCmd) Run

type CreateReleaseOpts

type CreateReleaseOpts struct {
	Args CreateReleaseArgs `positional-args:"true"`

	Directory DirOrCWDArg `long:"dir" description:"Release directory path if not current working directory" default:"."`

	Name             string     `long:"name"               description:"Custom release name"`
	Version          VersionArg `long:"version"            description:"Custom release version (e.g.: 1.0.0, 1.0-beta.2+dev.10)"`
	TimestampVersion bool       `long:"timestamp-version"  description:"Create release with the timestamp as the dev version (e.g.: 1+dev.TIMESTAMP)"`

	Final   bool    `long:"final"   description:"Make it a final release"`
	Tarball FileArg `long:"tarball" description:"Create release tarball at path (e.g. /tmp/release.tgz)"`
	Force   bool    `long:"force"   description:"Ignore Git dirty state check"`
	// contains filtered or unexported fields
}

func (CreateReleaseOpts) Execute

func (c CreateReleaseOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteCmd

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

func NewDeleteCmd

func NewDeleteCmd(ui boshui.UI, envProvider func(string, string, boshtpl.Variables, patch.Op) DeploymentDeleter) *DeleteCmd

func (*DeleteCmd) Run

func (c *DeleteCmd) Run(stage boshui.Stage, opts DeleteEnvOpts) error

type DeleteDeploymentCmd

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

func NewDeleteDeploymentCmd

func NewDeleteDeploymentCmd(ui boshui.UI, deployment boshdir.Deployment) DeleteDeploymentCmd

func (DeleteDeploymentCmd) Run

type DeleteDeploymentOpts

type DeleteDeploymentOpts struct {
	Force bool `long:"force" description:"Ignore errors"`
	// contains filtered or unexported fields
}

func (DeleteDeploymentOpts) Execute

func (c DeleteDeploymentOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteDiskArgs

type DeleteDiskArgs struct {
	CID string `positional-arg-name:"CID"`
}

type DeleteDiskCmd

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

func NewDeleteDiskCmd

func NewDeleteDiskCmd(ui boshui.UI, director boshdir.Director) DeleteDiskCmd

func (DeleteDiskCmd) Run

func (c DeleteDiskCmd) Run(opts DeleteDiskOpts) error

type DeleteDiskOpts

type DeleteDiskOpts struct {
	Args DeleteDiskArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteDiskOpts) Execute

func (c DeleteDiskOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteEnvArgs

type DeleteEnvArgs struct {
	Manifest FileBytesWithPathArg `positional-arg-name:"PATH" description:"Path to a manifest file"`
}

type DeleteEnvOpts

type DeleteEnvOpts struct {
	Args DeleteEnvArgs `positional-args:"true" required:"true"`
	VarFlags
	OpsFlags
	StatePath string `long:"state" value-name:"PATH" description:"State file path"`
	// contains filtered or unexported fields
}

func (DeleteEnvOpts) Execute

func (c DeleteEnvOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteReleaseArgs

type DeleteReleaseArgs struct {
	Slug boshdir.ReleaseOrSeriesSlug `positional-arg-name:"NAME[/VERSION]"`
}

type DeleteReleaseCmd

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

func NewDeleteReleaseCmd

func NewDeleteReleaseCmd(ui boshui.UI, director boshdir.Director) DeleteReleaseCmd

func (DeleteReleaseCmd) Run

type DeleteReleaseOpts

type DeleteReleaseOpts struct {
	Args DeleteReleaseArgs `positional-args:"true" required:"true"`

	Force bool `long:"force" description:"Ignore errors"`
	// contains filtered or unexported fields
}

func (DeleteReleaseOpts) Execute

func (c DeleteReleaseOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteSnapshotArgs

type DeleteSnapshotArgs struct {
	CID string `positional-arg-name:"CID"`
}

type DeleteSnapshotCmd

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

func NewDeleteSnapshotCmd

func NewDeleteSnapshotCmd(ui boshui.UI, deployment boshdir.Deployment) DeleteSnapshotCmd

func (DeleteSnapshotCmd) Run

type DeleteSnapshotOpts

type DeleteSnapshotOpts struct {
	Args DeleteSnapshotArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteSnapshotOpts) Execute

func (c DeleteSnapshotOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteSnapshotsCmd

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

func NewDeleteSnapshotsCmd

func NewDeleteSnapshotsCmd(ui boshui.UI, deployment boshdir.Deployment) DeleteSnapshotsCmd

func (DeleteSnapshotsCmd) Run

func (c DeleteSnapshotsCmd) Run() error

type DeleteSnapshotsOpts

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

func (DeleteSnapshotsOpts) Execute

func (c DeleteSnapshotsOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteStemcellArgs

type DeleteStemcellArgs struct {
	Slug boshdir.StemcellSlug `positional-arg-name:"NAME/VERSION"`
}

type DeleteStemcellCmd

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

func NewDeleteStemcellCmd

func NewDeleteStemcellCmd(ui boshui.UI, director boshdir.Director) DeleteStemcellCmd

func (DeleteStemcellCmd) Run

type DeleteStemcellOpts

type DeleteStemcellOpts struct {
	Args DeleteStemcellArgs `positional-args:"true" required:"true"`

	Force bool `long:"force" description:"Ignore errors"`
	// contains filtered or unexported fields
}

func (DeleteStemcellOpts) Execute

func (c DeleteStemcellOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeleteVMArgs added in v0.0.95

type DeleteVMArgs struct {
	CID string `positional-arg-name:"CID"`
}

type DeleteVMCmd added in v0.0.95

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

func NewDeleteVMCmd added in v0.0.95

func NewDeleteVMCmd(ui boshui.UI, deployment boshdir.Deployment) DeleteVMCmd

func (DeleteVMCmd) Run added in v0.0.95

func (c DeleteVMCmd) Run(opts DeleteVMOpts) error

type DeleteVMOpts added in v0.0.95

type DeleteVMOpts struct {
	Args DeleteVMArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteVMOpts) Execute added in v0.0.95

func (c DeleteVMOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeployArgs

type DeployArgs struct {
	Manifest FileBytesArg `positional-arg-name:"PATH" description:"Path to a manifest file"`
}

type DeployCmd

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

func NewDeployCmd

func NewDeployCmd(
	ui boshui.UI,
	deployment boshdir.Deployment,
	releaseUploader ReleaseUploader,
) DeployCmd

func (DeployCmd) Run

func (c DeployCmd) Run(opts DeployOpts) error

type DeployOpts

type DeployOpts struct {
	Args DeployArgs `positional-args:"true" required:"true"`

	VarFlags
	OpsFlags

	NoRedact bool `long:"no-redact" description:"Show non-redacted manifest diff"`

	Recreate  bool                `long:"recreate"                          description:"Recreate all VMs in deployment"`
	Fix       bool                `long:"fix"                               description:"Recreate unresponsive instances"`
	SkipDrain []boshdir.SkipDrain `` /* 151-byte string literal not displayed */

	Canaries    string `long:"canaries" description:"Override manifest values for canaries"`
	MaxInFlight string `long:"max-in-flight" description:"Override manifest values for max_in_flight"`

	DryRun bool `long:"dry-run" description:"Renders job templates without altering deployment"`
	// contains filtered or unexported fields
}

func (DeployOpts) Execute

func (c DeployOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeploymentCmd

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

func NewDeploymentCmd

func NewDeploymentCmd(
	sessionFactory func(cmdconf.Config) Session,
	config cmdconf.Config,
	ui biui.UI,
) DeploymentCmd

func (DeploymentCmd) Run

func (c DeploymentCmd) Run() error

type DeploymentDeleter

type DeploymentDeleter interface {
	DeleteDeployment(stage biui.Stage) (err error)
}

func NewDeploymentDeleter

func NewDeploymentDeleter(
	ui biui.UI,
	logTag string,
	logger boshlog.Logger,
	deploymentStateService biconfig.DeploymentStateService,
	releaseManager boshinst.ReleaseManager,
	cloudFactory bicloud.Factory,
	agentClientFactory bihttpagent.AgentClientFactory,
	blobstoreFactory biblobstore.Factory,
	deploymentManagerFactory bidepl.ManagerFactory,
	deploymentManifestPath string,
	deploymentVars boshtpl.Variables,
	deploymentOp patch.Op,
	cpiInstaller bicpirel.CpiInstaller,
	cpiUninstaller biinstall.Uninstaller,
	releaseFetcher boshinst.ReleaseFetcher,
	releaseSetAndInstallationManifestParser ReleaseSetAndInstallationManifestParser,
	tempRootConfigurator TempRootConfigurator,
	targetProvider biinstall.TargetProvider,
) DeploymentDeleter

type DeploymentManifestParser

type DeploymentManifestParser interface {
	GetDeploymentManifest(path string, vars boshtpl.Variables, op patch.Op, releaseSetManifest birelsetmanifest.Manifest, stage biui.Stage) (bideplmanifest.Manifest, string, error)
}

func NewDeploymentManifestParser

func NewDeploymentManifestParser(
	deploymentParser bideplmanifest.Parser,
	deploymentValidator bideplmanifest.Validator,
	releaseManager birel.Manager,
	templateFactory bidepltpl.DeploymentTemplateFactory) DeploymentManifestParser

type DeploymentOpts

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

Deployments

func (DeploymentOpts) Execute

func (c DeploymentOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeploymentPreparer

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

func NewDeploymentPreparer

func NewDeploymentPreparer(
	ui biui.UI,
	logger boshlog.Logger,
	logTag string,
	deploymentStateService biconfig.DeploymentStateService,
	legacyDeploymentStateMigrator biconfig.LegacyDeploymentStateMigrator,
	releaseManager boshinst.ReleaseManager,
	deploymentRecord bidepl.Record,
	cloudFactory bicloud.Factory,
	stemcellManagerFactory bistemcell.ManagerFactory,
	agentClientFactory bihttpagent.AgentClientFactory,
	vmManagerFactory bivm.ManagerFactory,
	blobstoreFactory biblobstore.Factory,
	deployer bidepl.Deployer,
	deploymentManifestPath string,
	deploymentVars boshtpl.Variables,
	deploymentOp patch.Op,
	cpiInstaller bicpirel.CpiInstaller,
	releaseFetcher boshinst.ReleaseFetcher,
	stemcellFetcher bistemcell.Fetcher,
	releaseSetAndInstallationManifestParser ReleaseSetAndInstallationManifestParser,
	deploymentManifestParser DeploymentManifestParser,
	tempRootConfigurator TempRootConfigurator,
	targetProvider biinstall.TargetProvider,
) DeploymentPreparer

func (*DeploymentPreparer) PrepareDeployment

func (c *DeploymentPreparer) PrepareDeployment(stage biui.Stage) (err error)

type DeploymentsCmd

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

func NewDeploymentsCmd

func NewDeploymentsCmd(ui biui.UI, director boshdir.Director) DeploymentsCmd

func (DeploymentsCmd) Run

func (c DeploymentsCmd) Run() error

type DeploymentsOpts

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

func (DeploymentsOpts) Execute

func (c DeploymentsOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type DeploymentsTable

type DeploymentsTable struct {
	Deployments []boshdir.Deployment
	UI          boshui.UI
}

func (DeploymentsTable) Print

func (t DeploymentsTable) Print() error

type DirOrCWDArg

type DirOrCWDArg struct {
	Path string
}

func (*DirOrCWDArg) UnmarshalFlag

func (a *DirOrCWDArg) UnmarshalFlag(data string) error

type DisksCmd

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

func NewDisksCmd

func NewDisksCmd(ui boshui.UI, director boshdir.Director) DisksCmd

func (DisksCmd) Run

func (c DisksCmd) Run(opts DisksOpts) error

type DisksOpts

type DisksOpts struct {
	Orphaned bool `long:"orphaned" short:"o" description:"List orphaned disks"`
	// contains filtered or unexported fields
}

Disks

func (DisksOpts) Execute

func (c DisksOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type Downloader

type Downloader interface {
	Download(blobstoreID, sha1, prefix, dstDirPath string) error
}

type EnvironmentCmd

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

func NewEnvironmentCmd

func NewEnvironmentCmd(ui boshui.UI, director boshdir.Director) EnvironmentCmd

func (EnvironmentCmd) Run

func (c EnvironmentCmd) Run() error

type EnvironmentOpts

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

Environment

func (EnvironmentOpts) Execute

func (c EnvironmentOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type EnvironmentsCmd

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

func NewEnvironmentsCmd

func NewEnvironmentsCmd(config cmdconf.Config, ui boshui.UI) EnvironmentsCmd

func (EnvironmentsCmd) Run

func (c EnvironmentsCmd) Run() error

type EnvironmentsOpts

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

func (EnvironmentsOpts) Execute

func (c EnvironmentsOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type ErrandsCmd

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

func NewErrandsCmd

func NewErrandsCmd(ui boshui.UI, deployment boshdir.Deployment) ErrandsCmd

func (ErrandsCmd) Run

func (c ErrandsCmd) Run() error

type ErrandsOpts

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

Errands

func (ErrandsOpts) Execute

func (c ErrandsOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type EventArgs

type EventArgs struct {
	ID string `positional-arg-name:"ID"`
}

type EventCmd

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

func NewEventCmd

func NewEventCmd(ui boshui.UI, director boshdir.Director) EventCmd

func (EventCmd) Run

func (c EventCmd) Run(opts EventOpts) error

type EventContextSorting

type EventContextSorting []string

func (EventContextSorting) Len

func (s EventContextSorting) Len() int

func (EventContextSorting) Less

func (s EventContextSorting) Less(i, j int) bool

func (EventContextSorting) Swap

func (s EventContextSorting) Swap(i, j int)

type EventOpts

type EventOpts struct {
	Args EventArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (EventOpts) Execute

func (c EventOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type EventTable

type EventTable struct {
	Event boshdir.Event
	UI    boshui.UI
}

func (EventTable) Print

func (t EventTable) Print()

type EventsCmd

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

func NewEventsCmd

func NewEventsCmd(ui boshui.UI, director boshdir.Director) EventsCmd

func (EventsCmd) Run

func (c EventsCmd) Run(opts EventsOpts) error

type EventsOpts

type EventsOpts struct {
	BeforeID   string `long:"before-id"    description:"Show events with ID less than the given ID"`
	Before     string `long:"before"       description:"Show events before the given timestamp (ex: 2016-05-08 17:26:32)"`
	After      string `long:"after"        description:"Show events after the given timestamp (ex: 2016-05-08 17:26:32)"`
	Deployment string
	Task       string `long:"task"         description:"Show events with the given task ID"`
	Instance   string `long:"instance"     description:"Show events with given instance"`
	User       string `long:"event-user"   description:"Show events with given user"`
	Action     string `long:"action"       description:"Show events with given action"`
	ObjectType string `long:"object-type"  description:"Show events with given object type"`
	ObjectName string `long:"object-id"    description:"Show events with given object ID"`
	// contains filtered or unexported fields
}

Events

func (EventsOpts) Execute

func (c EventsOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type ExportReleaseArgs

type ExportReleaseArgs struct {
	ReleaseSlug   boshdir.ReleaseSlug   `positional-arg-name:"NAME/VERSION"`
	OSVersionSlug boshdir.OSVersionSlug `positional-arg-name:"OS/VERSION"`
}

type ExportReleaseCmd

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

func NewExportReleaseCmd

func NewExportReleaseCmd(deployment boshdir.Deployment, downloader Downloader) ExportReleaseCmd

func (ExportReleaseCmd) Run

type ExportReleaseOpts

type ExportReleaseOpts struct {
	Args ExportReleaseArgs `positional-args:"true" required:"true"`

	Directory DirOrCWDArg `long:"dir" description:"Destination directory" default:"."`
	// contains filtered or unexported fields
}

func (ExportReleaseOpts) Execute

func (c ExportReleaseOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type Factory

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

func NewFactory

func NewFactory(deps BasicDeps) Factory

func (Factory) New

func (f Factory) New(args []string) (Cmd, error)

type FileArg

type FileArg struct {
	ExpandedPath string
	FS           boshsys.FileSystem
}

func (*FileArg) UnmarshalFlag

func (a *FileArg) UnmarshalFlag(data string) error

type FileBytesArg

type FileBytesArg struct {
	FS boshsys.FileSystem

	Bytes []byte
}

func (*FileBytesArg) UnmarshalFlag

func (a *FileBytesArg) UnmarshalFlag(data string) error

type FileBytesWithPathArg added in v0.0.94

type FileBytesWithPathArg struct {
	FS boshsys.FileSystem

	Bytes []byte
	Path  string
}

func (*FileBytesWithPathArg) UnmarshalFlag added in v0.0.94

func (a *FileBytesWithPathArg) UnmarshalFlag(data string) error

type FinalizeReleaseArgs

type FinalizeReleaseArgs struct {
	Path string `positional-arg-name:"PATH"`
}

type FinalizeReleaseCmd

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

func NewFinalizeReleaseCmd

func NewFinalizeReleaseCmd(
	releaseReader boshrel.Reader,
	releaseDir boshreldir.ReleaseDir,
	ui boshui.UI,
) FinalizeReleaseCmd

func (FinalizeReleaseCmd) Run

type FinalizeReleaseOpts

type FinalizeReleaseOpts struct {
	Args FinalizeReleaseArgs `positional-args:"true" required:"true"`

	Directory DirOrCWDArg `long:"dir" description:"Release directory path if not current working directory" default:"."`

	Name    string     `long:"name"    description:"Custom release name"`
	Version VersionArg `long:"version" description:"Custom release version (e.g.: 1.0.0, 1.0-beta.2+dev.10)"`

	Force bool `long:"force" description:"Ignore Git dirty state check"`
	// contains filtered or unexported fields
}

func (FinalizeReleaseOpts) Execute

func (c FinalizeReleaseOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type GatewayFlags

type GatewayFlags struct {
	UUIDGen boshuuid.Generator

	Disable bool `long:"gw-disable" description:"Disable usage of gateway connection" env:"BOSH_GW_DISABLE"`

	Username       string `long:"gw-user"        description:"Username for gateway connection" env:"BOSH_GW_USER"`
	Host           string `long:"gw-host"        description:"Host for gateway connection" env:"BOSH_GW_HOST"`
	PrivateKeyPath string `long:"gw-private-key" description:"Private key path for gateway connection" env:"BOSH_GW_PRIVATE_KEY"` // todo private file?

	SOCKS5Proxy string `long:"gw-socks5" description:"SOCKS5 URL" env:"BOSH_ALL_PROXY"`
}

func (GatewayFlags) AsSSHOpts added in v0.0.146

type GenerateJobArgs

type GenerateJobArgs struct {
	Name string `positional-arg-name:"NAME"`
}

type GenerateJobCmd

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

func NewGenerateJobCmd

func NewGenerateJobCmd(releaseDir boshreldir.ReleaseDir) GenerateJobCmd

func (GenerateJobCmd) Run

func (c GenerateJobCmd) Run(opts GenerateJobOpts) error

type GenerateJobOpts

type GenerateJobOpts struct {
	Args GenerateJobArgs `positional-args:"true" required:"true"`

	Directory DirOrCWDArg `long:"dir" description:"Release directory path if not current working directory" default:"."`
	// contains filtered or unexported fields
}

func (GenerateJobOpts) Execute

func (c GenerateJobOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type GeneratePackageArgs

type GeneratePackageArgs struct {
	Name string `positional-arg-name:"NAME"`
}

type GeneratePackageCmd

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

func NewGeneratePackageCmd

func NewGeneratePackageCmd(releaseDir boshreldir.ReleaseDir) GeneratePackageCmd

func (GeneratePackageCmd) Run

type GeneratePackageOpts

type GeneratePackageOpts struct {
	Args GeneratePackageArgs `positional-args:"true" required:"true"`

	Directory DirOrCWDArg `long:"dir" description:"Release directory path if not current working directory" default:"."`
	// contains filtered or unexported fields
}

func (GeneratePackageOpts) Execute

func (c GeneratePackageOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type HelpOpts added in v0.0.97

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

func (HelpOpts) Execute added in v0.0.97

func (c HelpOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type IgnoreCmd added in v0.0.101

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

func NewIgnoreCmd added in v0.0.101

func NewIgnoreCmd(deployment boshdir.Deployment) IgnoreCmd

func (IgnoreCmd) Run added in v0.0.101

func (cmd IgnoreCmd) Run(opts IgnoreOpts) error

type IgnoreOpts added in v0.0.101

type IgnoreOpts struct {
	Args InstanceSlugArgs `positional-args:"true" required:"true"`
	// contains filtered or unexported fields
}

func (IgnoreOpts) Execute added in v0.0.101

func (c IgnoreOpts) Execute(_ []string) error

Execute is necessary for each command to be goflags.Commander

type InfoFeatureSorting

type InfoFeatureSorting []string

func (InfoFeatureSorting) Len

func (s InfoFeatureSorting) Len() int

func (InfoFeatureSorting) Less

func (s InfoFeatureSorting) Less(i, j