aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gcs
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-06-03 11:48:19 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-06-03 11:48:19 +0200
commitb68d01eea0c45f14b6bd9b54485b7f7e287d008e (patch)
tree2fba436d78ef3cf20e9e75dbfa75d0c48d0b3f67 /pkg/gcs
parentaf643baa328ae3d4b7076054bba648c4b8bf8056 (diff)
vm/gce: accept local image
Currently gce accepts precreated GCE image name as image config param, while all other VM types accept local file path as image. This makes it impossible to write generic code that works with all VM types, i.e. after building a new image it's unclear if it needs to be uploaded to GCE or not, and what needs to be passed as image in config. Eliminate this difference by making gce accept local image file as well.
Diffstat (limited to 'pkg/gcs')
-rw-r--r--pkg/gcs/gcs.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gcs/gcs.go b/pkg/gcs/gcs.go
index ac95ec420..0ac9fc455 100644
--- a/pkg/gcs/gcs.go
+++ b/pkg/gcs/gcs.go
@@ -49,6 +49,10 @@ func NewClient() (*Client, error) {
return client, nil
}
+func (client *Client) Close() {
+ client.client.Close()
+}
+
func (client *Client) Read(gcsFile string) (*File, error) {
bucket, filename, err := split(gcsFile)
if err != nil {