diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-12-04 11:58:55 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-12-04 11:58:55 +0100 |
| commit | 09582d53064aa637f056daa066342127e4e0f763 (patch) | |
| tree | 7ec55604a6bb1e3574978614f00b82a1401cdedf /pkg/gce | |
| parent | 9118cb4ae262a67fa4a87c24adc3acebf8d1084f (diff) | |
syz-manager: send public web addr to dashboard
Diffstat (limited to 'pkg/gce')
| -rw-r--r-- | pkg/gce/gce.go | 7 |
1 files changed, 6 insertions, 1 deletions
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 == "" { |
