Skip to content

Commit

Permalink
Updating ONTAP REST API Bindings for 9_16_1
Browse files Browse the repository at this point in the history
  • Loading branch information
aparna0508 committed Sep 11, 2024
1 parent 493e672 commit a871573
Show file tree
Hide file tree
Showing 2,675 changed files with 2,094,194 additions and 267,289 deletions.
3 changes: 2 additions & 1 deletion storage_drivers/ontap/api/abstraction_rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,8 @@ func (d OntapAPIREST) SnapshotDeleteByNameAndStyle(
}

// check snapshot delete job status
snapshotDeleteErr := d.api.PollJobStatus(ctx, snapshotDeleteResult.Payload)
jobLink := getGenericJobLinkFromSnapshotJobLink(snapshotDeleteResult.Payload)
snapshotDeleteErr := d.api.PollJobStatus(ctx, jobLink)
// if err := client.PollJobStatus(ctx, snapshotDeleteResult.Payload); err != nil {
if snapshotDeleteErr != nil {
Logc(ctx).Debugf("Could not delete the snapshot, going to check if it's busy; error was: %v", snapshotDeleteErr)
Expand Down
9 changes: 6 additions & 3 deletions storage_drivers/ontap/api/abstraction_rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,8 @@ func TestSnapshotDeleteByNameAndStyle(t *testing.T) {
jobId := strfmt.UUID("1234")
jobLink := models.JobLink{UUID: &jobId}
jobResponse := models.JobLinkResponse{Job: &jobLink}
snapResponse := storage.SnapshotDeleteAccepted{Payload: &jobResponse}
snapshotJobResponse := models.SnapshotJobLinkResponse{Job: &jobLink}
snapResponse := storage.SnapshotDeleteAccepted{Payload: &snapshotJobResponse}
oapi, rsi := newMockOntapAPIREST(t)

// case 1: Snapshot delete by name
Expand Down Expand Up @@ -3006,7 +3007,8 @@ func TestFlexgroupSnapshotDelete(t *testing.T) {
jobId := strfmt.UUID("1234")
jobLink := models.JobLink{UUID: &jobId}
jobResponse := models.JobLinkResponse{Job: &jobLink}
snapResponse := storage.SnapshotDeleteAccepted{Payload: &jobResponse}
snapshotJobResponse := models.SnapshotJobLinkResponse{Job: &jobLink}
snapResponse := storage.SnapshotDeleteAccepted{Payload: &snapshotJobResponse}
oapi, rsi := newMockOntapAPIREST(t)

// case 1: Flexgroup Snapshot delete
Expand Down Expand Up @@ -3036,7 +3038,8 @@ func TestVolumeSnapshotDelete(t *testing.T) {
jobId := strfmt.UUID("1234")
jobLink := models.JobLink{UUID: &jobId}
jobResponse := models.JobLinkResponse{Job: &jobLink}
snapResponse := storage.SnapshotDeleteAccepted{Payload: &jobResponse}
snapshotJobResponse := models.SnapshotJobLinkResponse{Job: &jobLink}
snapResponse := storage.SnapshotDeleteAccepted{Payload: &snapshotJobResponse}
oapi, rsi := newMockOntapAPIREST(t)

// case 1: Volume Snapshot delete
Expand Down
Loading

0 comments on commit a871573

Please sign in to comment.