Skip to content

Commit

Permalink
remove underscore in imported pkg names
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao Xu committed Feb 16, 2016
1 parent b165ba2 commit 97aecd0
Show file tree
Hide file tree
Showing 21 changed files with 99 additions and 99 deletions.
4 changes: 2 additions & 2 deletions cmd/kubelet/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
"k8s.io/kubernetes/pkg/client/chaosclient"
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
"k8s.io/kubernetes/pkg/client/record"
unversioned_core "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
client "k8s.io/kubernetes/pkg/client/unversioned"
clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth"
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
Expand Down Expand Up @@ -586,7 +586,7 @@ func RunKubelet(kcfg *KubeletConfig) error {
eventBroadcaster.StartLogging(glog.V(3).Infof)
if kcfg.EventClient != nil {
glog.V(4).Infof("Sending events to api server.")
eventBroadcaster.StartRecordingToSink(&unversioned_core.EventSinkImpl{kcfg.EventClient.Events("")})
eventBroadcaster.StartRecordingToSink(&unversionedcore.EventSinkImpl{kcfg.EventClient.Events("")})
} else {
glog.Warning("No api server defined - no events will be sent to API server.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ package test_internalclientset

import (
"github.com/golang/glog"
testgroup_unversioned "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/testgroup/unversioned"
unversionedtestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/testgroup/unversioned"
unversioned "k8s.io/kubernetes/pkg/client/unversioned"
)

type Interface interface {
Discovery() unversioned.DiscoveryInterface
Testgroup() testgroup_unversioned.TestgroupInterface
Testgroup() unversionedtestgroup.TestgroupInterface
}

// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*unversioned.DiscoveryClient
*testgroup_unversioned.TestgroupClient
*unversionedtestgroup.TestgroupClient
}

// Testgroup retrieves the TestgroupClient
func (c *Clientset) Testgroup() testgroup_unversioned.TestgroupInterface {
func (c *Clientset) Testgroup() unversionedtestgroup.TestgroupInterface {
return c.TestgroupClient
}

Expand All @@ -48,7 +48,7 @@ func (c *Clientset) Discovery() unversioned.DiscoveryInterface {
func NewForConfig(c *unversioned.Config) (*Clientset, error) {
var clientset Clientset
var err error
clientset.TestgroupClient, err = testgroup_unversioned.NewForConfig(c)
clientset.TestgroupClient, err = unversionedtestgroup.NewForConfig(c)
if err != nil {
return &clientset, err
}
Expand All @@ -64,7 +64,7 @@ func NewForConfig(c *unversioned.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *unversioned.Config) *Clientset {
var clientset Clientset
clientset.TestgroupClient = testgroup_unversioned.NewForConfigOrDie(c)
clientset.TestgroupClient = unversionedtestgroup.NewForConfigOrDie(c)

clientset.DiscoveryClient = unversioned.NewDiscoveryClientForConfigOrDie(c)
return &clientset
Expand All @@ -73,7 +73,7 @@ func NewForConfigOrDie(c *unversioned.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c *unversioned.RESTClient) *Clientset {
var clientset Clientset
clientset.TestgroupClient = testgroup_unversioned.New(c)
clientset.TestgroupClient = unversionedtestgroup.New(c)

clientset.DiscoveryClient = unversioned.NewDiscoveryClient(c)
return &clientset
Expand Down
4 changes: 2 additions & 2 deletions contrib/mesos/pkg/executor/apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package executor
import (
"k8s.io/kubernetes/contrib/mesos/pkg/node"
"k8s.io/kubernetes/pkg/api"
core_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
)

type kubeAPI interface {
Expand All @@ -33,7 +33,7 @@ type nodeAPI interface {
// clientAPIWrapper implements kubeAPI and node API, which serve to isolate external dependencies
// such that they're easier to mock in unit test.
type clientAPIWrapper struct {
client core_unversioned.CoreInterface
client unversionedcore.CoreInterface
}

func (cw *clientAPIWrapper) killPod(ns, name string) error {
Expand Down
8 changes: 4 additions & 4 deletions contrib/mesos/pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"time"

core_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"

log "github.com/golang/glog"
mesos "github.com/mesos/mesos-go/mesosproto"
Expand All @@ -42,7 +42,7 @@ const (
// Create creates a new node api object with the given hostname,
// slave attribute labels and annotations
func Create(
client core_unversioned.NodesGetter,
client unversionedcore.NodesGetter,
hostName string,
slaveAttrLabels,
annotations map[string]string,
Expand Down Expand Up @@ -88,7 +88,7 @@ func Create(
// The updated node merges the given slave attribute labels
// and annotations with the found api object.
func Update(
client core_unversioned.NodesGetter,
client unversionedcore.NodesGetter,
hostname string,
slaveAttrLabels,
annotations map[string]string,
Expand Down Expand Up @@ -123,7 +123,7 @@ func Update(

// CreateOrUpdate creates a node api object or updates an existing one
func CreateOrUpdate(
client core_unversioned.NodesGetter,
client unversionedcore.NodesGetter,
hostname string,
slaveAttrLabels,
annotations map[string]string,
Expand Down
4 changes: 2 additions & 2 deletions contrib/mesos/pkg/scheduler/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ import (
"k8s.io/kubernetes/pkg/client/cache"
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
"k8s.io/kubernetes/pkg/client/record"
unversioned_core "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/mesos"
Expand Down Expand Up @@ -792,7 +792,7 @@ func (s *SchedulerServer) bootstrap(hks hyperkube.Interface, sc *schedcfg.Config
broadcaster := record.NewBroadcaster()
recorder := broadcaster.NewRecorder(api.EventSource{Component: api.DefaultSchedulerName})
broadcaster.StartLogging(log.Infof)
broadcaster.StartRecordingToSink(&unversioned_core.EventSinkImpl{eventsClient.Events("")})
broadcaster.StartRecordingToSink(&unversionedcore.EventSinkImpl{eventsClient.Events("")})

// create scheduler core with all components arranged around it
lw := cache.NewListWatchFromClient(s.client.CoreClient, "pods", api.NamespaceAll, fields.Everything())
Expand Down
28 changes: 14 additions & 14 deletions pkg/client/clientset_generated/internalclientset/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ package internalclientset

import (
"github.com/golang/glog"
core_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
unversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
unversioned "k8s.io/kubernetes/pkg/client/unversioned"
)

type Interface interface {
Discovery() unversioned.DiscoveryInterface
Core() core_unversioned.CoreInterface
Extensions() extensions_unversioned.ExtensionsInterface
Core() unversionedcore.CoreInterface
Extensions() unversionedextensions.ExtensionsInterface
}

// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*unversioned.DiscoveryClient
*core_unversioned.CoreClient
*extensions_unversioned.ExtensionsClient
*unversionedcore.CoreClient
*unversionedextensions.ExtensionsClient
}

// Core retrieves the CoreClient
func (c *Clientset) Core() core_unversioned.CoreInterface {
func (c *Clientset) Core() unversionedcore.CoreInterface {
return c.CoreClient
}

// Extensions retrieves the ExtensionsClient
func (c *Clientset) Extensions() extensions_unversioned.ExtensionsInterface {
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
return c.ExtensionsClient
}

Expand All @@ -56,11 +56,11 @@ func (c *Clientset) Discovery() unversioned.DiscoveryInterface {
func NewForConfig(c *unversioned.Config) (*Clientset, error) {
var clientset Clientset
var err error
clientset.CoreClient, err = core_unversioned.NewForConfig(c)
clientset.CoreClient, err = unversionedcore.NewForConfig(c)
if err != nil {
return &clientset, err
}
clientset.ExtensionsClient, err = extensions_unversioned.NewForConfig(c)
clientset.ExtensionsClient, err = unversionedextensions.NewForConfig(c)
if err != nil {
return &clientset, err
}
Expand All @@ -76,8 +76,8 @@ func NewForConfig(c *unversioned.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *unversioned.Config) *Clientset {
var clientset Clientset
clientset.CoreClient = core_unversioned.NewForConfigOrDie(c)
clientset.ExtensionsClient = extensions_unversioned.NewForConfigOrDie(c)
clientset.CoreClient = unversionedcore.NewForConfigOrDie(c)
clientset.ExtensionsClient = unversionedextensions.NewForConfigOrDie(c)

clientset.DiscoveryClient = unversioned.NewDiscoveryClientForConfigOrDie(c)
return &clientset
Expand All @@ -86,8 +86,8 @@ func NewForConfigOrDie(c *unversioned.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c *unversioned.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = core_unversioned.New(c)
clientset.ExtensionsClient = extensions_unversioned.New(c)
clientset.CoreClient = unversionedcore.New(c)
clientset.ExtensionsClient = unversionedextensions.New(c)

clientset.DiscoveryClient = unversioned.NewDiscoveryClient(c)
return &clientset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package internalclientset

import (
core_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
unversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
"k8s.io/kubernetes/pkg/client/unversioned"
)

Expand All @@ -28,14 +28,14 @@ import (
func FromUnversionedClient(c *unversioned.Client) *Clientset {
var clientset Clientset
if c != nil {
clientset.CoreClient = core_unversioned.New(c.RESTClient)
clientset.CoreClient = unversionedcore.New(c.RESTClient)
} else {
clientset.CoreClient = core_unversioned.New(nil)
clientset.CoreClient = unversionedcore.New(nil)
}
if c != nil && c.ExtensionsClient != nil {
clientset.ExtensionsClient = extensions_unversioned.New(c.ExtensionsClient.RESTClient)
clientset.ExtensionsClient = unversionedextensions.New(c.ExtensionsClient.RESTClient)
} else {
clientset.ExtensionsClient = extensions_unversioned.New(nil)
clientset.ExtensionsClient = unversionedextensions.New(nil)
}

return &clientset
Expand Down
28 changes: 14 additions & 14 deletions pkg/client/clientset_generated/release_1_2/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ package release_1_2

import (
"github.com/golang/glog"
core_v1 "k8s.io/kubernetes/pkg/client/typed/generated/core/v1"
extensions_v1beta1 "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1"
v1core "k8s.io/kubernetes/pkg/client/typed/generated/core/v1"
v1beta1extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1"
unversioned "k8s.io/kubernetes/pkg/client/unversioned"
)

type Interface interface {
Discovery() unversioned.DiscoveryInterface
Core() core_v1.CoreInterface
Extensions() extensions_v1beta1.ExtensionsInterface
Core() v1core.CoreInterface
Extensions() v1beta1extensions.ExtensionsInterface
}

// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*unversioned.DiscoveryClient
*core_v1.CoreClient
*extensions_v1beta1.ExtensionsClient
*v1core.CoreClient
*v1beta1extensions.ExtensionsClient
}

// Core retrieves the CoreClient
func (c *Clientset) Core() core_v1.CoreInterface {
func (c *Clientset) Core() v1core.CoreInterface {
return c.CoreClient
}

// Extensions retrieves the ExtensionsClient
func (c *Clientset) Extensions() extensions_v1beta1.ExtensionsInterface {
func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface {
return c.ExtensionsClient
}

Expand All @@ -56,11 +56,11 @@ func (c *Clientset) Discovery() unversioned.DiscoveryInterface {
func NewForConfig(c *unversioned.Config) (*Clientset, error) {
var clientset Clientset
var err error
clientset.CoreClient, err = core_v1.NewForConfig(c)
clientset.CoreClient, err = v1core.NewForConfig(c)
if err != nil {
return &clientset, err
}
clientset.ExtensionsClient, err = extensions_v1beta1.NewForConfig(c)
clientset.ExtensionsClient, err = v1beta1extensions.NewForConfig(c)
if err != nil {
return &clientset, err
}
Expand All @@ -76,8 +76,8 @@ func NewForConfig(c *unversioned.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *unversioned.Config) *Clientset {
var clientset Clientset
clientset.CoreClient = core_v1.NewForConfigOrDie(c)
clientset.ExtensionsClient = extensions_v1beta1.NewForConfigOrDie(c)
clientset.CoreClient = v1core.NewForConfigOrDie(c)
clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c)

clientset.DiscoveryClient = unversioned.NewDiscoveryClientForConfigOrDie(c)
return &clientset
Expand All @@ -86,8 +86,8 @@ func NewForConfigOrDie(c *unversioned.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c *unversioned.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = core_v1.New(c)
clientset.ExtensionsClient = extensions_v1beta1.New(c)
clientset.CoreClient = v1core.New(c)
clientset.ExtensionsClient = v1beta1extensions.New(c)

clientset.DiscoveryClient = unversioned.NewDiscoveryClient(c)
return &clientset
Expand Down
12 changes: 6 additions & 6 deletions pkg/client/clientset_generated/release_1_2/clientset_adaption.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package release_1_2

import (
core_v1 "k8s.io/kubernetes/pkg/client/typed/generated/core/v1"
extensions_v1beta1 "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1"
v1core "k8s.io/kubernetes/pkg/client/typed/generated/core/v1"
v1beta1extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1"
"k8s.io/kubernetes/pkg/client/unversioned"
)

Expand All @@ -28,14 +28,14 @@ import (
func FromUnversionedClient(c *unversioned.Client) *Clientset {
var clientset Clientset
if c != nil {
clientset.CoreClient = core_v1.New(c.RESTClient)
clientset.CoreClient = v1core.New(c.RESTClient)
} else {
clientset.CoreClient = core_v1.New(nil)
clientset.CoreClient = v1core.New(nil)
}
if c != nil && c.ExtensionsClient != nil {
clientset.ExtensionsClient = extensions_v1beta1.New(c.ExtensionsClient.RESTClient)
clientset.ExtensionsClient = v1beta1extensions.New(c.ExtensionsClient.RESTClient)
} else {
clientset.ExtensionsClient = extensions_v1beta1.New(nil)
clientset.ExtensionsClient = v1beta1extensions.New(nil)
}

return &clientset
Expand Down
16 changes: 8 additions & 8 deletions pkg/client/testing/fake/clientset_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ limitations under the License.
package fake

import (
core_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
core_unversioned_fake "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned/fake"
extensions_unversioned "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
extensions_unversioned_fake "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned/fake"
unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
fakeunversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned/fake"
unversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
fakeunversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned/fake"
)

// Core retrieves the CoreClient
func (c *Clientset) Core() core_unversioned.CoreInterface {
return &core_unversioned_fake.FakeCore{&c.Fake}
func (c *Clientset) Core() unversionedcore.CoreInterface {
return &fakeunversionedcore.FakeCore{&c.Fake}
}

// Extensions retrieves the ExtensionsClient
func (c *Clientset) Extensions() extensions_unversioned.ExtensionsInterface {
return &extensions_unversioned_fake.FakeExtensions{&c.Fake}
func (c *Clientset) Extensions() unversionedextensions.ExtensionsInterface {
return &fakeunversionedextensions.FakeExtensions{&c.Fake}
}
Loading

0 comments on commit 97aecd0

Please sign in to comment.