pass SelectionPredicate instead of Filter to storage layer

This commit is contained in:
Hongchao Deng
2016-08-22 20:41:21 -07:00
parent 234be5a1d0
commit 6f3ac807fd
56 changed files with 376 additions and 409 deletions

View File

@@ -61,8 +61,8 @@ func NewREST(config *storagebackend.Config, storageDecorator generic.StorageDeco
return obj.(*testgroup.TestType).Name, nil
},
// Used to match objects based on labels/fields for list.
PredicateFunc: func(label labels.Selector, field fields.Selector) *generic.SelectionPredicate {
return &generic.SelectionPredicate{
PredicateFunc: func(label labels.Selector, field fields.Selector) storage.SelectionPredicate {
return storage.SelectionPredicate{
Label: label,
Field: field,
GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) {