Fix google cloudmonitoring import path

pull/6/head
Andy Goldstein 2015-09-29 17:09:45 -04:00
parent 26c51881ca
commit 471c2a7d1f
4 changed files with 23 additions and 47 deletions

8
Godeps/Godeps.json generated
View File

@ -354,10 +354,6 @@
"ImportPath": "github.com/google/gofuzz",
"Rev": "bbcb9da2d746f8bdbd6a936686a0a6067ada0ec5"
},
{
"ImportPath": "github.com/google/google-api-go-client/cloudmonitoring/v2beta2",
"Rev": "8cbf97d5e925c857511aedf459affeed490e6861"
},
{
"ImportPath": "github.com/gorilla/context",
"Rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd"
@ -600,6 +596,10 @@
"ImportPath": "golang.org/x/tools/imports",
"Rev": "4f50f44d7a3206e9e28b984e023efce2a4a75369"
},
{
"ImportPath": "google.golang.org/api/cloudmonitoring/v2beta2",
"Rev": "0c2979aeaa5b573e60d3ddffe5ce8dca8df309bd"
},
{
"ImportPath": "google.golang.org/api/compute/v1",
"Rev": "0c2979aeaa5b573e60d3ddffe5ce8dca8df309bd"

View File

@ -439,7 +439,7 @@ func (c *MetricDescriptorsCreateCall) Fields(s ...googleapi.Field) *MetricDescri
return c
}
func (c *MetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, error) {
func (c *MetricDescriptorsCreateCall) Do() (*MetricDescriptor, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.metricdescriptor)
if err != nil {
@ -447,7 +447,7 @@ func (c *MetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, err
}
ctype := "application/json"
params := make(url.Values)
params.Set("alt", alt)
params.Set("alt", "json")
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
@ -459,11 +459,7 @@ func (c *MetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, err
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
return c.s.client.Do(req)
}
func (c *MetricDescriptorsCreateCall) Do() (*MetricDescriptor, error) {
res, err := c.doRequest("json")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
@ -531,10 +527,10 @@ func (c *MetricDescriptorsDeleteCall) Fields(s ...googleapi.Field) *MetricDescri
return c
}
func (c *MetricDescriptorsDeleteCall) doRequest(alt string) (*http.Response, error) {
func (c *MetricDescriptorsDeleteCall) Do() (*DeleteMetricDescriptorResponse, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", alt)
params.Set("alt", "json")
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
@ -546,11 +542,7 @@ func (c *MetricDescriptorsDeleteCall) doRequest(alt string) (*http.Response, err
"metric": c.metric,
})
req.Header.Set("User-Agent", c.s.userAgent())
return c.s.client.Do(req)
}
func (c *MetricDescriptorsDeleteCall) Do() (*DeleteMetricDescriptorResponse, error) {
res, err := c.doRequest("json")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
@ -654,10 +646,10 @@ func (c *MetricDescriptorsListCall) Fields(s ...googleapi.Field) *MetricDescript
return c
}
func (c *MetricDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
func (c *MetricDescriptorsListCall) Do() (*ListMetricDescriptorsResponse, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", alt)
params.Set("alt", "json")
if v, ok := c.opt_["count"]; ok {
params.Set("count", fmt.Sprintf("%v", v))
}
@ -677,11 +669,7 @@ func (c *MetricDescriptorsListCall) doRequest(alt string) (*http.Response, error
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
return c.s.client.Do(req)
}
func (c *MetricDescriptorsListCall) Do() (*ListMetricDescriptorsResponse, error) {
res, err := c.doRequest("json")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
@ -863,10 +851,10 @@ func (c *TimeseriesListCall) Fields(s ...googleapi.Field) *TimeseriesListCall {
return c
}
func (c *TimeseriesListCall) doRequest(alt string) (*http.Response, error) {
func (c *TimeseriesListCall) Do() (*ListTimeseriesResponse, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", alt)
params.Set("alt", "json")
params.Set("youngest", fmt.Sprintf("%v", c.youngest))
if v, ok := c.opt_["aggregator"]; ok {
params.Set("aggregator", fmt.Sprintf("%v", v))
@ -900,11 +888,7 @@ func (c *TimeseriesListCall) doRequest(alt string) (*http.Response, error) {
"metric": c.metric,
})
req.Header.Set("User-Agent", c.s.userAgent())
return c.s.client.Do(req)
}
func (c *TimeseriesListCall) Do() (*ListTimeseriesResponse, error) {
res, err := c.doRequest("json")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
@ -1048,7 +1032,7 @@ func (c *TimeseriesWriteCall) Fields(s ...googleapi.Field) *TimeseriesWriteCall
return c
}
func (c *TimeseriesWriteCall) doRequest(alt string) (*http.Response, error) {
func (c *TimeseriesWriteCall) Do() (*WriteTimeseriesResponse, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.writetimeseriesrequest)
if err != nil {
@ -1056,7 +1040,7 @@ func (c *TimeseriesWriteCall) doRequest(alt string) (*http.Response, error) {
}
ctype := "application/json"
params := make(url.Values)
params.Set("alt", alt)
params.Set("alt", "json")
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
@ -1068,11 +1052,7 @@ func (c *TimeseriesWriteCall) doRequest(alt string) (*http.Response, error) {
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
return c.s.client.Do(req)
}
func (c *TimeseriesWriteCall) Do() (*WriteTimeseriesResponse, error) {
res, err := c.doRequest("json")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
@ -1236,10 +1216,10 @@ func (c *TimeseriesDescriptorsListCall) Fields(s ...googleapi.Field) *Timeseries
return c
}
func (c *TimeseriesDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
func (c *TimeseriesDescriptorsListCall) Do() (*ListTimeseriesDescriptorsResponse, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", alt)
params.Set("alt", "json")
params.Set("youngest", fmt.Sprintf("%v", c.youngest))
if v, ok := c.opt_["aggregator"]; ok {
params.Set("aggregator", fmt.Sprintf("%v", v))
@ -1273,11 +1253,7 @@ func (c *TimeseriesDescriptorsListCall) doRequest(alt string) (*http.Response, e
"metric": c.metric,
})
req.Header.Set("User-Agent", c.s.userAgent())
return c.s.client.Do(req)
}
func (c *TimeseriesDescriptorsListCall) Do() (*ListTimeseriesDescriptorsResponse, error) {
res, err := c.doRequest("json")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}

View File

@ -23,9 +23,9 @@ import (
"k8s.io/kubernetes/pkg/api"
gcm "github.com/google/google-api-go-client/cloudmonitoring/v2beta2"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
gcm "google.golang.org/api/cloudmonitoring/v2beta2"
gce "google.golang.org/cloud/compute/metadata"
)