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,10 +30,10 @@ type NamespacesInterface interface {
type NamespaceInterface interface {
Create(item *api.Namespace) (*api.Namespace, error)
Get(name string) (result *api.Namespace, err error)
List(opts unversioned.ListOptions) (*api.NamespaceList, error)
List(opts api.ListOptions) (*api.NamespaceList, error)
Delete(name string) error
Update(item *api.Namespace) (*api.Namespace, error)
Watch(opts unversioned.ListOptions) (watch.Interface, error)
Watch(opts api.ListOptions) (watch.Interface, error)
Finalize(item *api.Namespace) (*api.Namespace, error)
Status(item *api.Namespace) (*api.Namespace, error)
}
@@ -57,7 +56,7 @@ func (c *namespaces) Create(namespace *api.Namespace) (*api.Namespace, error) {
}
// List lists all the namespaces in the cluster.
func (c *namespaces) List(opts unversioned.ListOptions) (*api.NamespaceList, error) {
func (c *namespaces) List(opts api.ListOptions) (*api.NamespaceList, error) {
result := &api.NamespaceList{}
err := c.r.Get().
Resource("namespaces").
@@ -112,7 +111,7 @@ func (c *namespaces) Delete(name string) error {
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.r.Get().
Prefix("watch").
Resource("namespaces").