|
|
|
|
@ -9,19 +9,20 @@ import (
|
|
|
|
|
// DriverMock is a Driver implementation that is a mocked out so that
|
|
|
|
|
// it can be used for tests.
|
|
|
|
|
type DriverMock struct {
|
|
|
|
|
CreateImageName string
|
|
|
|
|
CreateImageDesc string
|
|
|
|
|
CreateImageFamily string
|
|
|
|
|
CreateImageEncryptionKey *compute.CustomerEncryptionKey
|
|
|
|
|
CreateImageLabels map[string]string
|
|
|
|
|
CreateImageLicenses []string
|
|
|
|
|
CreateImageZone string
|
|
|
|
|
CreateImageDisk string
|
|
|
|
|
CreateImageResultProjectId string
|
|
|
|
|
CreateImageResultSelfLink string
|
|
|
|
|
CreateImageResultSizeGb int64
|
|
|
|
|
CreateImageErrCh <-chan error
|
|
|
|
|
CreateImageResultCh <-chan *Image
|
|
|
|
|
CreateImageName string
|
|
|
|
|
CreateImageDesc string
|
|
|
|
|
CreateImageFamily string
|
|
|
|
|
CreateImageEncryptionKey *compute.CustomerEncryptionKey
|
|
|
|
|
CreateImageLabels map[string]string
|
|
|
|
|
CreateImageLicenses []string
|
|
|
|
|
CreateImageStorageLocations []string
|
|
|
|
|
CreateImageZone string
|
|
|
|
|
CreateImageDisk string
|
|
|
|
|
CreateImageResultProjectId string
|
|
|
|
|
CreateImageResultSelfLink string
|
|
|
|
|
CreateImageResultSizeGb int64
|
|
|
|
|
CreateImageErrCh <-chan error
|
|
|
|
|
CreateImageResultCh <-chan *Image
|
|
|
|
|
|
|
|
|
|
DeleteImageName string
|
|
|
|
|
DeleteImageErrCh <-chan error
|
|
|
|
|
@ -88,12 +89,13 @@ type DriverMock struct {
|
|
|
|
|
WaitForInstanceErrCh <-chan error
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (d *DriverMock) CreateImage(name, description, family, zone, disk string, image_labels map[string]string, image_licenses []string, image_encryption_key *compute.CustomerEncryptionKey) (<-chan *Image, <-chan error) {
|
|
|
|
|
func (d *DriverMock) CreateImage(name, description, family, zone, disk string, image_labels map[string]string, image_licenses []string, image_encryption_key *compute.CustomerEncryptionKey, imageStorageLocations []string) (<-chan *Image, <-chan error) {
|
|
|
|
|
d.CreateImageName = name
|
|
|
|
|
d.CreateImageDesc = description
|
|
|
|
|
d.CreateImageFamily = family
|
|
|
|
|
d.CreateImageLabels = image_labels
|
|
|
|
|
d.CreateImageLicenses = image_licenses
|
|
|
|
|
d.CreateImageStorageLocations = imageStorageLocations
|
|
|
|
|
d.CreateImageZone = zone
|
|
|
|
|
d.CreateImageDisk = disk
|
|
|
|
|
d.CreateImageEncryptionKey = image_encryption_key
|
|
|
|
|
|