Added vSphere machine driver

Signed-off-by: Fabio Rapposelli <frapposelli@vmware.com>
This commit is contained in:
Yang Yang
2014-12-04 17:23:57 +01:00
committed by Fabio Rapposelli
parent 92dd8e01d1
commit 1bad10773c
11 changed files with 961 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/*
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
*/
package errors
import "fmt"
type DatastoreError struct {
datastore string
operation string
reason string
}
func NewDatastoreError(datastore, operation, reason string) error {
err := DatastoreError{
datastore: datastore,
operation: operation,
reason: reason,
}
return &err
}
func (err *DatastoreError) Error() string {
return fmt.Sprintf("Unable to %s on datastore %s due to %s", err.operation, err.datastore, err.reason)
}