add get alpha backend service into cloud provider

This commit is contained in:
Minhan Xia 2017-09-29 14:57:08 -07:00
parent b188868fd9
commit 43f20bd57f

View File

@ -38,6 +38,13 @@ func (gce *GCECloud) GetGlobalBackendService(name string) (*compute.BackendServi
return v, mc.Observe(err) return v, mc.Observe(err)
} }
// GetAlphaGlobalBackendService retrieves alpha backend by name.
func (gce *GCECloud) GetAlphaGlobalBackendService(name string) (*computealpha.BackendService, error) {
mc := newBackendServiceMetricContextWithVersion("get", "", computeAlphaVersion)
v, err := gce.serviceAlpha.BackendServices.Get(gce.projectID, name).Do()
return v, mc.Observe(err)
}
// UpdateGlobalBackendService applies the given BackendService as an update to an existing service. // UpdateGlobalBackendService applies the given BackendService as an update to an existing service.
func (gce *GCECloud) UpdateGlobalBackendService(bg *compute.BackendService) error { func (gce *GCECloud) UpdateGlobalBackendService(bg *compute.BackendService) error {
mc := newBackendServiceMetricContext("update", "") mc := newBackendServiceMetricContext("update", "")