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

@@ -69,14 +69,10 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName string) er
func getSelfLink(name, namespace string) string {
var selfLink string
if api.PreV1Beta3(latest.Version) {
selfLink = fmt.Sprintf("/api/"+latest.Version+"/pods/%s?namespace=%s", name, namespace)
} else {
if len(namespace) == 0 {
namespace = api.NamespaceDefault
}
selfLink = fmt.Sprintf("/api/"+latest.Version+"/pods/namespaces/%s/%s", name, namespace)
if len(namespace) == 0 {
namespace = api.NamespaceDefault
}
selfLink = fmt.Sprintf("/api/"+latest.Version+"/pods/namespaces/%s/%s", name, namespace)
return selfLink
}