Skip to content

Commit

Permalink
Move package_parameters.VmdkPackageParameters -> config.VmdkOptions
Browse files Browse the repository at this point in the history
- remove unused `VmdkPackageParameters.CopyFrom()` method
  • Loading branch information
aramprice committed Jul 24, 2024
1 parent 73560c6 commit b45d53c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 272 deletions.
8 changes: 8 additions & 0 deletions package_stemcell/config/vmdk_options.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package config

type VmdkOptions struct {
OSVersion string `yaml:"os_version"`
OutputDir string `yaml:"output_dir"`
Version string `yaml:"version"`
VMDKFile string `yaml:"vmdk_file"`
}
13 changes: 0 additions & 13 deletions package_stemcell/package_parameters/options_suite_test.go

This file was deleted.

25 changes: 0 additions & 25 deletions package_stemcell/package_parameters/vmdk_package_parameters.go

This file was deleted.

227 changes: 0 additions & 227 deletions package_stemcell/package_parameters/vmdk_package_parameters_test.go

This file was deleted.

3 changes: 1 addition & 2 deletions package_stemcell/packager/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/cloudfoundry/stembuild/iaas_cli"
"github.com/cloudfoundry/stembuild/iaas_cli/iaas_clients"
"github.com/cloudfoundry/stembuild/package_stemcell/config"
"github.com/cloudfoundry/stembuild/package_stemcell/package_parameters"
)

type Factory struct{}
Expand Down Expand Up @@ -39,7 +38,7 @@ func (f *Factory) NewPackager(sourceConfig config.SourceConfig, outputConfig con
}, nil
case config.VMDK:
options :=
package_parameters.VmdkPackageParameters{
config.VmdkOptions{
VMDKFile: sourceConfig.Vmdk,
OSVersion: strings.ToUpper(outputConfig.Os),
Version: outputConfig.StemcellVersion,
Expand Down
4 changes: 2 additions & 2 deletions package_stemcell/packager/vmdk_packager.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"github.com/cloudfoundry/stembuild/colorlogger"
"github.com/cloudfoundry/stembuild/filesystem"
"github.com/cloudfoundry/stembuild/package_stemcell/config"
"github.com/cloudfoundry/stembuild/package_stemcell/ovftool"
"github.com/cloudfoundry/stembuild/package_stemcell/package_parameters"
"github.com/cloudfoundry/stembuild/templates"
)

Expand All @@ -30,7 +30,7 @@ type VmdkPackager struct {
Sha1sum string
tmpdir string
Stop chan struct{}
BuildOptions package_parameters.VmdkPackageParameters
BuildOptions config.VmdkOptions
Logger colorlogger.Logger
}

Expand Down
6 changes: 3 additions & 3 deletions package_stemcell/packager/vmdk_packager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import (

"github.com/cloudfoundry/stembuild/colorlogger"
mockfilesystem "github.com/cloudfoundry/stembuild/filesystem/mock"
"github.com/cloudfoundry/stembuild/package_stemcell/package_parameters"
"github.com/cloudfoundry/stembuild/package_stemcell/config"
"github.com/cloudfoundry/stembuild/package_stemcell/packager"
"github.com/cloudfoundry/stembuild/test/helpers"
)

var _ = Describe("VmdkPackager", func() {
var stembuildConfig package_parameters.VmdkPackageParameters
var stembuildConfig config.VmdkOptions
var vmdkPackager packager.VmdkPackager

BeforeEach(func() {
stembuildConfig = package_parameters.VmdkPackageParameters{
stembuildConfig = config.VmdkOptions{
OSVersion: "2012R2",
Version: "1200.1",
}
Expand Down

0 comments on commit b45d53c

Please sign in to comment.