removing references to pre v1beta3 apis

This commit is contained in:
nikhiljindal
2015-07-07 16:52:38 -07:00
parent 8278928b66
commit fc4da6844e
20 changed files with 60 additions and 112 deletions

View File

@@ -164,15 +164,13 @@ func (c *testClient) ValidateCommon(t *testing.T, err error) {
// buildResourcePath is a convenience function for knowing if a namespace should be in a path param or not
func buildResourcePath(namespace, resource string) string {
if len(namespace) > 0 {
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
return path.Join("namespaces", namespace, resource)
}
return path.Join("namespaces", namespace, resource)
}
return resource
}
// buildQueryValues is a convenience function for knowing if a namespace should be in a query param or not
func buildQueryValues(namespace string, query url.Values) url.Values {
func buildQueryValues(query url.Values) url.Values {
v := url.Values{}
if query != nil {
for key, values := range query {
@@ -181,11 +179,6 @@ func buildQueryValues(namespace string, query url.Values) url.Values {
}
}
}
if len(namespace) > 0 {
if api.PreV1Beta3(testapi.Version()) {
v.Set("namespace", namespace)
}
}
return v
}