Switch to versioned ListOptions in client.

This commit is contained in:
Wojciech Tyczynski
2015-12-10 10:39:03 +01:00
parent 4ef062c22f
commit 960808bf08
167 changed files with 602 additions and 671 deletions

View File

@@ -18,7 +18,6 @@ package unversioned
import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/watch"
)
@@ -29,12 +28,12 @@ type PodsNamespacer interface {
// PodInterface has methods to work with Pod resources.
type PodInterface interface {
List(opts unversioned.ListOptions) (*api.PodList, error)
List(opts api.ListOptions) (*api.PodList, error)
Get(name string) (*api.Pod, error)
Delete(name string, options *api.DeleteOptions) error
Create(pod *api.Pod) (*api.Pod, error)
Update(pod *api.Pod) (*api.Pod, error)
Watch(opts unversioned.ListOptions) (watch.Interface, error)
Watch(opts api.ListOptions) (watch.Interface, error)
Bind(binding *api.Binding) error
UpdateStatus(pod *api.Pod) (*api.Pod, error)
GetLogs(name string, opts *api.PodLogOptions) *Request
@@ -55,7 +54,7 @@ func newPods(c *Client, namespace string) *pods {
}
// List takes label and field selectors, and returns the list of pods that match those selectors.
func (c *pods) List(opts unversioned.ListOptions) (result *api.PodList, err error) {
func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) {
result = &api.PodList{}
err = c.r.Get().Namespace(c.ns).Resource("pods").VersionedParams(&opts, api.Scheme).Do().Into(result)
return
@@ -96,7 +95,7 @@ func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) {
}
// Watch returns a watch.Interface that watches the requested pods.
func (c *pods) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.r.Get().
Prefix("watch").
Namespace(c.ns).