Update api module using the latest client module

Change-Id: I59e2cd6b88bd10cb87dedcc24708a3db2d009869
This commit is contained in:
James Gu 2022-08-26 07:09:40 +00:00
parent 470a7752c6
commit 83d92b6fa2
4 changed files with 53 additions and 11 deletions

View File

@ -1,16 +1,11 @@
// Code generated by mockery v2.7.4. DO NOT EDIT. // Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks package mocks
import ( import client "opendev.org/airship/go-redfish/client"
context "context" import context "context"
import http "net/http"
client "opendev.org/airship/go-redfish/client" import mock "github.com/stretchr/testify/mock"
http "net/http"
mock "github.com/stretchr/testify/mock"
)
// RedfishAPI is an autogenerated mock type for the RedfishAPI type // RedfishAPI is an autogenerated mock type for the RedfishAPI type
type RedfishAPI struct { type RedfishAPI struct {
@ -758,6 +753,43 @@ func (_m *RedfishAPI) ListSystemsExecute(_a0 client.ApiListSystemsRequest) (clie
return r0, r1, r2 return r0, r1, r2
} }
// ResetIdrac provides a mock function with given fields: _a0
func (_m *RedfishAPI) ResetIdrac(_a0 context.Context) client.ApiResetIdracRequest {
ret := _m.Called(_a0)
var r0 client.ApiResetIdracRequest
if rf, ok := ret.Get(0).(func(context.Context) client.ApiResetIdracRequest); ok {
r0 = rf(_a0)
} else {
r0 = ret.Get(0).(client.ApiResetIdracRequest)
}
return r0
}
// ResetIdracExecute provides a mock function with given fields: _a0
func (_m *RedfishAPI) ResetIdracExecute(_a0 client.ApiResetIdracRequest) (*http.Response, error) {
ret := _m.Called(_a0)
var r0 *http.Response
if rf, ok := ret.Get(0).(func(client.ApiResetIdracRequest) *http.Response); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(client.ApiResetIdracRequest) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ResetSystem provides a mock function with given fields: _a0, _a1 // ResetSystem provides a mock function with given fields: _a0, _a1
func (_m *RedfishAPI) ResetSystem(_a0 context.Context, _a1 string) client.ApiResetSystemRequest { func (_m *RedfishAPI) ResetSystem(_a0 context.Context, _a1 string) client.ApiResetSystemRequest {
ret := _m.Called(_a0, _a1) ret := _m.Called(_a0, _a1)

View File

@ -178,6 +178,14 @@ type RedfishAPI interface {
error, error,
) )
ResetIdrac(context.Context,
) client.ApiResetIdracRequest
ResetIdracExecute(client.ApiResetIdracRequest,
) (*http.Response,
error,
)
ResetSystem(context.Context, ResetSystem(context.Context,
string, string,
) client.ApiResetSystemRequest ) client.ApiResetSystemRequest

2
go.mod
View File

@ -6,5 +6,5 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/stretchr/objx v0.1.1 // indirect github.com/stretchr/objx v0.1.1 // indirect
github.com/stretchr/testify v1.7.0 github.com/stretchr/testify v1.7.0
opendev.org/airship/go-redfish/client v0.0.0-20210505141832-c442eb5bcb3e opendev.org/airship/go-redfish/client v0.0.0-20220825191957-470a7752c62d
) )

2
go.sum
View File

@ -371,6 +371,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
opendev.org/airship/go-redfish/client v0.0.0-20210505141832-c442eb5bcb3e h1:RrvWcsPCzvvhLbd23dhCdTouUKifp1xMl+uqojqA7Uo= opendev.org/airship/go-redfish/client v0.0.0-20210505141832-c442eb5bcb3e h1:RrvWcsPCzvvhLbd23dhCdTouUKifp1xMl+uqojqA7Uo=
opendev.org/airship/go-redfish/client v0.0.0-20210505141832-c442eb5bcb3e/go.mod h1:I3eEaz4jvG/tlmHdk3dBiZ1HhBxpj+qL3k9Ey1C4BW4= opendev.org/airship/go-redfish/client v0.0.0-20210505141832-c442eb5bcb3e/go.mod h1:I3eEaz4jvG/tlmHdk3dBiZ1HhBxpj+qL3k9Ey1C4BW4=
opendev.org/airship/go-redfish/client v0.0.0-20220825191957-470a7752c62d h1:e1+qJ1IYSc4sjCSoJyxKkCkgHZDMmHwQBDOLbC/1V7s=
opendev.org/airship/go-redfish/client v0.0.0-20220825191957-470a7752c62d/go.mod h1:Ljb94G9G5gP6nHAzYIrZfQOiHNSczfWpgJ9D8jLNWO4=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=