From 09582d53064aa637f056daa066342127e4e0f763 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 4 Dec 2017 11:58:55 +0100 Subject: syz-manager: send public web addr to dashboard --- pkg/gce/gce.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pkg/gce') diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go index e8ad084e6..d449d87ba 100644 --- a/pkg/gce/gce.go +++ b/pkg/gce/gce.go @@ -30,6 +30,7 @@ type Context struct { ZoneID string Instance string InternalIP string + ExternalIP string computeService *compute.Service @@ -73,7 +74,11 @@ func NewContext() (*Context, error) { for _, iface := range inst.NetworkInterfaces { if strings.HasPrefix(iface.NetworkIP, "10.") { ctx.InternalIP = iface.NetworkIP - break + } + for _, ac := range iface.AccessConfigs { + if ac.NatIP != "" { + ctx.ExternalIP = ac.NatIP + } } } if ctx.InternalIP == "" { -- cgit mrf-deployment