Make label and field selector query strings versionable.

This commit is contained in:
Brendan Burns
2015-03-09 21:45:35 -07:00
parent 0aee25e065
commit 266234f3b9
22 changed files with 92 additions and 74 deletions

View File

@@ -58,7 +58,7 @@ func newPods(c *Client, namespace string) *pods {
// List takes a selector, and returns the list of pods that match that selector.
func (c *pods) List(selector labels.Selector) (result *api.PodList, err error) {
result = &api.PodList{}
err = c.r.Get().Namespace(c.ns).Resource("pods").SelectorParam("labels", selector).Do().Into(result)
err = c.r.Get().Namespace(c.ns).Resource("pods").SelectorParam(api.LabelSelectorQueryParam(c.r.APIVersion()), selector).Do().Into(result)
return
}