Skip to content

Fix clientset group names #14203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cmd/cli/cmd/idle.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
cmdutil "github.com/openshift/origin/pkg/cmd/util"
"github.com/openshift/origin/pkg/cmd/util/clientcmd"
deployapi "github.com/openshift/origin/pkg/deploy/api"
deployclient "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/deploy/internalversion"
deployclient "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/apps/internalversion"
unidlingapi "github.com/openshift/origin/pkg/unidling/api"
utilunidling "github.com/openshift/origin/pkg/unidling/util"
utilerrors "github.com/openshift/origin/pkg/util/errors"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/origin/run_components.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (
deploycontroller "github.com/openshift/origin/pkg/deploy/controller/deployment"
deployconfigcontroller "github.com/openshift/origin/pkg/deploy/controller/deploymentconfig"
triggercontroller "github.com/openshift/origin/pkg/deploy/controller/generictrigger"
deployclient "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/deploy/internalversion"
deployclient "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/apps/internalversion"
"github.com/openshift/origin/pkg/dns"
imagecontroller "github.com/openshift/origin/pkg/image/controller"
imagetriggercontroller "github.com/openshift/origin/pkg/image/controller/trigger"
Expand Down
26 changes: 13 additions & 13 deletions pkg/deploy/generated/clientset/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,41 @@ package clientset

import (
glog "github.com/golang/glog"
deployv1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/deploy/v1"
appsv1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/apps/v1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
)

type Interface interface {
Discovery() discovery.DiscoveryInterface
DeployV1() deployv1.DeployV1Interface
AppsV1() appsv1.AppsV1Interface
// Deprecated: please explicitly pick a version if possible.
Deploy() deployv1.DeployV1Interface
Apps() appsv1.AppsV1Interface
}

// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
*deployv1.DeployV1Client
*appsv1.AppsV1Client
}

