Skip to content

Commit

Permalink
client-go update by KubeVirt Prow build 1811542289978232832
Browse files Browse the repository at this point in the history
  • Loading branch information
kubevirt-bot committed Jul 12, 2024
1 parent 94b713e commit d5a94ff
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ func (c *FakeVirtualMachines) Restart(ctx context.Context, name string, restartO
return err
}

func (c *FakeVirtualMachines) ForceRestart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error {
_, err := c.Fake.
Invokes(fake2.NewPutSubresourceAction(virtualmachinesResource, c.ns, "restart", name, restartOptions), nil)

return err
}

func (c *FakeVirtualMachines) Start(ctx context.Context, name string, startOptions *v1.StartOptions) error {
_, err := c.Fake.
Invokes(fake2.NewPutSubresourceAction(virtualmachinesResource, c.ns, "start", name, startOptions), nil)
Expand All @@ -73,13 +66,6 @@ func (c *FakeVirtualMachines) Stop(ctx context.Context, name string, stopOptions
return err
}

func (c *FakeVirtualMachines) ForceStop(ctx context.Context, name string, stopOptions *v1.StopOptions) error {
_, err := c.Fake.Fake.
Invokes(fake2.NewPutSubresourceAction(virtualmachinesResource, c.ns, "stop", name, stopOptions), nil)

return err
}

func (c *FakeVirtualMachines) Migrate(ctx context.Context, name string, migrateOptions *v1.MigrateOptions) error {
_, err := c.Fake.
Invokes(fake2.NewPutSubresourceAction(virtualmachinesResource, c.ns, "migrate", name, migrateOptions), nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ type VirtualMachineExpansion interface {
GetWithExpandedSpec(ctx context.Context, name string) (*v1.VirtualMachine, error)
PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, patchOptions metav1.PatchOptions) (*v1.VirtualMachine, error)
Restart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error
ForceRestart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error
Start(ctx context.Context, name string, startOptions *v1.StartOptions) error
Stop(ctx context.Context, name string, stopOptions *v1.StopOptions) error
ForceStop(ctx context.Context, name string, stopOptions *v1.StopOptions) error
Migrate(ctx context.Context, name string, migrateOptions *v1.MigrateOptions) error
AddVolume(ctx context.Context, name string, addVolumeOptions *v1.AddVolumeOptions) error
RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v1.RemoveVolumeOptions) error
Expand Down Expand Up @@ -84,22 +82,6 @@ func (c *virtualMachines) Restart(ctx context.Context, name string, restartOptio
Error()
}

func (c *virtualMachines) ForceRestart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error {
body, err := json.Marshal(restartOptions)
if err != nil {
return fmt.Errorf(cannotMarshalJSONErrFmt, err)
}
return c.client.Put().
AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)).
Namespace(c.ns).
Resource("virtualmachines").
Name(name).
SubResource("restart").
Body(body).
Do(ctx).
Error()
}

func (c *virtualMachines) Start(ctx context.Context, name string, startOptions *v1.StartOptions) error {
optsJson, err := json.Marshal(startOptions)
if err != nil {
Expand Down Expand Up @@ -132,22 +114,6 @@ func (c *virtualMachines) Stop(ctx context.Context, name string, stopOptions *v1
Error()
}

func (c *virtualMachines) ForceStop(ctx context.Context, name string, stopOptions *v1.StopOptions) error {
body, err := json.Marshal(stopOptions)
if err != nil {
return fmt.Errorf(cannotMarshalJSONErrFmt, err)
}
return c.client.Put().
AbsPath(fmt.Sprintf(vmSubresourceURLFmt, v1.ApiStorageVersion)).
Namespace(c.ns).
Resource("virtualmachines").
Name(name).
SubResource("stop").
Body(body).
Do(ctx).
Error()
}

func (c *virtualMachines) Migrate(ctx context.Context, name string, migrateOptions *v1.MigrateOptions) error {
optsJson, err := json.Marshal(migrateOptions)
if err != nil {
Expand Down
20 changes: 0 additions & 20 deletions kubecli/generated_mock_kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -1745,16 +1745,6 @@ func (_mr *_MockVirtualMachineInterfaceRecorder) Restart(arg0, arg1, arg2 interf
return _mr.mock.ctrl.RecordCall(_mr.mock, "Restart", arg0, arg1, arg2)
}

func (_m *MockVirtualMachineInterface) ForceRestart(ctx context.Context, name string, restartOptions *v121.RestartOptions) error {
ret := _m.ctrl.Call(_m, "ForceRestart", ctx, name, restartOptions)
ret0, _ := ret[0].(error)
return ret0
}

func (_mr *_MockVirtualMachineInterfaceRecorder) ForceRestart(arg0, arg1, arg2 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ForceRestart", arg0, arg1, arg2)
}

func (_m *MockVirtualMachineInterface) Start(ctx context.Context, name string, startOptions *v121.StartOptions) error {
ret := _m.ctrl.Call(_m, "Start", ctx, name, startOptions)
ret0, _ := ret[0].(error)
Expand All @@ -1775,16 +1765,6 @@ func (_mr *_MockVirtualMachineInterfaceRecorder) Stop(arg0, arg1, arg2 interface
return _mr.mock.ctrl.RecordCall(_mr.mock, "Stop", arg0, arg1, arg2)
}

func (_m *MockVirtualMachineInterface) ForceStop(ctx context.Context, name string, stopOptions *v121.StopOptions) error {
ret := _m.ctrl.Call(_m, "ForceStop", ctx, name, stopOptions)
ret0, _ := ret[0].(error)
return ret0
}

func (_mr *_MockVirtualMachineInterfaceRecorder) ForceStop(arg0, arg1, arg2 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ForceStop", arg0, arg1, arg2)
}

func (_m *MockVirtualMachineInterface) Migrate(ctx context.Context, name string, migrateOptions *v121.MigrateOptions) error {
ret := _m.ctrl.Call(_m, "Migrate", ctx, name, migrateOptions)
ret0, _ := ret[0].(error)
Expand Down

0 comments on commit d5a94ff

Please sign in to comment.