mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Update references from Path() to the appropriate segment use
This commit is contained in:
@@ -55,14 +55,14 @@ func (c *nodes) resourceName() string {
|
||||
// Create creates a new minion.
|
||||
func (c *nodes) Create(minion *api.Node) (*api.Node, error) {
|
||||
result := &api.Node{}
|
||||
err := c.r.Post().Path(c.resourceName()).Body(minion).Do().Into(result)
|
||||
err := c.r.Post().Resource(c.resourceName()).Body(minion).Do().Into(result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
// List lists all the nodes in the cluster.
|
||||
func (c *nodes) List() (*api.NodeList, error) {
|
||||
result := &api.NodeList{}
|
||||
err := c.r.Get().Path(c.resourceName()).Do().Into(result)
|
||||
err := c.r.Get().Resource(c.resourceName()).Do().Into(result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
@@ -73,11 +73,11 @@ func (c *nodes) Get(name string) (*api.Node, error) {
|
||||
}
|
||||
|
||||
result := &api.Node{}
|
||||
err := c.r.Get().Path(c.resourceName()).Path(name).Do().Into(result)
|
||||
err := c.r.Get().Resource(c.resourceName()).Name(name).Do().Into(result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
// Delete deletes an existing minion.
|
||||
func (c *nodes) Delete(name string) error {
|
||||
return c.r.Delete().Path(c.resourceName()).Path(name).Do().Error()
|
||||
return c.r.Delete().Resource(c.resourceName()).Name(name).Do().Error()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user