From cbbe61d115011acd2cf428e8ee170a7e40010fa0 Mon Sep 17 00:00:00 2001 From: derekwaynecarr Date: Tue, 16 Dec 2014 16:11:45 -0500 Subject: [PATCH] Fix path ordering in client --- pkg/client/endpoints.go | 2 +- pkg/client/events.go | 8 ++++---- pkg/client/replication_controllers.go | 2 +- pkg/client/services.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/client/endpoints.go b/pkg/client/endpoints.go index 0fdea2c0f2d..85e38a1bb2a 100644 --- a/pkg/client/endpoints.go +++ b/pkg/client/endpoints.go @@ -78,8 +78,8 @@ func (c *endpoints) Get(name string) (result *api.Endpoints, err error) { // Watch returns a watch.Interface that watches the requested endpoints for a service. func (c *endpoints) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) { return c.r.Get(). - Namespace(c.ns). Path("watch"). + Namespace(c.ns). Path("endpoints"). Param("resourceVersion", resourceVersion). SelectorParam("labels", label). diff --git a/pkg/client/events.go b/pkg/client/events.go index c0198d91e63..e938d6b451f 100644 --- a/pkg/client/events.go +++ b/pkg/client/events.go @@ -65,8 +65,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) { } result := &api.Event{} err := e.client.Post(). - Path("events"). Namespace(event.Namespace). + Path("events"). Body(event). Do(). Into(result) @@ -77,8 +77,8 @@ func (e *events) Create(event *api.Event) (*api.Event, error) { func (e *events) List(label, field labels.Selector) (*api.EventList, error) { result := &api.EventList{} err := e.client.Get(). - Path("events"). Namespace(e.namespace). + Path("events"). SelectorParam("labels", label). SelectorParam("fields", field). Do(). @@ -94,9 +94,9 @@ func (e *events) Get(name string) (*api.Event, error) { result := &api.Event{} err := e.client.Get(). + Namespace(e.namespace). Path("events"). Path(name). - Namespace(e.namespace). Do(). Into(result) return result, err @@ -106,9 +106,9 @@ func (e *events) Get(name string) (*api.Event, error) { func (e *events) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) { return e.client.Get(). Path("watch"). + Namespace(e.namespace). Path("events"). Param("resourceVersion", resourceVersion). - Namespace(e.namespace). SelectorParam("labels", label). SelectorParam("fields", field). Watch() diff --git a/pkg/client/replication_controllers.go b/pkg/client/replication_controllers.go index 94916951a58..fcde561f367 100644 --- a/pkg/client/replication_controllers.go +++ b/pkg/client/replication_controllers.go @@ -95,8 +95,8 @@ func (c *replicationControllers) Delete(name string) error { // Watch returns a watch.Interface that watches the requested controllers. func (c *replicationControllers) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) { return c.r.Get(). - Namespace(c.ns). Path("watch"). + Namespace(c.ns). Path("replicationControllers"). Param("resourceVersion", resourceVersion). SelectorParam("labels", label). diff --git a/pkg/client/services.go b/pkg/client/services.go index 5fb6316b51e..1a73a726f8d 100644 --- a/pkg/client/services.go +++ b/pkg/client/services.go @@ -95,8 +95,8 @@ func (c *services) Delete(name string) error { // Watch returns a watch.Interface that watches the requested services. func (c *services) Watch(label, field labels.Selector, resourceVersion string) (watch.Interface, error) { return c.r.Get(). - Namespace(c.ns). Path("watch"). + Namespace(c.ns). Path("services"). Param("resourceVersion", resourceVersion). SelectorParam("labels", label).