From f7191d626dd5ef5586af4bf18ebed3b8a38274fe Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Tue, 24 Mar 2015 13:00:26 +0100 Subject: [PATCH] Change "/ns" to "/namespaces" in few remaining places. --- docs/design/persistent-storage.md | 12 ++++++------ pkg/apiserver/handlers.go | 6 +++--- pkg/client/client_test.go | 2 +- pkg/client/namespaces_test.go | 2 +- pkg/controller/replication_controller_test.go | 2 +- plugin/pkg/scheduler/factory/factory_test.go | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/design/persistent-storage.md b/docs/design/persistent-storage.md index 5b84ddd25ad..5907e11d2a2 100644 --- a/docs/design/persistent-storage.md +++ b/docs/design/persistent-storage.md @@ -65,12 +65,12 @@ Users attach their claim to their pod using a new ```PersistentVolumeClaimVolume | Action | HTTP Verb | Path | Description | | ---- | ---- | ---- | ---- | -| CREATE | POST | /api/{version}/ns/{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} | -| UPDATE | PUT | /api/{version}/ns/{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} | -| LIST | GET | /api/{version}/ns/{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} | +| CREATE | POST | /api/{version}/namespaces/{ns}/persistentvolumeclaims/ | Create instance of PersistentVolumeClaim in namespace {ns} | +| GET | GET | /api/{version}/namespaces/{ns}/persistentvolumeclaims/{name} | Get 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}/namespaces/{ns}/persistentvolumeclaims/{name} | Delete instance of PersistentVolumeClaim in namespace {ns} with {name} | +| LIST | GET | /api/{version}/namespaces/{ns}/persistentvolumeclaims | List instances of PersistentVolumeClaim in namespace {ns} | +| WATCH | GET | /api/{version}/watch/namespaces/{ns}/persistentvolumeclaims | Watch for changes to PersistentVolumeClaim in namespace {ns} | diff --git a/pkg/apiserver/handlers.go b/pkg/apiserver/handlers.go index a85e2f0ecbf..a6a678ea46e 100644 --- a/pkg/apiserver/handlers.go +++ b/pkg/apiserver/handlers.go @@ -252,11 +252,11 @@ type APIRequestInfoResolver struct { // // Special verbs: // /proxy/{resource}/{resourceName} -// /proxy/ns/{namespace}/{resource}/{resourceName} -// /redirect/ns/{namespace}/{resource}/{resourceName} +// /proxy/namespaces/{namespace}/{resource}/{resourceName} +// /redirect/namespaces/{namespace}/{resource}/{resourceName} // /redirect/{resource}/{resourceName} // /watch/{resource} -// /watch/ns/{namespace}/{resource} +// /watch/namespaces/{namespace}/{resource} // // Fully qualified paths for above: // /api/{version}/* diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index 7cc8fb617b9..0651d0ab81b 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -169,7 +169,7 @@ func (c *testClient) ValidateCommon(t *testing.T, err error) { func buildResourcePath(namespace, resource string) string { if len(namespace) > 0 { if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") { - return path.Join("ns", namespace, resource) + return path.Join("namespaces", namespace, resource) } } return resource diff --git a/pkg/client/namespaces_test.go b/pkg/client/namespaces_test.go index 7777c65581f..9dd061d1bf4 100644 --- a/pkg/client/namespaces_test.go +++ b/pkg/client/namespaces_test.go @@ -86,7 +86,7 @@ func TestNamespaceList(t *testing.T) { c := &testClient{ Request: testRequest{ Method: "GET", - Path: "/ns", + Path: "/namespaces", Body: nil, }, Response: Response{StatusCode: 200, Body: namespaceList}, diff --git a/pkg/controller/replication_controller_test.go b/pkg/controller/replication_controller_test.go index 735ef1dc16d..481239d8c19 100644 --- a/pkg/controller/replication_controller_test.go +++ b/pkg/controller/replication_controller_test.go @@ -36,7 +36,7 @@ import ( func makeNamespaceURL(namespace, suffix string) string { if !(testapi.Version() == "v1beta1" || testapi.Version() == "v1beta2") { - return makeURL("/ns/" + namespace + suffix) + return makeURL("/namespaces/" + namespace + suffix) } return makeURL(suffix + "?namespace=" + namespace) } diff --git a/plugin/pkg/scheduler/factory/factory_test.go b/plugin/pkg/scheduler/factory/factory_test.go index ff84612ee8b..d4ce474480f 100644 --- a/plugin/pkg/scheduler/factory/factory_test.go +++ b/plugin/pkg/scheduler/factory/factory_test.go @@ -334,7 +334,7 @@ func TestPollMinions(t *testing.T) { func makeNamespaceURL(namespace, suffix string, isClient bool) string { 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 isClient {