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

@@ -20,7 +20,6 @@ import (
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/watch"
)
@@ -31,11 +30,11 @@ type NodesInterface interface {
type NodeInterface interface {
Get(name string) (result *api.Node, err error)
Create(node *api.Node) (*api.Node, error)
List(opts unversioned.ListOptions) (*api.NodeList, error)
List(opts api.ListOptions) (*api.NodeList, error)
Delete(name string) error
Update(*api.Node) (*api.Node, error)
UpdateStatus(*api.Node) (*api.Node, error)
Watch(opts unversioned.ListOptions) (watch.Interface, error)
Watch(opts api.ListOptions) (watch.Interface, error)
}
// nodes implements NodesInterface
@@ -61,7 +60,7 @@ func (c *nodes) Create(node *api.Node) (*api.Node, error) {
}
// List takes a selector, and returns the list of nodes that match that selector in the cluster.
func (c *nodes) List(opts unversioned.ListOptions) (*api.NodeList, error) {
func (c *nodes) List(opts api.ListOptions) (*api.NodeList, error) {
result := &api.NodeList{}
err := c.r.Get().Resource(c.resourceName()).VersionedParams(&opts, api.Scheme).Do().Into(result)
return result, err
@@ -101,7 +100,7 @@ func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) {
}
// Watch returns a watch.Interface that watches the requested nodes.
func (c *nodes) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.r.Get().
Prefix("watch").
Namespace(api.NamespaceAll).