// DeployV1 retrieves the DeployV1Client
func (c *Clientset) DeployV1() deployv1.DeployV1Interface {
// AppsV1 retrieves the AppsV1Client
func (c *Clientset) AppsV1() appsv1.AppsV1Interface {
if c == nil {
return nil
}
return c.DeployV1Client
return c.AppsV1Client
}

// Deprecated: Deploy retrieves the default version of DeployClient.
// Deprecated: Apps retrieves the default version of AppsClient.
// Please explicitly pick a version.
func (c *Clientset) Deploy() deployv1.DeployV1Interface {
func (c *Clientset) Apps() appsv1.AppsV1Interface {
if c == nil {
return nil
}
return c.DeployV1Client
return c.AppsV1Client
}

// Discovery retrieves the DiscoveryClient
Expand All @@ -55,7 +55,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
}
var cs Clientset
var err error
cs.DeployV1Client, err = deployv1.NewForConfig(&configShallowCopy)
cs.AppsV1Client, err = appsv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
Expand All @@ -72,7 +72,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.DeployV1Client = deployv1.NewForConfigOrDie(c)
cs.AppsV1Client = appsv1.NewForConfigOrDie(c)

cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &cs
Expand All @@ -81,7 +81,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.DeployV1Client = deployv1.New(c)
cs.AppsV1Client = appsv1.New(c)

cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
Expand Down
16 changes: 8 additions & 8 deletions pkg/deploy/generated/clientset/fake/clientset_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package fake

import (
clientset "github.com/openshift/origin/pkg/deploy/generated/clientset"
deployv1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/deploy/v1"
fakedeployv1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/deploy/v1/fake"
appsv1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/apps/v1"
fakeappsv1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/apps/v1/fake"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/discovery"
Expand Down Expand Up @@ -44,12 +44,12 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {

var _ clientset.Interface = &Clientset{}

// DeployV1 retrieves the DeployV1Client
func (c *Clientset) DeployV1() deployv1.DeployV1Interface {
return &fakedeployv1.FakeDeployV1{Fake: &c.Fake}
// AppsV1 retrieves the AppsV1Client
func (c *Clientset) AppsV1() appsv1.AppsV1Interface {
return &fakeappsv1.FakeAppsV1{Fake: &c.Fake}
}

// Deploy retrieves the DeployV1Client
func (c *Clientset) Deploy() deployv1.DeployV1Interface {
return &fakedeployv1.FakeDeployV1{Fake: &c.Fake}
// Apps retrieves the AppsV1Client
func (c *Clientset) Apps() appsv1.AppsV1Interface {
return &fakeappsv1.FakeAppsV1{Fake: &c.Fake}
}
4 changes: 2 additions & 2 deletions pkg/deploy/generated/clientset/fake/register.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fake

import (
deploy "github.com/openshift/origin/pkg/deploy/api/install"
apps "github.com/openshift/origin/pkg/deploy/api/install"
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -25,6 +25,6 @@ func init() {

// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
deploy.Install(groupFactoryRegistry, registry, scheme)
apps.Install(groupFactoryRegistry, registry, scheme)

}
4 changes: 2 additions & 2 deletions pkg/deploy/generated/clientset/scheme/register.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scheme

import (
deployv1 "github.com/openshift/origin/pkg/deploy/api/v1"
appsv1 "github.com/openshift/origin/pkg/deploy/api/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
Expand Down Expand Up @@ -32,6 +32,6 @@ func init() {
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
func AddToScheme(scheme *runtime.Scheme) {
deployv1.AddToScheme(scheme)
appsv1.AddToScheme(scheme)

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ import (
rest "k8s.io/client-go/rest"
)

type DeployV1Interface interface {
type AppsV1Interface interface {
RESTClient() rest.Interface
DeploymentConfigsGetter
}

// DeployV1Client is used to interact with features provided by the apps.openshift.io group.
type DeployV1Client struct {
// AppsV1Client is used to interact with features provided by the apps.openshift.io group.
type AppsV1Client struct {
restClient rest.Interface
}

func (c *DeployV1Client) DeploymentConfigs(namespace string) DeploymentConfigInterface {
func (c *AppsV1Client) DeploymentConfigs(namespace string) DeploymentConfigInterface {
return newDeploymentConfigs(c, namespace)
}

// NewForConfig creates a new DeployV1Client for the given config.
func NewForConfig(c *rest.Config) (*DeployV1Client, error) {
// NewForConfig creates a new AppsV1Client for the given config.
func NewForConfig(c *rest.Config) (*AppsV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
Expand All @@ -31,22 +31,22 @@ func NewForConfig(c *rest.Config) (*DeployV1Client, error) {
if err != nil {
return nil, err
}
return &DeployV1Client{client}, nil
return &AppsV1Client{client}, nil
}

// NewForConfigOrDie creates a new DeployV1Client for the given config and
// NewForConfigOrDie creates a new AppsV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *DeployV1Client {
func NewForConfigOrDie(c *rest.Config) *AppsV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}

// New creates a new DeployV1Client for the given RESTClient.
func New(c rest.Interface) *DeployV1Client {
return &DeployV1Client{c}
// New creates a new AppsV1Client for the given RESTClient.
func New(c rest.Interface) *AppsV1Client {
return &AppsV1Client{c}
}

func setConfigDefaults(config *rest.Config) error {
Expand All @@ -64,7 +64,7 @@ func setConfigDefaults(config *rest.Config) error {

// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *DeployV1Client) RESTClient() rest.Interface {
func (c *AppsV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type deploymentConfigs struct {
}

// newDeploymentConfigs returns a DeploymentConfigs
func newDeploymentConfigs(c *DeployV1Client, namespace string) *deploymentConfigs {
func newDeploymentConfigs(c *AppsV1Client, namespace string) *deploymentConfigs {
return &deploymentConfigs{
client: c.RESTClient(),
ns: namespace,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package fake

import (
v1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/deploy/v1"
v1 "github.com/openshift/origin/pkg/deploy/generated/clientset/typed/apps/v1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)

type FakeDeployV1 struct {
type FakeAppsV1 struct {
*testing.Fake
}

func (c *FakeDeployV1) DeploymentConfigs(namespace string) v1.DeploymentConfigInterface {
func (c *FakeAppsV1) DeploymentConfigs(namespace string) v1.DeploymentConfigInterface {
return &FakeDeploymentConfigs{c, namespace}
}

// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeDeployV1) RESTClient() rest.Interface {
func (c *FakeAppsV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// FakeDeploymentConfigs implements DeploymentConfigInterface
type FakeDeploymentConfigs struct {
Fake *FakeDeployV1
Fake *FakeAppsV1
ns string
}

Expand Down
18 changes: 9 additions & 9 deletions pkg/deploy/generated/internalclientset/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ package internalclientset

import (
glog "github.com/golang/glog"
deployinternalversion "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/deploy/internalversion"
appsinternalversion "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/apps/internalversion"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
)

type Interface interface {
Discovery() discovery.DiscoveryInterface
Deploy() deployinternalversion.DeployInterface
Apps() appsinternalversion.AppsInterface
}

// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
*deployinternalversion.DeployClient
*appsinternalversion.AppsClient
}

// Deploy retrieves the DeployClient
func (c *Clientset) Deploy() deployinternalversion.DeployInterface {
// Apps retrieves the AppsClient
func (c *Clientset) Apps() appsinternalversion.AppsInterface {
if c == nil {
return nil
}
return c.DeployClient
return c.AppsClient
}

// Discovery retrieves the DiscoveryClient
Expand All @@ -44,7 +44,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
}
var cs Clientset
var err error
cs.DeployClient, err = deployinternalversion.NewForConfig(&configShallowCopy)
cs.AppsClient, err = appsinternalversion.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
Expand All @@ -61,7 +61,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.DeployClient = deployinternalversion.NewForConfigOrDie(c)
cs.AppsClient = appsinternalversion.NewForConfigOrDie(c)

cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &cs
Expand All @@ -70,7 +70,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
cs.DeployClient = deployinternalversion.New(c)
cs.AppsClient = appsinternalversion.New(c)

cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package fake

import (
clientset "github.com/openshift/origin/pkg/deploy/generated/internalclientset"
deployinternalversion "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/deploy/internalversion"
fakedeployinternalversion "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/deploy/internalversion/fake"
appsinternalversion "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/apps/internalversion"
fakeappsinternalversion "github.com/openshift/origin/pkg/deploy/generated/internalclientset/typed/apps/internalversion/fake"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/discovery"
Expand Down Expand Up @@ -44,7 +44,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {

var _ clientset.Interface = &Clientset{}

// Deploy retrieves the DeployClient
func (c *Clientset) Deploy() deployinternalversion.DeployInterface {
return &fakedeployinternalversion.FakeDeploy{Fake: &c.Fake}
// Apps retrieves the AppsClient
func (c *Clientset) Apps() appsinternalversion.AppsInterface {
return &fakeappsinternalversion.FakeApps{Fake: &c.Fake}
}
4 changes: 2 additions & 2 deletions pkg/deploy/generated/internalclientset/fake/register.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fake

import (
deploy "github.com/openshift/origin/pkg/deploy/api/install"
apps "github.com/openshift/origin/pkg/deploy/api/install"
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -25,6 +25,6 @@ func init() {

// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
deploy.Install(groupFactoryRegistry, registry, scheme)
apps.Install(groupFactoryRegistry, registry, scheme)

}
4 changes: 2 additions & 2 deletions pkg/deploy/generated/internalclientset/scheme/register.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scheme

import (
deploy "github.com/openshift/origin/pkg/deploy/api/install"
apps "github.com/openshift/origin/pkg/deploy/api/install"
announced "k8s.io/apimachinery/pkg/apimachinery/announced"
registered "k8s.io/apimachinery/pkg/apimachinery/registered"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -25,6 +25,6 @@ func init() {

// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
deploy.Install(groupFactoryRegistry, registry, scheme)
apps.Install(groupFactoryRegistry, registry, scheme)

}
Loading