From 2514774707163761f4dbc569a017b957cc180e9e Mon Sep 17 00:00:00 2001 From: Bowei Du Date: Tue, 23 Jan 2018 00:21:42 -0800 Subject: [PATCH] Expose the generate stub for compute API This allows clients such as Ingress to begin migration to the newly generated stubs. --- pkg/cloudprovider/providers/gce/gce.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index b734a9b8d8e..eb2b76a013d 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -229,6 +229,11 @@ func (g *GCECloud) ComputeServices() *Services { return &Services{g.service, g.serviceAlpha, g.serviceBeta} } +// Compute returns the generated stubs for the compute API. +func (g *GCECloud) Compute() cloud.Cloud { + return g.c +} + // newGCECloud creates a new instance of GCECloud. func newGCECloud(config io.Reader) (gceCloud *GCECloud, err error) { var cloudConfig *CloudConfig