Skip to content

Commit

Permalink
update function arg
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-hpe committed Nov 7, 2024
1 parent ccfc805 commit b0deabd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions pkg/client/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ it currently exists.
*/

func (a *InstancesAPIService) ImportSnapshotOfAnInstance(ctx context.Context, instanceID int,
func (a *InstancesAPIService) ImportSnapshotOfAnInstance(ctx context.Context, instanceID int64,
localVarOptionals *models.ImportSnapshotBody) (models.SuccessOrErrorMessage, error) {
ImportSnapshotResp := models.SuccessOrErrorMessage{}

Expand Down Expand Up @@ -236,7 +236,7 @@ Restarts all VM running within an instance
- @param instanceID
*/
func (a *InstancesAPIService) RestartAnInstance(ctx context.Context,
instanceID int) (models.InstancePowerResponse, error) {
instanceID int64) (models.InstancePowerResponse, error) {
RestartInstResp := models.InstancePowerResponse{}

restartInstAPI := &api{
Expand Down Expand Up @@ -294,7 +294,7 @@ Starts all VM running within an instance
- @param instanceID
*/
func (a *InstancesAPIService) StartAnInstance(ctx context.Context,
instanceID int) (models.InstancePowerResponse, error) {
instanceID int64) (models.InstancePowerResponse, error) {
StartInstanceResp := models.InstancePowerResponse{}

startInstanceAPI := &api{
Expand All @@ -321,7 +321,7 @@ Stops all VM running within an instance
- @param instanceID
*/
func (a *InstancesAPIService) StopAnInstance(ctx context.Context,
instanceID int) (models.InstancePowerResponse, error) {
instanceID int64) (models.InstancePowerResponse, error) {
StopInstanceResp := models.InstancePowerResponse{}

stopInstanceAPI := &api{
Expand All @@ -348,7 +348,7 @@ Suspends all VM running within an instance
- @param instanceID
*/
func (a *InstancesAPIService) SuspendAnInstance(ctx context.Context,
instanceID int) (models.InstancePowerResponse, error) {
instanceID int64) (models.InstancePowerResponse, error) {
SuspendResp := models.InstancePowerResponse{}
suspendInstanceAPI := &api{
method: "PUT",
Expand Down Expand Up @@ -425,7 +425,7 @@ func (a *InstancesAPIService) GetInstanceHistory(
return History, err
}

func (a *InstancesAPIService) CloneAnInstance(ctx context.Context, instanceID int,
func (a *InstancesAPIService) CloneAnInstance(ctx context.Context, instanceID int64,
cloneRequest models.CreateInstanceCloneBody) (models.SuccessOrErrorMessage, error) {
var CloneResp models.SuccessOrErrorMessage
if v, _ := parseVersion("5.2.12"); v <= a.Client.getVersion() {
Expand Down
12 changes: 6 additions & 6 deletions pkg/client/instances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestInstancesAPIService_CloneAnInstance(t *testing.T) {
tests := []struct {
name string
param models.CreateInstanceCloneBody
instanceID int
instanceID int64
given func(m *MockAPIClientHandler)
want models.SuccessOrErrorMessage
wantErr bool
Expand Down Expand Up @@ -490,7 +490,7 @@ func TestInstancesAPIService_ImportSnapshotOfAnInstance(t *testing.T) {

tests := []struct {
name string
instanceID int
instanceID int64
param models.ImportSnapshotBody
given func(m *MockAPIClientHandler)
want models.SuccessOrErrorMessage
Expand Down Expand Up @@ -1617,7 +1617,7 @@ func TestInstancesAPIService_RestartAnInstance(t *testing.T) {

tests := []struct {
name string
instanceID int
instanceID int64
given func(m *MockAPIClientHandler)
want models.InstancePowerResponse
wantErr bool
Expand Down Expand Up @@ -1723,7 +1723,7 @@ func TestInstancesAPIService_StartAnInstance(t *testing.T) {
defer ctrl.Finish()
tests := []struct {
name string
instanceID int
instanceID int64
given func(m *MockAPIClientHandler)
want models.InstancePowerResponse
wantErr bool
Expand Down Expand Up @@ -1829,7 +1829,7 @@ func TestInstancesAPIService_StopAnInstance(t *testing.T) {
defer ctrl.Finish()
tests := []struct {
name string
instanceID int
instanceID int64
given func(m *MockAPIClientHandler)
want models.InstancePowerResponse
wantErr bool
Expand Down Expand Up @@ -1935,7 +1935,7 @@ func TestInstancesAPIService_SuspendAnInstance(t *testing.T) {
defer ctrl.Finish()
tests := []struct {
name string
instanceID int
instanceID int64
given func(m *MockAPIClientHandler)
want models.InstancePowerResponse
wantErr bool
Expand Down

0 comments on commit b0deabd

Please sign in to comment.