Commit 06144cf2 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

fmt

parent 98a52c29
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
// Artifact is the result of running the Qemu builder, namely a set // Artifact is the result of running the Qemu builder, namely a set
// of files associated with the resulting machine. // of files associated with the resulting machine.
type Artifact struct { type Artifact struct {
dir string dir string
f []string f []string
state map[string]interface{} state map[string]interface{}
} }
......
...@@ -500,8 +500,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe ...@@ -500,8 +500,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
} }
artifact := &Artifact{ artifact := &Artifact{
dir: b.config.OutputDir, dir: b.config.OutputDir,
f: files, f: files,
state: make(map[string]interface{}), state: make(map[string]interface{}),
} }
......
...@@ -27,9 +27,9 @@ func (s *stepCopyDisk) Run(state multistep.StateBag) multistep.StepAction { ...@@ -27,9 +27,9 @@ func (s *stepCopyDisk) Run(state multistep.StateBag) multistep.StepAction {
path, path,
} }
if config.DiskImage == false { if config.DiskImage == false {
return multistep.ActionContinue return multistep.ActionContinue
} }
ui.Say("Copying hard drive...") ui.Say("Copying hard drive...")
if err := driver.QemuImg(command...); err != nil { if err := driver.QemuImg(command...); err != nil {
......
...@@ -26,9 +26,9 @@ func (s *stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction { ...@@ -26,9 +26,9 @@ func (s *stepCreateDisk) Run(state multistep.StateBag) multistep.StepAction {
fmt.Sprintf("%vM", config.DiskSize), fmt.Sprintf("%vM", config.DiskSize),
} }
if config.DiskImage == true { if config.DiskImage == true {
return multistep.ActionContinue return multistep.ActionContinue
} }
ui.Say("Creating hard drive...") ui.Say("Creating hard drive...")
if err := driver.QemuImg(command...); err != nil { if err := driver.QemuImg(command...); err != nil {
......
...@@ -25,9 +25,9 @@ func (s *stepResizeDisk) Run(state multistep.StateBag) multistep.StepAction { ...@@ -25,9 +25,9 @@ func (s *stepResizeDisk) Run(state multistep.StateBag) multistep.StepAction {
fmt.Sprintf("%vM", config.DiskSize), fmt.Sprintf("%vM", config.DiskSize),
} }
if config.DiskImage == false { if config.DiskImage == false {
return multistep.ActionContinue return multistep.ActionContinue
} }
ui.Say("Resizing hard drive...") ui.Say("Resizing hard drive...")
if err := driver.QemuImg(command...); err != nil { if err := driver.QemuImg(command...); err != nil {
......
...@@ -29,7 +29,7 @@ func (p *LibVirtProvider) Process(ui packer.Ui, artifact packer.Artifact, dir st ...@@ -29,7 +29,7 @@ func (p *LibVirtProvider) Process(ui packer.Ui, artifact packer.Artifact, dir st
format := artifact.State("diskType").(string) format := artifact.State("diskType").(string)
origSize := artifact.State("diskSize").(uint64) origSize := artifact.State("diskSize").(uint64)
size := origSize / 1024 // In MB, want GB size := origSize / 1024 // In MB, want GB
if origSize % 1024 > 0 { if origSize%1024 > 0 {
// Make sure we don't make the size smaller // Make sure we don't make the size smaller
size++ size++
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment