func (storage *MinionRegistryStorage) List(selector labels.Selector) (interface{}, error) {
	nameList, err := storage.registry.List()
	if err != nil {
		return nil, err
	}
	var list api.MinionList
	for _, name := range nameList {
		list.Items = append(list.Items, storage.toApiMinion(name))
	}
	return list, nil
}
Exemple #2
0
func (rs *REST) List(selector labels.Selector) (runtime.Object, error) {
	nameList, err := rs.registry.List()
	if err != nil {
		return nil, err
	}
	var list api.MinionList
	for _, name := range nameList {
		list.Items = append(list.Items, *rs.toApiMinion(name))
	}
	return &list, nil
}