From aca09d1cc721168b7996f622240ae4b11c8aa236 Mon Sep 17 00:00:00 2001 From: Dave Cunningham Date: Wed, 10 Jun 2015 00:14:13 -0400 Subject: [PATCH] Add beta compute client --- config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config.go b/config.go index 25348bbf..0640690e 100644 --- a/config.go +++ b/config.go @@ -14,6 +14,7 @@ import ( "golang.org/x/oauth2/google" "golang.org/x/oauth2/jwt" "google.golang.org/api/compute/v1" + computeBeta "google.golang.org/api/compute/v0.beta" "google.golang.org/api/dns/v1" "google.golang.org/api/storage/v1" ) @@ -26,6 +27,7 @@ type Config struct { Region string clientCompute *compute.Service + clientComputeBeta *computeBeta.Service clientDns *dns.Service clientStorage *storage.Service } @@ -110,6 +112,13 @@ func (c *Config) loadAndValidate() error { } c.clientCompute.UserAgent = userAgent + log.Printf("[INFO] Instantiating Beta GCE client...") + c.clientComputeBeta, err = computeBeta.New(client) + if err != nil { + return err + } + c.clientComputeBeta.UserAgent = userAgent + log.Printf("[INFO] Instantiating Google Cloud DNS client...") c.clientDns, err = dns.New(client) if err != nil {