Remove unused selflink parameters from ContextBasedNaming
Kubernetes-commit: 1e0b9c6e20a07f706e7ace39f417ea746fa05a3b
This commit is contained in:
parent
5e8e1ff118
commit
8268596b30
|
|
@ -41,9 +41,6 @@ type ScopeNamer interface {
|
||||||
type ContextBasedNaming struct {
|
type ContextBasedNaming struct {
|
||||||
Namer runtime.Namer
|
Namer runtime.Namer
|
||||||
ClusterScoped bool
|
ClusterScoped bool
|
||||||
|
|
||||||
SelfLinkPathPrefix string
|
|
||||||
SelfLinkPathSuffix string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContextBasedNaming implements ScopeNamer
|
// ContextBasedNaming implements ScopeNamer
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ package endpoints
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
gpath "path"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -428,10 +427,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
|
||||||
apiResource.Namespaced = false
|
apiResource.Namespaced = false
|
||||||
apiResource.Kind = resourceKind
|
apiResource.Kind = resourceKind
|
||||||
namer := handlers.ContextBasedNaming{
|
namer := handlers.ContextBasedNaming{
|
||||||
Namer: a.group.Namer,
|
Namer: a.group.Namer,
|
||||||
ClusterScoped: true,
|
ClusterScoped: true,
|
||||||
SelfLinkPathPrefix: gpath.Join(a.prefix, resource) + "/",
|
|
||||||
SelfLinkPathSuffix: suffix,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handler for standard REST verbs (GET, PUT, POST and DELETE).
|
// Handler for standard REST verbs (GET, PUT, POST and DELETE).
|
||||||
|
|
@ -477,10 +474,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
|
||||||
apiResource.Namespaced = true
|
apiResource.Namespaced = true
|
||||||
apiResource.Kind = resourceKind
|
apiResource.Kind = resourceKind
|
||||||
namer := handlers.ContextBasedNaming{
|
namer := handlers.ContextBasedNaming{
|
||||||
Namer: a.group.Namer,
|
Namer: a.group.Namer,
|
||||||
ClusterScoped: false,
|
ClusterScoped: false,
|
||||||
SelfLinkPathPrefix: gpath.Join(a.prefix, namespaceParamName) + "/",
|
|
||||||
SelfLinkPathSuffix: itemPathSuffix,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer, false}, isLister)
|
actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer, false}, isLister)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue