fix the left pre V1 field names in 290c4618c331f4f30a278af520121ff35

This commit is contained in:
Chao Xu
2015-06-18 18:36:23 -07:00
parent f990899290
commit 5673f73378
5 changed files with 10 additions and 13 deletions

View File

@@ -323,13 +323,13 @@ func TestListPodListSelection(t *testing.T) {
field: "status.phase=Failed",
expectedIDs: util.NewStringSet("baz"),
}, {
field: "spec.host=barhost",
field: "spec.nodeName=barhost",
expectedIDs: util.NewStringSet("bar"),
}, {
field: "spec.host=",
field: "spec.nodeName=",
expectedIDs: util.NewStringSet("foo", "baz", "qux", "zot"),
}, {
field: "spec.host!=",
field: "spec.nodeName!=",
expectedIDs: util.NewStringSet("bar"),
},
}

View File

@@ -123,7 +123,7 @@ func MatchPod(label labels.Selector, field fields.Selector) generic.Matcher {
func PodToSelectableFields(pod *api.Pod) fields.Set {
return fields.Set{
"metadata.name": pod.Name,
"spec.host": pod.Spec.NodeName,
"spec.nodeName": pod.Spec.NodeName,
"status.phase": string(pod.Status.Phase),
}
}