Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ var (
// All registred machines
machines map[string]InitFunc

ErrNotSupported = errors.New("machine not supported")
ErrNotSupported = errors.New("driver not supported")
ErrMachineNotExist = errors.New("machine not exist")
ErrMachineExist = errors.New("machine already exists")
ErrPrerequisites = errors.New("prerequisites for machine not satisfied (hypervisor installed?)")
)

Expand Down
4 changes: 2 additions & 2 deletions virtualbox/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func GetMachine(id string) (*Machine, error) {
stdout, stderr, err := vbmOutErr("showvminfo", id, "--machinereadable")
if err != nil {
if reMachineNotFound.FindString(stderr) != "" {
return nil, ErrMachineNotExist
return nil, driver.ErrMachineNotExist
}
return nil, err
}
Expand Down Expand Up @@ -443,7 +443,7 @@ func CreateMachine(mc *driver.MachineConfig) (*Machine, error) {
}
for _, m := range machineNames {
if m == mc.VM {
return nil, ErrMachineExist
return nil, driver.ErrMachineExist
}
}

Expand Down
4 changes: 1 addition & 3 deletions virtualbox/vbm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ var (
)

var (
ErrMachineExist = errors.New("machine already exists")
ErrMachineNotExist = errors.New("machine does not exist")
ErrVBMNotFound = errors.New("VBoxManage not found")
ErrVBMNotFound = errors.New("VBoxManage not found")
)

func vbm(args ...string) error {
Expand Down