Merge pull request #10892 from nikhiljindal/beta1

Removing references to pre v1beta3 apis in code
This commit is contained in:
Vish Kannan
2015-07-23 17:05:43 -07:00
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
}