Switch to github.com/golang/dep for vendoring
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
d6ab91be27
commit
8e5b17cf13
15431 changed files with 3971413 additions and 8881 deletions
35
vendor/k8s.io/kubernetes/plugin/pkg/scheduler/testing/BUILD
generated
vendored
Normal file
35
vendor/k8s.io/kubernetes/plugin/pkg/scheduler/testing/BUILD
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"fake_cache.go",
|
||||
"pods_to_cache.go",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//plugin/pkg/scheduler/schedulercache:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
55
vendor/k8s.io/kubernetes/plugin/pkg/scheduler/testing/fake_cache.go
generated
vendored
Normal file
55
vendor/k8s.io/kubernetes/plugin/pkg/scheduler/testing/fake_cache.go
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package schedulercache
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// FakeCache is used for testing
|
||||
type FakeCache struct {
|
||||
AssumeFunc func(*v1.Pod)
|
||||
}
|
||||
|
||||
func (f *FakeCache) AssumePod(pod *v1.Pod) error {
|
||||
f.AssumeFunc(pod)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *FakeCache) FinishBinding(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (f *FakeCache) ForgetPod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (f *FakeCache) AddPod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (f *FakeCache) UpdatePod(oldPod, newPod *v1.Pod) error { return nil }
|
||||
|
||||
func (f *FakeCache) RemovePod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (f *FakeCache) AddNode(node *v1.Node) error { return nil }
|
||||
|
||||
func (f *FakeCache) UpdateNode(oldNode, newNode *v1.Node) error { return nil }
|
||||
|
||||
func (f *FakeCache) RemoveNode(node *v1.Node) error { return nil }
|
||||
|
||||
func (f *FakeCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *FakeCache) List(s labels.Selector) ([]*v1.Pod, error) { return nil, nil }
|
55
vendor/k8s.io/kubernetes/plugin/pkg/scheduler/testing/pods_to_cache.go
generated
vendored
Normal file
55
vendor/k8s.io/kubernetes/plugin/pkg/scheduler/testing/pods_to_cache.go
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
Copyright 2015 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package schedulercache
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
|
||||
)
|
||||
|
||||
// PodsToCache is used for testing
|
||||
type PodsToCache []*v1.Pod
|
||||
|
||||
func (p PodsToCache) AssumePod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (p PodsToCache) ForgetPod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (p PodsToCache) AddPod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (p PodsToCache) UpdatePod(oldPod, newPod *v1.Pod) error { return nil }
|
||||
|
||||
func (p PodsToCache) RemovePod(pod *v1.Pod) error { return nil }
|
||||
|
||||
func (p PodsToCache) AddNode(node *v1.Node) error { return nil }
|
||||
|
||||
func (p PodsToCache) UpdateNode(oldNode, newNode *v1.Node) error { return nil }
|
||||
|
||||
func (p PodsToCache) RemoveNode(node *v1.Node) error { return nil }
|
||||
|
||||
func (p PodsToCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p PodsToCache) List(s labels.Selector) (selected []*v1.Pod, err error) {
|
||||
for _, pod := range p {
|
||||
if s.Matches(labels.Set(pod.Labels)) {
|
||||
selected = append(selected, pod)
|
||||
}
|
||||
}
|
||||
return selected, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue