Skip to content

Commit

Permalink
Remove unused with-manifest flag variable from deployment backup-cleanup
Browse files Browse the repository at this point in the history
[#161777587]
  • Loading branch information
Josh Hill committed Nov 7, 2018
1 parent e59c9e0 commit 4348d65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions cli/command/deployment_backup_cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func (d DeploymentBackupCleanupCommand) Action(c *cli.Context) error {
trapSigint(true)

username, password, target, caCert, debug, deployment, allDeployments := getDeploymentParams(c)
withManifest := c.Bool("with-manifest")

if !allDeployments {
logger := factory.BuildBoshLogger(debug)
Expand All @@ -40,7 +39,6 @@ func (d DeploymentBackupCleanupCommand) Action(c *cli.Context) error {
username,
password,
caCert,
withManifest,
logger,
)
if err != nil {
Expand All @@ -51,18 +49,17 @@ func (d DeploymentBackupCleanupCommand) Action(c *cli.Context) error {
return processError(cleanupErr)
}

return cleanupAllDeployments(target, username, password, caCert, withManifest, debug)
return cleanupAllDeployments(target, username, password, caCert, debug)

}
func cleanupAllDeployments(target, username, password, caCert string, withManifest, debug bool) error {
func cleanupAllDeployments(target, username, password, caCert string, debug bool) error {
cleanupAction := func(deploymentName string) orchestrator.Error {
logger, buffer := factory.BuildBoshLoggerWithCustomBuffer(debug)
cleaner, factoryError := factory.BuildDeploymentBackupCleanuper(
target,
username,
password,
caCert,
withManifest,
logger,
)

Expand Down
3 changes: 1 addition & 2 deletions factory/deployment_backup_cleanuper.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ func BuildDeploymentBackupCleanuper(
username string,
password string,
caCert string,
hasManifest bool,
logger logger.Logger,
) (*orchestrator.BackupCleaner, error) {

Expand All @@ -24,6 +23,6 @@ func BuildDeploymentBackupCleanuper(
}

return orchestrator.NewBackupCleaner(logger,
bosh.NewDeploymentManager(boshClient, logger, hasManifest), orderer.NewKahnBackupLockOrderer(),
bosh.NewDeploymentManager(boshClient, logger, false), orderer.NewKahnBackupLockOrderer(),
executor.NewParallelExecutor()), nil
}

0 comments on commit 4348d65

Please sign in to comment.