diff --git a/package_stemcell/factory/packager_factory.go b/package_stemcell/factory/packager_factory.go index a7df1187..83095c4b 100644 --- a/package_stemcell/factory/packager_factory.go +++ b/package_stemcell/factory/packager_factory.go @@ -23,10 +23,21 @@ func (f *PackagerFactory) Packager(sourceConfig config.SourceConfig, outputConfi switch source { case config.VCENTER: - runner := &iaas_cli.GovcRunner{} - client := iaas_clients.NewVcenterClient(sourceConfig.Username, sourceConfig.Password, sourceConfig.URL, sourceConfig.CaCertFile, runner) - vCenterPackager := &packagers.VCenterPackager{SourceConfig: sourceConfig, OutputConfig: outputConfig, Client: client} - return vCenterPackager, nil + client := + iaas_clients.NewVcenterClient( + sourceConfig.Username, + sourceConfig.Password, + sourceConfig.URL, + sourceConfig.CaCertFile, + &iaas_cli.GovcRunner{}, + ) + + return &packagers.VCenterPackager{ + SourceConfig: sourceConfig, + OutputConfig: outputConfig, + Client: client, + Logger: logger, + }, nil case config.VMDK: options := package_parameters.VmdkPackageParameters{} diff --git a/package_stemcell/packagers/vcenter_packager.go b/package_stemcell/packagers/vcenter_packager.go index 9d564ea1..feb73c17 100644 --- a/package_stemcell/packagers/vcenter_packager.go +++ b/package_stemcell/packagers/vcenter_packager.go @@ -8,6 +8,7 @@ import ( "path/filepath" "regexp" + "github.com/cloudfoundry/stembuild/colorlogger" "github.com/cloudfoundry/stembuild/filesystem" "github.com/cloudfoundry/stembuild/package_stemcell/config" ) @@ -27,6 +28,7 @@ type VCenterPackager struct { SourceConfig config.SourceConfig OutputConfig config.OutputConfig Client IaasClient + Logger colorlogger.Logger } func (v VCenterPackager) Package() error {