Skip to content

Commit

Permalink
fail on any config parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-deboer committed Mar 22, 2017
1 parent f059a5b commit bbd3aaa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/platform/vsphere/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit bbd3aaa

Please sign in to comment.