Merge pull request #5844 from wojtek-t/change_ns_to_namespaces
Change "/ns" to "/namespaces" in few remaining places.
This commit is contained in:
commit
8da8cf16b0
@ -65,12 +65,12 @@ Users attach their claim to their pod using a new ```PersistentVolumeClaimVolume
|
|||||||
|
|
||||||
| Action | HTTP Verb | Path | Description |
|
| Action | HTTP Verb | Path | Description |
|
||||||
| ---- | ---- | ---- | ---- |
|
| ---- | ---- | ---- | ---- |
|
||||||
| CREATE | POST | /api/{version}/ns/{ns}/persistentvolumeclaims/ | Create instance of PersistentVolumeClaim in namespace {ns} |
|
| CREATE | POST | /api/{version}/namespaces/{ns}/persistentvolumeclaims/ | Create instance of PersistentVolumeClaim in namespace {ns} |
|
||||||
| GET | GET | /api/{version}/ns/{ns}/persistentvolumeclaims/{name} | Get instance of PersistentVolumeClaim in namespace {ns} with {name} |
|
| GET | GET | /api/{version}/namespaces/{ns}/persistentvolumeclaims/{name} | Get instance of PersistentVolumeClaim in namespace {ns} with {name} |
|
||||||
| UPDATE | PUT | /api/{version}/ns/{ns}/persistentvolumeclaims/{name} | Update instance of PersistentVolumeClaim in namespace {ns} with {name} |
|
| UPDATE | PUT | /api/{version}/namespaces/{ns}/persistentvolumeclaims/{name} | Update instance of PersistentVolumeClaim in namespace {ns} with {name} |
|
||||||
| DELETE | DELETE | /api/{version}/ns/{ns}/persistentvolumeclaims/{name} | Delete instance of PersistentVolumeClaim in namespace {ns} with {name} |
|
| DELETE | DELETE | /api/{version}/namespaces/{ns}/persistentvolumeclaims/{name} | Delete instance of PersistentVolumeClaim in namespace {ns} with {name} |
|
||||||
| LIST | GET | /api/{version}/ns/{ns}/persistentvolumeclaims | List instances of PersistentVolumeClaim in namespace {ns} |
|
| LIST | GET | /api/{version}/namespaces/{ns}/persistentvolumeclaims | List instances of PersistentVolumeClaim in namespace {ns} |
|
||||||
| WATCH | GET | /api/{version}/watch/ns/{ns}/persistentvolumeclaims | Watch for changes to PersistentVolumeClaim in namespace {ns} |
|
| WATCH | GET | /api/{version}/watch/namespaces/{ns}/persistentvolumeclaims | Watch for changes to PersistentVolumeClaim in namespace {ns} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,11 +252,11 @@ type APIRequestInfoResolver struct {
|
|||||||
//
|
//
|
||||||
// Special verbs:
|
// Special verbs:
|
||||||
// /proxy/{resource}/{resourceName}
|
// /proxy/{resource}/{resourceName}
|
||||||
// /proxy/ns/{namespace}/{resource}/{resourceName}
|
// /proxy/namespaces/{namespace}/{resource}/{resourceName}
|
||||||
// /redirect/ns/{namespace}/{resource}/{resourceName}
|
// /redirect/namespaces/{namespace}/{resource}/{resourceName}
|
||||||
// /redirect/{resource}/{resourceName}
|
// /redirect/{resource}/{resourceName}
|
||||||
// /watch/{resource}
|
// /watch/{resource}
|
||||||
// /watch/ns/{namespace}/{resource}
|
// /watch/namespaces/{namespace}/{resource}
|
||||||
//
|
//
|
||||||
// Fully qualified paths for above:
|
// Fully qualified paths for above:
|
||||||
// /api/{version}/*
|
// /api/{version}/*
|
||||||
|
@ -169,7 +169,7 @@ func (c *testClient) ValidateCommon(t *testing.T, err error) {
|
|||||||
func buildResourcePath(namespace, resource string) string {
|
func buildResourcePath(namespace, resource string) string {
|
||||||
if len(namespace) > 0 {
|
if len(namespace) > 0 {
|
||||||
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
||||||
return path.Join("ns", namespace, resource)
|
return path.Join("namespaces", namespace, resource)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resource
|
return resource
|
||||||
|
@ -86,7 +86,7 @@ func TestNamespaceList(t *testing.T) {
|
|||||||
c := &testClient{
|
c := &testClient{
|
||||||
Request: testRequest{
|
Request: testRequest{
|
||||||
Method: "GET",
|
Method: "GET",
|
||||||
Path: "/ns",
|
Path: "/namespaces",
|
||||||
Body: nil,
|
Body: nil,
|
||||||
},
|
},
|
||||||
Response: Response{StatusCode: 200, Body: namespaceList},
|
Response: Response{StatusCode: 200, Body: namespaceList},
|
||||||
|
@ -36,7 +36,7 @@ import (
|
|||||||
|
|
||||||
func makeNamespaceURL(namespace, suffix string) string {
|
func makeNamespaceURL(namespace, suffix string) string {
|
||||||
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
||||||
return makeURL("/ns/" + namespace + suffix)
|
return makeURL("/namespaces/" + namespace + suffix)
|
||||||
}
|
}
|
||||||
return makeURL(suffix + "?namespace=" + namespace)
|
return makeURL(suffix + "?namespace=" + namespace)
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
|
|
||||||
func makeNamespaceURL(namespace, suffix string, isClient bool) string {
|
func makeNamespaceURL(namespace, suffix string, isClient bool) string {
|
||||||
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") {
|
||||||
return makeURL("/ns/" + namespace + suffix)
|
return makeURL("/namespaces/" + namespace + suffix)
|
||||||
}
|
}
|
||||||
// if this is a url the client should call, encode the url
|
// if this is a url the client should call, encode the url
|
||||||
if isClient {
|
if isClient {
|
||||||
|
Loading…
Reference in New Issue
Block a user