Split RESTStorage into separate interfaces

Omit unimplemented interfaces from Swagger
This commit is contained in:
Clayton Coleman
2015-01-12 00:33:25 -05:00
parent a52b216324
commit 22c99c98e2
15 changed files with 239 additions and 92 deletions

View File

@@ -30,6 +30,7 @@ import (
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors"
"github.com/GoogleCloudPlatform/kubernetes/pkg/httplog"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
@@ -106,7 +107,7 @@ func (r *ProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
redirector, ok := storage.(Redirector)
if !ok {
httplog.LogOf(req, w).Addf("'%v' is not a redirector", kind)
notFound(w, req)
errorJSON(errors.NewMethodNotSupported(kind, "proxy"), r.codec, w)
return
}