diff --git a/api/mocks/RedfishAPI.go b/api/mocks/RedfishAPI.go index 1c616dc..0750f64 100644 --- a/api/mocks/RedfishAPI.go +++ b/api/mocks/RedfishAPI.go @@ -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 -import ( - context "context" - - client "opendev.org/airship/go-redfish/client" - - http "net/http" - - mock "github.com/stretchr/testify/mock" -) +import client "opendev.org/airship/go-redfish/client" +import context "context" +import http "net/http" +import mock "github.com/stretchr/testify/mock" // RedfishAPI is an autogenerated mock type for the RedfishAPI type type RedfishAPI struct { @@ -758,6 +753,43 @@ func (_m *RedfishAPI) ListSystemsExecute(_a0 client.ApiListSystemsRequest) (clie 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 func (_m *RedfishAPI) ResetSystem(_a0 context.Context, _a1 string) client.ApiResetSystemRequest { ret := _m.Called(_a0, _a1) diff --git a/api/service_interface.go b/api/service_interface.go index cddb58f..9d1335e 100644 --- a/api/service_interface.go +++ b/api/service_interface.go @@ -178,6 +178,14 @@ type RedfishAPI interface { error, ) + ResetIdrac(context.Context, + ) client.ApiResetIdracRequest + + ResetIdracExecute(client.ApiResetIdracRequest, + ) (*http.Response, + error, + ) + ResetSystem(context.Context, string, ) client.ApiResetSystemRequest diff --git a/go.mod b/go.mod index 4480caf..2a6165c 100644 --- a/go.mod +++ b/go.mod @@ -6,5 +6,5 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/stretchr/objx v0.1.1 // indirect 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 ) diff --git a/go.sum b/go.sum index ea5b567..fa179ec 100644 --- a/go.sum +++ b/go.sum @@ -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= 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-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/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=