Commit f9d1f7eb authored by Nick Sardo's avatar Nick Sardo

Pass certificate URLs instead of the certificate structs

parent 865321c2
...@@ -85,14 +85,10 @@ func (gce *GCECloud) SetUrlMapForTargetHttpsProxy(proxy *compute.TargetHttpsProx ...@@ -85,14 +85,10 @@ func (gce *GCECloud) SetUrlMapForTargetHttpsProxy(proxy *compute.TargetHttpsProx
} }
// SetSslCertificateForTargetHttpsProxy sets the given SslCertificate for the given TargetHttpsProxy. // SetSslCertificateForTargetHttpsProxy sets the given SslCertificate for the given TargetHttpsProxy.
func (gce *GCECloud) SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, sslCerts []*compute.SslCertificate) error { func (gce *GCECloud) SetSslCertificateForTargetHttpsProxy(proxy *compute.TargetHttpsProxy, sslCertURLs []string) error {
mc := newTargetProxyMetricContext("set_ssl_cert") mc := newTargetProxyMetricContext("set_ssl_cert")
var allCerts []string
for _, cert := range sslCerts {
allCerts = append(allCerts, cert.SelfLink)
}
req := &compute.TargetHttpsProxiesSetSslCertificatesRequest{ req := &compute.TargetHttpsProxiesSetSslCertificatesRequest{
SslCertificates: allCerts, SslCertificates: sslCertURLs,
} }
return mc.Observe(gce.c.TargetHttpsProxies().SetSslCertificates(context.Background(), meta.GlobalKey(proxy.Name), req)) return mc.Observe(gce.c.TargetHttpsProxies().SetSslCertificates(context.Background(), meta.GlobalKey(proxy.Name), req))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment