Merge pull request #15837 from feihujiang/removeUselessCodesAboutMinion

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2015-10-21 09:05:46 -07:00
commit a5a917603c
6 changed files with 2 additions and 14 deletions

View File

@ -331,7 +331,6 @@ _kubectl_describe()
must_have_one_flag=()
must_have_one_noun=()
must_have_one_noun+=("limitrange")
must_have_one_noun+=("minion")
must_have_one_noun+=("namespace")
must_have_one_noun+=("node")
must_have_one_noun+=("persistentvolume")

View File

@ -68,13 +68,10 @@ func init() {
groupMeta.SelfLinker = runtime.SelfLinker(accessor)
// the list of kinds that are scoped at the root of the api hierarchy
// if a kind is not enumerated here, it is assumed to have a namespace scope
// the list of kinds that are scoped at the root of the api hierarchy
// if a kind is not enumerated here, it is assumed to have a namespace scope
rootScoped := sets.NewString(
"Node",
"Minion",
"Namespace",
"PersistentVolume",
"ComponentStatus",

View File

@ -75,7 +75,7 @@ func (m *FakeNodeHandler) Create(node *api.Node) (*api.Node, error) {
}()
for _, n := range m.Existing {
if n.Name == node.Name {
return nil, apierrors.NewAlreadyExists("Minion", node.Name)
return nil, apierrors.NewAlreadyExists("Node", node.Name)
}
}
if m.CreateHook == nil || m.CreateHook(m, node) {

View File

@ -73,7 +73,6 @@ func describerMap(c *client.Client) map[string]Describer {
"Secret": &SecretDescriber{c},
"Service": &ServiceDescriber{c},
"ServiceAccount": &ServiceAccountDescriber{c},
"Minion": &NodeDescriber{c},
"Node": &NodeDescriber{c},
"LimitRange": &LimitRangeDescriber{c},
"ResourceQuota": &ResourceQuotaDescriber{c},

View File

@ -142,7 +142,7 @@ var _ = rest.Creater(&BindingREST{})
func (r *BindingREST) Create(ctx api.Context, obj runtime.Object) (out runtime.Object, err error) {
binding := obj.(*api.Binding)
// TODO: move me to a binding strategy
if len(binding.Target.Kind) != 0 && (binding.Target.Kind != "Node" && binding.Target.Kind != "Minion") {
if len(binding.Target.Kind) != 0 && binding.Target.Kind != "Node" {
return nil, errors.NewInvalid("binding", binding.Name, fielderrors.ValidationErrorList{fielderrors.NewFieldInvalid("to.kind", binding.Target.Kind, "must be empty, 'Node', or 'Minion'")})
}
if len(binding.Target.Name) == 0 {

View File

@ -541,13 +541,6 @@ func TestEtcdCreateBinding(t *testing.T) {
},
errOK: func(err error) bool { return err == nil },
},
"kindMinion": {
binding: api.Binding{
ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"},
Target: api.ObjectReference{Name: "machine4", Kind: "Minion"},
},
errOK: func(err error) bool { return err == nil },
},
}
for k, test := range testCases {
storage, bindingStorage, _, fakeClient := newStorage(t)