experimental. -> extensions.
This commit is contained in:
@@ -45,7 +45,7 @@ func ControllerHasDesiredReplicas(c Interface, controller *api.ReplicationContro
|
||||
|
||||
// JobHasDesiredParallelism returns a condition that will be true if the desired parallelism count
|
||||
// for a job equals the current active counts or is less by an appropriate successful/unsuccessful count.
|
||||
func JobHasDesiredParallelism(c Interface, job *experimental.Job) wait.ConditionFunc {
|
||||
func JobHasDesiredParallelism(c Interface, job *extensions.Job) wait.ConditionFunc {
|
||||
|
||||
return func() (bool, error) {
|
||||
job, err := c.Experimental().Jobs(job.Namespace).Get(job.Name)
|
||||
|
@@ -29,11 +29,11 @@ type DaemonSetsNamespacer interface {
|
||||
}
|
||||
|
||||
type DaemonSetInterface interface {
|
||||
List(selector labels.Selector) (*experimental.DaemonSetList, error)
|
||||
Get(name string) (*experimental.DaemonSet, error)
|
||||
Create(ctrl *experimental.DaemonSet) (*experimental.DaemonSet, error)
|
||||
Update(ctrl *experimental.DaemonSet) (*experimental.DaemonSet, error)
|
||||
UpdateStatus(ctrl *experimental.DaemonSet) (*experimental.DaemonSet, error)
|
||||
List(selector labels.Selector) (*extensions.DaemonSetList, error)
|
||||
Get(name string) (*extensions.DaemonSet, error)
|
||||
Create(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
|
||||
Update(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
|
||||
UpdateStatus(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error)
|
||||
Delete(name string) error
|
||||
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
}
|
||||
@@ -51,36 +51,36 @@ func newDaemonSets(c *ExperimentalClient, namespace string) *daemonSets {
|
||||
// Ensure statically that daemonSets implements DaemonSetsInterface.
|
||||
var _ DaemonSetInterface = &daemonSets{}
|
||||
|
||||
func (c *daemonSets) List(selector labels.Selector) (result *experimental.DaemonSetList, err error) {
|
||||
result = &experimental.DaemonSetList{}
|
||||
func (c *daemonSets) List(selector labels.Selector) (result *extensions.DaemonSetList, err error) {
|
||||
result = &extensions.DaemonSetList{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("daemonsets").LabelsSelectorParam(selector).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Get returns information about a particular daemon set.
|
||||
func (c *daemonSets) Get(name string) (result *experimental.DaemonSet, err error) {
|
||||
result = &experimental.DaemonSet{}
|
||||
func (c *daemonSets) Get(name string) (result *extensions.DaemonSet, err error) {
|
||||
result = &extensions.DaemonSet{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("daemonsets").Name(name).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Create creates a new daemon set.
|
||||
func (c *daemonSets) Create(daemon *experimental.DaemonSet) (result *experimental.DaemonSet, err error) {
|
||||
result = &experimental.DaemonSet{}
|
||||
func (c *daemonSets) Create(daemon *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
|
||||
result = &extensions.DaemonSet{}
|
||||
err = c.r.Post().Namespace(c.ns).Resource("daemonsets").Body(daemon).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update updates an existing daemon set.
|
||||
func (c *daemonSets) Update(daemon *experimental.DaemonSet) (result *experimental.DaemonSet, err error) {
|
||||
result = &experimental.DaemonSet{}
|
||||
func (c *daemonSets) Update(daemon *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
|
||||
result = &extensions.DaemonSet{}
|
||||
err = c.r.Put().Namespace(c.ns).Resource("daemonsets").Name(daemon.Name).Body(daemon).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus updates an existing daemon set status
|
||||
func (c *daemonSets) UpdateStatus(daemon *experimental.DaemonSet) (result *experimental.DaemonSet, err error) {
|
||||
result = &experimental.DaemonSet{}
|
||||
func (c *daemonSets) UpdateStatus(daemon *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
|
||||
result = &extensions.DaemonSet{}
|
||||
err = c.r.Put().Namespace(c.ns).Resource("daemonsets").Name(daemon.Name).SubResource("status").Body(daemon).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
@@ -37,8 +37,8 @@ func TestListDaemonSets(t *testing.T) {
|
||||
Path: testapi.Extensions.ResourcePath(getDSResourceName(), ns, ""),
|
||||
},
|
||||
Response: Response{StatusCode: 200,
|
||||
Body: &experimental.DaemonSetList{
|
||||
Items: []experimental.DaemonSet{
|
||||
Body: &extensions.DaemonSetList{
|
||||
Items: []extensions.DaemonSet{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
@@ -47,7 +47,7 @@ func TestListDaemonSets(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.DaemonSetSpec{
|
||||
Spec: extensions.DaemonSetSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
@@ -66,7 +66,7 @@ func TestGetDaemonSet(t *testing.T) {
|
||||
Request: testRequest{Method: "GET", Path: testapi.Extensions.ResourcePath(getDSResourceName(), ns, "foo"), Query: buildQueryValues(nil)},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.DaemonSet{
|
||||
Body: &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -74,7 +74,7 @@ func TestGetDaemonSet(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.DaemonSetSpec{
|
||||
Spec: extensions.DaemonSetSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
@@ -97,14 +97,14 @@ func TestGetDaemonSetWithNoName(t *testing.T) {
|
||||
|
||||
func TestUpdateDaemonSet(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestDaemonSet := &experimental.DaemonSet{
|
||||
requestDaemonSet := &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"},
|
||||
}
|
||||
c := &testClient{
|
||||
Request: testRequest{Method: "PUT", Path: testapi.Extensions.ResourcePath(getDSResourceName(), ns, "foo"), Query: buildQueryValues(nil)},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.DaemonSet{
|
||||
Body: &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -112,7 +112,7 @@ func TestUpdateDaemonSet(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.DaemonSetSpec{
|
||||
Spec: extensions.DaemonSetSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
@@ -124,14 +124,14 @@ func TestUpdateDaemonSet(t *testing.T) {
|
||||
|
||||
func TestUpdateDaemonSetUpdateStatus(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestDaemonSet := &experimental.DaemonSet{
|
||||
requestDaemonSet := &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"},
|
||||
}
|
||||
c := &testClient{
|
||||
Request: testRequest{Method: "PUT", Path: testapi.Extensions.ResourcePath(getDSResourceName(), ns, "foo") + "/status", Query: buildQueryValues(nil)},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.DaemonSet{
|
||||
Body: &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -139,10 +139,10 @@ func TestUpdateDaemonSetUpdateStatus(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.DaemonSetSpec{
|
||||
Spec: extensions.DaemonSetSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
Status: experimental.DaemonSetStatus{},
|
||||
Status: extensions.DaemonSetStatus{},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -162,14 +162,14 @@ func TestDeleteDaemon(t *testing.T) {
|
||||
|
||||
func TestCreateDaemonSet(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestDaemonSet := &experimental.DaemonSet{
|
||||
requestDaemonSet := &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
}
|
||||
c := &testClient{
|
||||
Request: testRequest{Method: "POST", Path: testapi.Extensions.ResourcePath(getDSResourceName(), ns, ""), Body: requestDaemonSet, Query: buildQueryValues(nil)},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.DaemonSet{
|
||||
Body: &extensions.DaemonSet{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -177,7 +177,7 @@ func TestCreateDaemonSet(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.DaemonSetSpec{
|
||||
Spec: extensions.DaemonSetSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
|
@@ -31,11 +31,11 @@ type DeploymentsNamespacer interface {
|
||||
|
||||
// DeploymentInterface has methods to work with Deployment resources.
|
||||
type DeploymentInterface interface {
|
||||
List(label labels.Selector, field fields.Selector) (*experimental.DeploymentList, error)
|
||||
Get(name string) (*experimental.Deployment, error)
|
||||
List(label labels.Selector, field fields.Selector) (*extensions.DeploymentList, error)
|
||||
Get(name string) (*extensions.Deployment, error)
|
||||
Delete(name string, options *api.DeleteOptions) error
|
||||
Create(Deployment *experimental.Deployment) (*experimental.Deployment, error)
|
||||
Update(Deployment *experimental.Deployment) (*experimental.Deployment, error)
|
||||
Create(Deployment *extensions.Deployment) (*extensions.Deployment, error)
|
||||
Update(Deployment *extensions.Deployment) (*extensions.Deployment, error)
|
||||
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
}
|
||||
|
||||
@@ -54,15 +54,15 @@ func newDeployments(c *ExperimentalClient, namespace string) *deployments {
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) List(label labels.Selector, field fields.Selector) (result *experimental.DeploymentList, err error) {
|
||||
result = &experimental.DeploymentList{}
|
||||
func (c *deployments) List(label labels.Selector, field fields.Selector) (result *extensions.DeploymentList, err error) {
|
||||
result = &extensions.DeploymentList{}
|
||||
err = c.client.Get().Namespace(c.ns).Resource("deployments").LabelsSelectorParam(label).FieldsSelectorParam(field).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
|
||||
func (c *deployments) Get(name string) (result *experimental.Deployment, err error) {
|
||||
result = &experimental.Deployment{}
|
||||
func (c *deployments) Get(name string) (result *extensions.Deployment, err error) {
|
||||
result = &extensions.Deployment{}
|
||||
err = c.client.Get().Namespace(c.ns).Resource("deployments").Name(name).Do().Into(result)
|
||||
return
|
||||
}
|
||||
@@ -80,15 +80,15 @@ func (c *deployments) Delete(name string, options *api.DeleteOptions) error {
|
||||
}
|
||||
|
||||
// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *deployments) Create(deployment *experimental.Deployment) (result *experimental.Deployment, err error) {
|
||||
result = &experimental.Deployment{}
|
||||
func (c *deployments) Create(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
|
||||
result = &extensions.Deployment{}
|
||||
err = c.client.Post().Namespace(c.ns).Resource("deployments").Body(deployment).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *deployments) Update(deployment *experimental.Deployment) (result *experimental.Deployment, err error) {
|
||||
result = &experimental.Deployment{}
|
||||
func (c *deployments) Update(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
|
||||
result = &extensions.Deployment{}
|
||||
err = c.client.Put().Namespace(c.ns).Resource("deployments").Name(deployment.Name).Body(deployment).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ func getDeploymentsResoureName() string {
|
||||
|
||||
func TestDeploymentCreate(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
deployment := experimental.Deployment{
|
||||
deployment := extensions.Deployment{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc",
|
||||
Namespace: ns,
|
||||
@@ -58,7 +58,7 @@ func TestDeploymentCreate(t *testing.T) {
|
||||
|
||||
func TestDeploymentGet(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
deployment := &experimental.Deployment{
|
||||
deployment := &extensions.Deployment{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc",
|
||||
Namespace: ns,
|
||||
@@ -80,8 +80,8 @@ func TestDeploymentGet(t *testing.T) {
|
||||
|
||||
func TestDeploymentList(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
deploymentList := &experimental.DeploymentList{
|
||||
Items: []experimental.Deployment{
|
||||
deploymentList := &extensions.DeploymentList{
|
||||
Items: []extensions.Deployment{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
@@ -105,7 +105,7 @@ func TestDeploymentList(t *testing.T) {
|
||||
|
||||
func TestDeploymentUpdate(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
deployment := &experimental.Deployment{
|
||||
deployment := &extensions.Deployment{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc",
|
||||
Namespace: ns,
|
||||
|
@@ -31,11 +31,11 @@ type HorizontalPodAutoscalersNamespacer interface {
|
||||
|
||||
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
|
||||
type HorizontalPodAutoscalerInterface interface {
|
||||
List(label labels.Selector, field fields.Selector) (*experimental.HorizontalPodAutoscalerList, error)
|
||||
Get(name string) (*experimental.HorizontalPodAutoscaler, error)
|
||||
List(label labels.Selector, field fields.Selector) (*extensions.HorizontalPodAutoscalerList, error)
|
||||
Get(name string) (*extensions.HorizontalPodAutoscaler, error)
|
||||
Delete(name string, options *api.DeleteOptions) error
|
||||
Create(horizontalPodAutoscaler *experimental.HorizontalPodAutoscaler) (*experimental.HorizontalPodAutoscaler, error)
|
||||
Update(horizontalPodAutoscaler *experimental.HorizontalPodAutoscaler) (*experimental.HorizontalPodAutoscaler, error)
|
||||
Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
|
||||
Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
|
||||
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
}
|
||||
|
||||
@@ -54,15 +54,15 @@ func newHorizontalPodAutoscalers(c *ExperimentalClient, namespace string) *horiz
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of horizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) List(label labels.Selector, field fields.Selector) (result *experimental.HorizontalPodAutoscalerList, err error) {
|
||||
result = &experimental.HorizontalPodAutoscalerList{}
|
||||
func (c *horizontalPodAutoscalers) List(label labels.Selector, field fields.Selector) (result *extensions.HorizontalPodAutoscalerList, err error) {
|
||||
result = &extensions.HorizontalPodAutoscalerList{}
|
||||
err = c.client.Get().Namespace(c.ns).Resource("horizontalPodAutoscalers").LabelsSelectorParam(label).FieldsSelectorParam(field).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Get takes the name of the horizontalPodAutoscaler, and returns the corresponding HorizontalPodAutoscaler object, and an error if it occurs
|
||||
func (c *horizontalPodAutoscalers) Get(name string) (result *experimental.HorizontalPodAutoscaler, err error) {
|
||||
result = &experimental.HorizontalPodAutoscaler{}
|
||||
func (c *horizontalPodAutoscalers) Get(name string) (result *extensions.HorizontalPodAutoscaler, err error) {
|
||||
result = &extensions.HorizontalPodAutoscaler{}
|
||||
err = c.client.Get().Namespace(c.ns).Resource("horizontalPodAutoscalers").Name(name).Do().Into(result)
|
||||
return
|
||||
}
|
||||
@@ -81,15 +81,15 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOption
|
||||
}
|
||||
|
||||
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if it occurs.
|
||||
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *experimental.HorizontalPodAutoscaler) (result *experimental.HorizontalPodAutoscaler, err error) {
|
||||
result = &experimental.HorizontalPodAutoscaler{}
|
||||
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
|
||||
result = &extensions.HorizontalPodAutoscaler{}
|
||||
err = c.client.Post().Namespace(c.ns).Resource("horizontalPodAutoscalers").Body(horizontalPodAutoscaler).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if it occurs.
|
||||
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *experimental.HorizontalPodAutoscaler) (result *experimental.HorizontalPodAutoscaler, err error) {
|
||||
result = &experimental.HorizontalPodAutoscaler{}
|
||||
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
|
||||
result = &extensions.HorizontalPodAutoscaler{}
|
||||
err = c.client.Put().Namespace(c.ns).Resource("horizontalPodAutoscalers").Name(horizontalPodAutoscaler.Name).Body(horizontalPodAutoscaler).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ func getHorizontalPodAutoscalersResoureName() string {
|
||||
|
||||
func TestHorizontalPodAutoscalerCreate(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
horizontalPodAutoscaler := experimental.HorizontalPodAutoscaler{
|
||||
horizontalPodAutoscaler := extensions.HorizontalPodAutoscaler{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc",
|
||||
Namespace: ns,
|
||||
@@ -58,7 +58,7 @@ func TestHorizontalPodAutoscalerCreate(t *testing.T) {
|
||||
|
||||
func TestHorizontalPodAutoscalerGet(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
horizontalPodAutoscaler := &experimental.HorizontalPodAutoscaler{
|
||||
horizontalPodAutoscaler := &extensions.HorizontalPodAutoscaler{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc",
|
||||
Namespace: ns,
|
||||
@@ -80,8 +80,8 @@ func TestHorizontalPodAutoscalerGet(t *testing.T) {
|
||||
|
||||
func TestHorizontalPodAutoscalerList(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
horizontalPodAutoscalerList := &experimental.HorizontalPodAutoscalerList{
|
||||
Items: []experimental.HorizontalPodAutoscaler{
|
||||
horizontalPodAutoscalerList := &extensions.HorizontalPodAutoscalerList{
|
||||
Items: []extensions.HorizontalPodAutoscaler{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
@@ -105,7 +105,7 @@ func TestHorizontalPodAutoscalerList(t *testing.T) {
|
||||
|
||||
func TestHorizontalPodAutoscalerUpdate(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
horizontalPodAutoscaler := &experimental.HorizontalPodAutoscaler{
|
||||
horizontalPodAutoscaler := &extensions.HorizontalPodAutoscaler{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "abc",
|
||||
Namespace: ns,
|
||||
|
@@ -31,13 +31,13 @@ type IngressNamespacer interface {
|
||||
|
||||
// IngressInterface exposes methods to work on Ingress resources.
|
||||
type IngressInterface interface {
|
||||
List(label labels.Selector, field fields.Selector) (*experimental.IngressList, error)
|
||||
Get(name string) (*experimental.Ingress, error)
|
||||
Create(ingress *experimental.Ingress) (*experimental.Ingress, error)
|
||||
Update(ingress *experimental.Ingress) (*experimental.Ingress, error)
|
||||
List(label labels.Selector, field fields.Selector) (*extensions.IngressList, error)
|
||||
Get(name string) (*extensions.Ingress, error)
|
||||
Create(ingress *extensions.Ingress) (*extensions.Ingress, error)
|
||||
Update(ingress *extensions.Ingress) (*extensions.Ingress, error)
|
||||
Delete(name string, options *api.DeleteOptions) error
|
||||
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
UpdateStatus(ingress *experimental.Ingress) (*experimental.Ingress, error)
|
||||
UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error)
|
||||
}
|
||||
|
||||
// ingress implements IngressNamespacer interface
|
||||
@@ -52,29 +52,29 @@ func newIngress(c *ExperimentalClient, namespace string) *ingress {
|
||||
}
|
||||
|
||||
// List returns a list of ingress that match the label and field selectors.
|
||||
func (c *ingress) List(label labels.Selector, field fields.Selector) (result *experimental.IngressList, err error) {
|
||||
result = &experimental.IngressList{}
|
||||
func (c *ingress) List(label labels.Selector, field fields.Selector) (result *extensions.IngressList, err error) {
|
||||
result = &extensions.IngressList{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("ingress").LabelsSelectorParam(label).FieldsSelectorParam(field).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Get returns information about a particular ingress.
|
||||
func (c *ingress) Get(name string) (result *experimental.Ingress, err error) {
|
||||
result = &experimental.Ingress{}
|
||||
func (c *ingress) Get(name string) (result *extensions.Ingress, err error) {
|
||||
result = &extensions.Ingress{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("ingress").Name(name).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Create creates a new ingress.
|
||||
func (c *ingress) Create(ingress *experimental.Ingress) (result *experimental.Ingress, err error) {
|
||||
result = &experimental.Ingress{}
|
||||
func (c *ingress) Create(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
|
||||
result = &extensions.Ingress{}
|
||||
err = c.r.Post().Namespace(c.ns).Resource("ingress").Body(ingress).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update updates an existing ingress.
|
||||
func (c *ingress) Update(ingress *experimental.Ingress) (result *experimental.Ingress, err error) {
|
||||
result = &experimental.Ingress{}
|
||||
func (c *ingress) Update(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
|
||||
result = &extensions.Ingress{}
|
||||
err = c.r.Put().Namespace(c.ns).Resource("ingress").Name(ingress.Name).Body(ingress).Do().Into(result)
|
||||
return
|
||||
}
|
||||
@@ -105,8 +105,8 @@ func (c *ingress) Watch(label labels.Selector, field fields.Selector, resourceVe
|
||||
}
|
||||
|
||||
// UpdateStatus takes the name of the ingress and the new status. Returns the server's representation of the ingress, and an error, if it occurs.
|
||||
func (c *ingress) UpdateStatus(ingress *experimental.Ingress) (result *experimental.Ingress, err error) {
|
||||
result = &experimental.Ingress{}
|
||||
func (c *ingress) UpdateStatus(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
|
||||
result = &extensions.Ingress{}
|
||||
err = c.r.Put().Namespace(c.ns).Resource("ingress").Name(ingress.Name).SubResource("status").Body(ingress).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
@@ -38,8 +38,8 @@ func TestListIngress(t *testing.T) {
|
||||
Path: testapi.Extensions.ResourcePath(getIngressResourceName(), ns, ""),
|
||||
},
|
||||
Response: Response{StatusCode: 200,
|
||||
Body: &experimental.IngressList{
|
||||
Items: []experimental.Ingress{
|
||||
Body: &extensions.IngressList{
|
||||
Items: []extensions.Ingress{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
@@ -48,8 +48,8 @@ func TestListIngress(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.IngressSpec{
|
||||
Rules: []experimental.IngressRule{},
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -70,7 +70,7 @@ func TestGetIngress(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Ingress{
|
||||
Body: &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -78,8 +78,8 @@ func TestGetIngress(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.IngressSpec{
|
||||
Rules: []experimental.IngressRule{},
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -101,7 +101,7 @@ func TestGetIngressWithNoName(t *testing.T) {
|
||||
|
||||
func TestUpdateIngress(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestIngress := &experimental.Ingress{
|
||||
requestIngress := &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Namespace: ns,
|
||||
@@ -116,7 +116,7 @@ func TestUpdateIngress(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Ingress{
|
||||
Body: &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -124,8 +124,8 @@ func TestUpdateIngress(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.IngressSpec{
|
||||
Rules: []experimental.IngressRule{},
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -141,13 +141,13 @@ func TestUpdateIngressStatus(t *testing.T) {
|
||||
{IP: "127.0.0.1"},
|
||||
},
|
||||
}
|
||||
requestIngress := &experimental.Ingress{
|
||||
requestIngress := &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Namespace: ns,
|
||||
ResourceVersion: "1",
|
||||
},
|
||||
Status: experimental.IngressStatus{
|
||||
Status: extensions.IngressStatus{
|
||||
LoadBalancer: lbStatus,
|
||||
},
|
||||
}
|
||||
@@ -159,7 +159,7 @@ func TestUpdateIngressStatus(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Ingress{
|
||||
Body: &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -167,10 +167,10 @@ func TestUpdateIngressStatus(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.IngressSpec{
|
||||
Rules: []experimental.IngressRule{},
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{},
|
||||
},
|
||||
Status: experimental.IngressStatus{
|
||||
Status: extensions.IngressStatus{
|
||||
LoadBalancer: lbStatus,
|
||||
},
|
||||
},
|
||||
@@ -196,7 +196,7 @@ func TestDeleteIngress(t *testing.T) {
|
||||
|
||||
func TestCreateIngress(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestIngress := &experimental.Ingress{
|
||||
requestIngress := &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Namespace: ns,
|
||||
@@ -211,7 +211,7 @@ func TestCreateIngress(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Ingress{
|
||||
Body: &extensions.Ingress{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -219,8 +219,8 @@ func TestCreateIngress(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.IngressSpec{
|
||||
Rules: []experimental.IngressRule{},
|
||||
Spec: extensions.IngressSpec{
|
||||
Rules: []extensions.IngressRule{},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@@ -32,13 +32,13 @@ type JobsNamespacer interface {
|
||||
|
||||
// JobInterface exposes methods to work on Job resources.
|
||||
type JobInterface interface {
|
||||
List(label labels.Selector, field fields.Selector) (*experimental.JobList, error)
|
||||
Get(name string) (*experimental.Job, error)
|
||||
Create(job *experimental.Job) (*experimental.Job, error)
|
||||
Update(job *experimental.Job) (*experimental.Job, error)
|
||||
List(label labels.Selector, field fields.Selector) (*extensions.JobList, error)
|
||||
Get(name string) (*extensions.Job, error)
|
||||
Create(job *extensions.Job) (*extensions.Job, error)
|
||||
Update(job *extensions.Job) (*extensions.Job, error)
|
||||
Delete(name string, options *api.DeleteOptions) error
|
||||
Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
|
||||
UpdateStatus(job *experimental.Job) (*experimental.Job, error)
|
||||
UpdateStatus(job *extensions.Job) (*extensions.Job, error)
|
||||
}
|
||||
|
||||
// jobs implements JobsNamespacer interface
|
||||
@@ -56,29 +56,29 @@ func newJobs(c *ExperimentalClient, namespace string) *jobs {
|
||||
var _ JobInterface = &jobs{}
|
||||
|
||||
// List returns a list of jobs that match the label and field selectors.
|
||||
func (c *jobs) List(label labels.Selector, field fields.Selector) (result *experimental.JobList, err error) {
|
||||
result = &experimental.JobList{}
|
||||
func (c *jobs) List(label labels.Selector, field fields.Selector) (result *extensions.JobList, err error) {
|
||||
result = &extensions.JobList{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("jobs").LabelsSelectorParam(label).FieldsSelectorParam(field).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Get returns information about a particular job.
|
||||
func (c *jobs) Get(name string) (result *experimental.Job, err error) {
|
||||
result = &experimental.Job{}
|
||||
func (c *jobs) Get(name string) (result *extensions.Job, err error) {
|
||||
result = &extensions.Job{}
|
||||
err = c.r.Get().Namespace(c.ns).Resource("jobs").Name(name).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Create creates a new job.
|
||||
func (c *jobs) Create(job *experimental.Job) (result *experimental.Job, err error) {
|
||||
result = &experimental.Job{}
|
||||
func (c *jobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
||||
result = &extensions.Job{}
|
||||
err = c.r.Post().Namespace(c.ns).Resource("jobs").Body(job).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update updates an existing job.
|
||||
func (c *jobs) Update(job *experimental.Job) (result *experimental.Job, err error) {
|
||||
result = &experimental.Job{}
|
||||
func (c *jobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
||||
result = &extensions.Job{}
|
||||
err = c.r.Put().Namespace(c.ns).Resource("jobs").Name(job.Name).Body(job).Do().Into(result)
|
||||
return
|
||||
}
|
||||
@@ -109,8 +109,8 @@ func (c *jobs) Watch(label labels.Selector, field fields.Selector, resourceVersi
|
||||
}
|
||||
|
||||
// UpdateStatus takes the name of the job and the new status. Returns the server's representation of the job, and an error, if it occurs.
|
||||
func (c *jobs) UpdateStatus(job *experimental.Job) (result *experimental.Job, err error) {
|
||||
result = &experimental.Job{}
|
||||
func (c *jobs) UpdateStatus(job *extensions.Job) (result *extensions.Job, err error) {
|
||||
result = &extensions.Job{}
|
||||
err = c.r.Put().Namespace(c.ns).Resource("jobs").Name(job.Name).SubResource("status").Body(job).Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
@@ -38,8 +38,8 @@ func TestListJobs(t *testing.T) {
|
||||
Path: testapi.Extensions.ResourcePath(getJobResourceName(), ns, ""),
|
||||
},
|
||||
Response: Response{StatusCode: 200,
|
||||
Body: &experimental.JobList{
|
||||
Items: []experimental.Job{
|
||||
Body: &extensions.JobList{
|
||||
Items: []extensions.Job{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
@@ -48,7 +48,7 @@ func TestListJobs(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.JobSpec{
|
||||
Spec: extensions.JobSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
@@ -70,7 +70,7 @@ func TestGetJob(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Job{
|
||||
Body: &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -78,7 +78,7 @@ func TestGetJob(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.JobSpec{
|
||||
Spec: extensions.JobSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
@@ -101,7 +101,7 @@ func TestGetJobWithNoName(t *testing.T) {
|
||||
|
||||
func TestUpdateJob(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestJob := &experimental.Job{
|
||||
requestJob := &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Namespace: ns,
|
||||
@@ -116,7 +116,7 @@ func TestUpdateJob(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Job{
|
||||
Body: &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -124,7 +124,7 @@ func TestUpdateJob(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.JobSpec{
|
||||
Spec: extensions.JobSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
@@ -136,7 +136,7 @@ func TestUpdateJob(t *testing.T) {
|
||||
|
||||
func TestUpdateJobStatus(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestJob := &experimental.Job{
|
||||
requestJob := &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Namespace: ns,
|
||||
@@ -151,7 +151,7 @@ func TestUpdateJobStatus(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Job{
|
||||
Body: &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -159,10 +159,10 @@ func TestUpdateJobStatus(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.JobSpec{
|
||||
Spec: extensions.JobSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
Status: experimental.JobStatus{
|
||||
Status: extensions.JobStatus{
|
||||
Active: 1,
|
||||
},
|
||||
},
|
||||
@@ -188,7 +188,7 @@ func TestDeleteJob(t *testing.T) {
|
||||
|
||||
func TestCreateJob(t *testing.T) {
|
||||
ns := api.NamespaceDefault
|
||||
requestJob := &experimental.Job{
|
||||
requestJob := &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Namespace: ns,
|
||||
@@ -203,7 +203,7 @@ func TestCreateJob(t *testing.T) {
|
||||
},
|
||||
Response: Response{
|
||||
StatusCode: 200,
|
||||
Body: &experimental.Job{
|
||||
Body: &extensions.Job{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "foo",
|
||||
Labels: map[string]string{
|
||||
@@ -211,7 +211,7 @@ func TestCreateJob(t *testing.T) {
|
||||
"name": "baz",
|
||||
},
|
||||
},
|
||||
Spec: experimental.JobSpec{
|
||||
Spec: extensions.JobSpec{
|
||||
Template: &api.PodTemplateSpec{},
|
||||
},
|
||||
},
|
||||
|
@@ -27,8 +27,8 @@ type ScaleNamespacer interface {
|
||||
|
||||
// ScaleInterface has methods to work with Scale (sub)resources.
|
||||
type ScaleInterface interface {
|
||||
Get(string, string) (*experimental.Scale, error)
|
||||
Update(string, *experimental.Scale) (*experimental.Scale, error)
|
||||
Get(string, string) (*extensions.Scale, error)
|
||||
Update(string, *extensions.Scale) (*extensions.Scale, error)
|
||||
}
|
||||
|
||||
// horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface
|
||||
@@ -46,15 +46,15 @@ func newScales(c *ExperimentalClient, namespace string) *scales {
|
||||
}
|
||||
|
||||
// Get takes the reference to scale subresource and returns the subresource or error, if one occurs.
|
||||
func (c *scales) Get(kind string, name string) (result *experimental.Scale, err error) {
|
||||
result = &experimental.Scale{}
|
||||
func (c *scales) Get(kind string, name string) (result *extensions.Scale, err error) {
|
||||
result = &extensions.Scale{}
|
||||
resource, _ := meta.KindToResource(kind, false)
|
||||
err = c.client.Get().Namespace(c.ns).Resource(resource).Name(name).SubResource("scale").Do().Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *scales) Update(kind string, scale *experimental.Scale) (result *experimental.Scale, err error) {
|
||||
result = &experimental.Scale{}
|
||||
func (c *scales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) {
|
||||
result = &extensions.Scale{}
|
||||
resource, _ := meta.KindToResource(kind, false)
|
||||
err = c.client.Put().
|
||||
Namespace(scale.Namespace).
|
||||
|
@@ -34,48 +34,48 @@ type FakeDaemonSets struct {
|
||||
// Ensure statically that FakeDaemonSets implements DaemonInterface.
|
||||
var _ kClientLib.DaemonSetInterface = &FakeDaemonSets{}
|
||||
|
||||
func (c *FakeDaemonSets) Get(name string) (*experimental.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("daemonsets", c.Namespace, name), &experimental.DaemonSet{})
|
||||
func (c *FakeDaemonSets) Get(name string) (*extensions.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("daemonsets", c.Namespace, name), &extensions.DaemonSet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*experimental.DaemonSet), err
|
||||
return obj.(*extensions.DaemonSet), err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) List(label labels.Selector) (*experimental.DaemonSetList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("daemonsets", c.Namespace, label, nil), &experimental.DaemonSetList{})
|
||||
func (c *FakeDaemonSets) List(label labels.Selector) (*extensions.DaemonSetList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("daemonsets", c.Namespace, label, nil), &extensions.DaemonSetList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*experimental.DaemonSetList), err
|
||||
return obj.(*extensions.DaemonSetList), err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) Create(daemon *experimental.DaemonSet) (*experimental.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("daemonsets", c.Namespace, daemon), &experimental.DaemonSet{})
|
||||
func (c *FakeDaemonSets) Create(daemon *extensions.DaemonSet) (*extensions.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("daemonsets", c.Namespace, daemon), &extensions.DaemonSet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*experimental.DaemonSet), err
|
||||
return obj.(*extensions.DaemonSet), err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) Update(daemon *experimental.DaemonSet) (*experimental.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("daemonsets", c.Namespace, daemon), &experimental.DaemonSet{})
|
||||
func (c *FakeDaemonSets) Update(daemon *extensions.DaemonSet) (*extensions.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("daemonsets", c.Namespace, daemon), &extensions.DaemonSet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*experimental.DaemonSet), err
|
||||
return obj.(*extensions.DaemonSet), err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) UpdateStatus(daemon *experimental.DaemonSet) (*experimental.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("daemonsets", "status", c.Namespace, daemon), &experimental.DaemonSet{})
|
||||
func (c *FakeDaemonSets) UpdateStatus(daemon *extensions.DaemonSet) (*extensions.DaemonSet, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("daemonsets", "status", c.Namespace, daemon), &extensions.DaemonSet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*experimental.DaemonSet), err
|
||||
return obj.(*extensions.DaemonSet), err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) Delete(name string) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("daemonsets", c.Namespace, name), &experimental.DaemonSet{})
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("daemonsets", c.Namespace, name), &extensions.DaemonSet{})
|
||||
return err
|
||||
}
|
||||
|
||||
|
@@ -31,22 +31,22 @@ type FakeDeployments struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) Get(name string) (*experimental.Deployment, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("deployments", c.Namespace, name), &experimental.Deployment{})
|
||||
func (c *FakeDeployments) Get(name string) (*extensions.Deployment, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("deployments", c.Namespace, name), &extensions.Deployment{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Deployment), err
|
||||
return obj.(*extensions.Deployment), err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) List(label labels.Selector, field fields.Selector) (*experimental.DeploymentList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("deployments", c.Namespace, label, field), &experimental.DeploymentList{})
|
||||
func (c *FakeDeployments) List(label labels.Selector, field fields.Selector) (*extensions.DeploymentList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("deployments", c.Namespace, label, field), &extensions.DeploymentList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
list := &experimental.DeploymentList{}
|
||||
for _, deployment := range obj.(*experimental.DeploymentList).Items {
|
||||
list := &extensions.DeploymentList{}
|
||||
for _, deployment := range obj.(*extensions.DeploymentList).Items {
|
||||
if label.Matches(labels.Set(deployment.Labels)) {
|
||||
list.Items = append(list.Items, deployment)
|
||||
}
|
||||
@@ -54,26 +54,26 @@ func (c *FakeDeployments) List(label labels.Selector, field fields.Selector) (*e
|
||||
return list, err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) Create(deployment *experimental.Deployment) (*experimental.Deployment, error) {
|
||||
func (c *FakeDeployments) Create(deployment *extensions.Deployment) (*extensions.Deployment, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("deployments", c.Namespace, deployment), deployment)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Deployment), err
|
||||
return obj.(*extensions.Deployment), err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) Update(deployment *experimental.Deployment) (*experimental.Deployment, error) {
|
||||
func (c *FakeDeployments) Update(deployment *extensions.Deployment) (*extensions.Deployment, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("deployments", c.Namespace, deployment), deployment)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Deployment), err
|
||||
return obj.(*extensions.Deployment), err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("deployments", c.Namespace, name), &experimental.Deployment{})
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("deployments", c.Namespace, name), &extensions.Deployment{})
|
||||
return err
|
||||
}
|
||||
|
||||
|
@@ -31,22 +31,22 @@ type FakeHorizontalPodAutoscalers struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (*experimental.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("horizontalpodautoscalers", c.Namespace, name), &experimental.HorizontalPodAutoscaler{})
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("horizontalpodautoscalers", c.Namespace, name), &extensions.HorizontalPodAutoscaler{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.HorizontalPodAutoscaler), err
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) List(label labels.Selector, field fields.Selector) (*experimental.HorizontalPodAutoscalerList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, label, field), &experimental.HorizontalPodAutoscalerList{})
|
||||
func (c *FakeHorizontalPodAutoscalers) List(label labels.Selector, field fields.Selector) (*extensions.HorizontalPodAutoscalerList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, label, field), &extensions.HorizontalPodAutoscalerList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
list := &experimental.HorizontalPodAutoscalerList{}
|
||||
for _, a := range obj.(*experimental.HorizontalPodAutoscalerList).Items {
|
||||
list := &extensions.HorizontalPodAutoscalerList{}
|
||||
for _, a := range obj.(*extensions.HorizontalPodAutoscalerList).Items {
|
||||
if label.Matches(labels.Set(a.Labels)) {
|
||||
list.Items = append(list.Items, a)
|
||||
}
|
||||
@@ -54,26 +54,26 @@ func (c *FakeHorizontalPodAutoscalers) List(label labels.Selector, field fields.
|
||||
return list, err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(a *experimental.HorizontalPodAutoscaler) (*experimental.HorizontalPodAutoscaler, error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("horizontalpodautoscalers", c.Namespace, a), a)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.HorizontalPodAutoscaler), err
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(a *experimental.HorizontalPodAutoscaler) (*experimental.HorizontalPodAutoscaler, error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("horizontalpodautoscalers", c.Namespace, a), a)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.HorizontalPodAutoscaler), err
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("horizontalpodautoscalers", c.Namespace, name), &experimental.HorizontalPodAutoscaler{})
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("horizontalpodautoscalers", c.Namespace, name), &extensions.HorizontalPodAutoscaler{})
|
||||
return err
|
||||
}
|
||||
|
||||
|
@@ -31,44 +31,44 @@ type FakeIngress struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeIngress) Get(name string) (*experimental.Ingress, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("ingress", c.Namespace, name), &experimental.Ingress{})
|
||||
func (c *FakeIngress) Get(name string) (*extensions.Ingress, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("ingress", c.Namespace, name), &extensions.Ingress{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Ingress), err
|
||||
return obj.(*extensions.Ingress), err
|
||||
}
|
||||
|
||||
func (c *FakeIngress) List(label labels.Selector, fields fields.Selector) (*experimental.IngressList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("ingress", c.Namespace, label, nil), &experimental.IngressList{})
|
||||
func (c *FakeIngress) List(label labels.Selector, fields fields.Selector) (*extensions.IngressList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("ingress", c.Namespace, label, nil), &extensions.IngressList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.IngressList), err
|
||||
return obj.(*extensions.IngressList), err
|
||||
}
|
||||
|
||||
func (c *FakeIngress) Create(ingress *experimental.Ingress) (*experimental.Ingress, error) {
|
||||
func (c *FakeIngress) Create(ingress *extensions.Ingress) (*extensions.Ingress, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("ingress", c.Namespace, ingress), ingress)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Ingress), err
|
||||
return obj.(*extensions.Ingress), err
|
||||
}
|
||||
|
||||
func (c *FakeIngress) Update(ingress *experimental.Ingress) (*experimental.Ingress, error) {
|
||||
func (c *FakeIngress) Update(ingress *extensions.Ingress) (*extensions.Ingress, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("ingress", c.Namespace, ingress), ingress)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Ingress), err
|
||||
return obj.(*extensions.Ingress), err
|
||||
}
|
||||
|
||||
func (c *FakeIngress) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("ingress", c.Namespace, name), &experimental.Ingress{})
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("ingress", c.Namespace, name), &extensions.Ingress{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -76,11 +76,11 @@ func (c *FakeIngress) Watch(label labels.Selector, field fields.Selector, resour
|
||||
return c.Fake.InvokesWatch(NewWatchAction("ingress", c.Namespace, label, field, resourceVersion))
|
||||
}
|
||||
|
||||
func (c *FakeIngress) UpdateStatus(ingress *experimental.Ingress) (result *experimental.Ingress, err error) {
|
||||
func (c *FakeIngress) UpdateStatus(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("ingress", "status", c.Namespace, ingress), ingress)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Ingress), err
|
||||
return obj.(*extensions.Ingress), err
|
||||
}
|
||||
|
@@ -31,44 +31,44 @@ type FakeJobs struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Get(name string) (*experimental.Job, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("jobs", c.Namespace, name), &experimental.Job{})
|
||||
func (c *FakeJobs) Get(name string) (*extensions.Job, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("jobs", c.Namespace, name), &extensions.Job{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Job), err
|
||||
return obj.(*extensions.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) List(label labels.Selector, fields fields.Selector) (*experimental.JobList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("jobs", c.Namespace, label, nil), &experimental.JobList{})
|
||||
func (c *FakeJobs) List(label labels.Selector, fields fields.Selector) (*extensions.JobList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("jobs", c.Namespace, label, nil), &extensions.JobList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.JobList), err
|
||||
return obj.(*extensions.JobList), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Create(job *experimental.Job) (*experimental.Job, error) {
|
||||
func (c *FakeJobs) Create(job *extensions.Job) (*extensions.Job, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("jobs", c.Namespace, job), job)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Job), err
|
||||
return obj.(*extensions.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Update(job *experimental.Job) (*experimental.Job, error) {
|
||||
func (c *FakeJobs) Update(job *extensions.Job) (*extensions.Job, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("jobs", c.Namespace, job), job)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Job), err
|
||||
return obj.(*extensions.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("jobs", c.Namespace, name), &experimental.Job{})
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("jobs", c.Namespace, name), &extensions.Job{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -76,11 +76,11 @@ func (c *FakeJobs) Watch(label labels.Selector, field fields.Selector, resourceV
|
||||
return c.Fake.InvokesWatch(NewWatchAction("jobs", c.Namespace, label, field, resourceVersion))
|
||||
}
|
||||
|
||||
func (c *FakeJobs) UpdateStatus(job *experimental.Job) (result *experimental.Job, err error) {
|
||||
func (c *FakeJobs) UpdateStatus(job *extensions.Job) (result *extensions.Job, err error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("jobs", "status", c.Namespace, job), job)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*experimental.Job), err
|
||||
return obj.(*extensions.Job), err
|
||||
}
|
||||
|
@@ -27,19 +27,19 @@ type FakeScales struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeScales) Get(kind string, name string) (result *experimental.Scale, err error) {
|
||||
func (c *FakeScales) Get(kind string, name string) (result *extensions.Scale, err error) {
|
||||
action := GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.Namespace
|
||||
action.Resource = kind
|
||||
action.Subresource = "scale"
|
||||
action.Name = name
|
||||
obj, err := c.Fake.Invokes(action, &experimental.Scale{})
|
||||
result = obj.(*experimental.Scale)
|
||||
obj, err := c.Fake.Invokes(action, &extensions.Scale{})
|
||||
result = obj.(*extensions.Scale)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *FakeScales) Update(kind string, scale *experimental.Scale) (result *experimental.Scale, err error) {
|
||||
func (c *FakeScales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) {
|
||||
action := UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Namespace = c.Namespace
|
||||
@@ -47,6 +47,6 @@ func (c *FakeScales) Update(kind string, scale *experimental.Scale) (result *exp
|
||||
action.Subresource = "scale"
|
||||
action.Object = scale
|
||||
obj, err := c.Fake.Invokes(action, scale)
|
||||
result = obj.(*experimental.Scale)
|
||||
result = obj.(*extensions.Scale)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user