Unify per-resource List for unversioned client
This commit is contained in:
@@ -30,7 +30,7 @@ type ResourceQuotasNamespacer interface {
|
||||
|
||||
// ResourceQuotaInterface has methods to work with ResourceQuota resources.
|
||||
type ResourceQuotaInterface interface {
|
||||
List(selector labels.Selector) (*api.ResourceQuotaList, error)
|
||||
List(label labels.Selector, field fields.Selector) (*api.ResourceQuotaList, error)
|
||||
Get(name string) (*api.ResourceQuota, error)
|
||||
Delete(name string) error
|
||||
Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error)
|
||||
@@ -54,9 +54,9 @@ func newResourceQuotas(c *Client, namespace string) *resourceQuotas {
|
||||
}
|
||||
|
||||
// List takes a selector, and returns the list of resourceQuotas that match that selector.
|
||||
func (c *resourceQuotas) List(selector labels.Selector) (result *api.ResourceQuotaList, err error) {
|
||||
func (c *resourceQuotas) List(label labels.Selector, field fields.Selector) (result *api.ResourceQuotaList, err error) {
|
||||
result = &api.ResourceQuotaList{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("resourceQuotas").LabelsSelectorParam(selector).Do().Into(result)
|
||||
err = c.r.Get().Namespace(c.ns).Resource("resourceQuotas").LabelsSelectorParam(label).FieldsSelectorParam(field).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user