From a20c2539764f989e647aa6c2c2a1f980a9870d18 Mon Sep 17 00:00:00 2001 From: Connor Doria <128822122+doriac11@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:58:05 -0500 Subject: [PATCH] RCG Snapshot Force Error (#145) - When doing a Create RCG Snapshot, there is no force value in the body of the request. If force is included on POST request it ends in an error and does not create the snapshot. --- inttests/replication_test.go | 2 +- replication.go | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/inttests/replication_test.go b/inttests/replication_test.go index 64c28c9..0060a3e 100644 --- a/inttests/replication_test.go +++ b/inttests/replication_test.go @@ -498,7 +498,7 @@ func TestCreateReplicationConsistencyGroupSnapshot(t *testing.T) { t.Skip("no client connection to replication target system") } - resp, err := rep.rcg.CreateReplicationConsistencyGroupSnapshot(false) + resp, err := rep.rcg.CreateReplicationConsistencyGroupSnapshot() assert.Nil(t, err) t.Logf("Consistency Group Snapshot ID: %s", resp.SnapshotGroupID) diff --git a/replication.go b/replication.go index 69a996c..6e579cd 100644 --- a/replication.go +++ b/replication.go @@ -400,17 +400,14 @@ func (rcg *ReplicationConsistencyGroup) GetReplicationPairs() ([]*types.Replicat } // CreateReplicationConsistencyGroupSnapshot creates a snapshot of the ReplicationConsistencyGroup on the target array. -func (rcg *ReplicationConsistencyGroup) CreateReplicationConsistencyGroupSnapshot(force bool) (*types.CreateReplicationConsistencyGroupSnapshotResp, error) { +func (rcg *ReplicationConsistencyGroup) CreateReplicationConsistencyGroupSnapshot() (*types.CreateReplicationConsistencyGroupSnapshotResp, error) { defer TimeSpent("GetReplicationPairs", time.Now()) uri := "/api/instances/ReplicationConsistencyGroup::" + rcg.ReplicationConsistencyGroup.ID + "/action/createReplicationConsistencyGroupSnapshots" - param := &types.CreateReplicationConsistencyGroupSnapshot{ - Force: force, - } resp := &types.CreateReplicationConsistencyGroupSnapshotResp{} - err := rcg.client.getJSONWithRetry(http.MethodPost, uri, param, resp) + err := rcg.client.getJSONWithRetry(http.MethodPost, uri, types.EmptyPayload{}, resp) return resp, err }