From 4348d654a53af69a59e111dd3d153bf000a1e663 Mon Sep 17 00:00:00 2001 From: Josh Hill Date: Wed, 7 Nov 2018 15:56:32 +0000 Subject: [PATCH] Remove unused with-manifest flag variable from deployment backup-cleanup [#161777587] --- cli/command/deployment_backup_cleanup.go | 7 ++----- factory/deployment_backup_cleanuper.go | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cli/command/deployment_backup_cleanup.go b/cli/command/deployment_backup_cleanup.go index daefd25c2..ae71a8078 100644 --- a/cli/command/deployment_backup_cleanup.go +++ b/cli/command/deployment_backup_cleanup.go @@ -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) @@ -40,7 +39,6 @@ func (d DeploymentBackupCleanupCommand) Action(c *cli.Context) error { username, password, caCert, - withManifest, logger, ) if err != nil { @@ -51,10 +49,10 @@ 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( @@ -62,7 +60,6 @@ func cleanupAllDeployments(target, username, password, caCert string, withManife username, password, caCert, - withManifest, logger, ) diff --git a/factory/deployment_backup_cleanuper.go b/factory/deployment_backup_cleanuper.go index ef5af97f8..6f25ec06e 100644 --- a/factory/deployment_backup_cleanuper.go +++ b/factory/deployment_backup_cleanuper.go @@ -13,7 +13,6 @@ func BuildDeploymentBackupCleanuper( username string, password string, caCert string, - hasManifest bool, logger logger.Logger, ) (*orchestrator.BackupCleaner, error) { @@ -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 }