Skip to content

Commit

Permalink
RCG Snapshot Force Error
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
doriac11 committed Nov 6, 2024
1 parent 02b95d6 commit c895c87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inttests/replication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c895c87

Please sign in to comment.