From bbd3aaaf3011f0e8ac6dac9f01fc4f3ba9a587f2 Mon Sep 17 00:00:00 2001 From: Matt DeBoer Date: Wed, 22 Mar 2017 09:00:16 -0700 Subject: [PATCH] fail on any config parsing error --- pkg/platform/vsphere/vsphere.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/platform/vsphere/vsphere.go b/pkg/platform/vsphere/vsphere.go index 67c8e35..f96a506 100644 --- a/pkg/platform/vsphere/vsphere.go +++ b/pkg/platform/vsphere/vsphere.go @@ -73,13 +73,17 @@ type VSphereConfig struct { // PublicNetwork is name of the network the VMs are joined to. PublicNetwork string `gcfg:"public-network"` } + Disk struct { + // SCSIControllerType defines SCSI controller to be used. + SCSIControllerType string `dcfg:"scsicontrollertype"` + } } func init() { platform.Register("vsphere", func(config io.Reader) (platform.Platform, error) { cfg, err := readConfig(config) - if err != nil && !strings.Contains(err.Error(), "warnings") { - log.Fatal("Failed reading config: ", err) + if err != nil { + return nil, err } return newVSphere(cfg) })