aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gce
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-11-26 12:47:39 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-11-26 13:28:57 +0100
commit1d2b823edd7b3936545a8b4d9901d53640334ee6 (patch)
tree3a6736b787965c6b3bb6c29fbb936679573c3d70 /pkg/gce
parent2f1cec6277878744f2f5484a1833fb91903515f2 (diff)
pkg/gce: enable DisplayDevice
Enabling DisplayDevice can give us some more coverage. Requires switching to v1 API which is a good idea anyway.
Diffstat (limited to 'pkg/gce')
-rw-r--r--pkg/gce/gce.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go
index c940bdeaf..79e4d4b35 100644
--- a/pkg/gce/gce.go
+++ b/pkg/gce/gce.go
@@ -8,7 +8,7 @@
// In particular, API reference:
// https://cloud.google.com/compute/docs/reference/latest
// and Go API wrappers:
-// https://godoc.org/google.golang.org/api/compute/v0.beta
+// https://godoc.org/google.golang.org/api/compute/v1
package gce
import (
@@ -22,7 +22,7 @@ import (
"golang.org/x/net/context"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
- "google.golang.org/api/compute/v0.beta"
+ "google.golang.org/api/compute/v1"
"google.golang.org/api/googleapi"
)
@@ -140,8 +140,10 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, pree
Preemptible: preemptible,
OnHostMaintenance: "TERMINATE",
},
+ DisplayDevice: &compute.DisplayDevice{
+ EnableDisplay: true,
+ },
}
-
retry:
if !instance.Scheduling.Preemptible && strings.HasPrefix(machineType, "e2-") {
// Otherwise we get "Error 400: Efficient instances do not support