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"
)
@@ -30,9 +29,9 @@ type SecretsInterface interface {
Create(secret *api.Secret) (*api.Secret, error)
Update(secret *api.Secret) (*api.Secret, error)
Delete(name string) error
List(opts unversioned.ListOptions) (*api.SecretList, error)
List(opts api.ListOptions) (*api.SecretList, error)
Get(name string) (*api.Secret, error)
Watch(opts unversioned.ListOptions) (watch.Interface, error)
Watch(opts api.ListOptions) (watch.Interface, error)
}
// events implements Secrets interface
@@ -62,7 +61,7 @@ func (s *secrets) Create(secret *api.Secret) (*api.Secret, error) {
}
// List returns a list of secrets matching the selectors.
func (s *secrets) List(opts unversioned.ListOptions) (*api.SecretList, error) {
func (s *secrets) List(opts api.ListOptions) (*api.SecretList, error) {
result := &api.SecretList{}
err := s.client.Get().
@@ -89,7 +88,7 @@ func (s *secrets) Get(name string) (*api.Secret, error) {
}
// Watch starts watching for secrets matching the given selectors.
func (s *secrets) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
func (s *secrets) Watch(opts api.ListOptions) (watch.Interface, error) {
return s.client.Get().
Prefix("watch").
Namespace(s.namespace).