Skip to content

Commit

Permalink
Use deferenced disk pointer during volume list
Browse files Browse the repository at this point in the history
Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
  • Loading branch information
mabhi committed Oct 17, 2023
1 parent 1847dd6 commit 069c08f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/blockstorage/azure/azuredisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func (s *AdStorage) VolumesList(ctx context.Context, tags map[string]string, zon
return nil, errors.Wrap(err, "DisksClient.List in VolumesList")
}
for _, disk := range page.Value {
vol, err := s.VolumeParse(ctx, disk)
vol, err := s.VolumeParse(ctx, *disk)
if err != nil {
return nil, errors.Wrap(err, "DisksClient.List in VolumesList, failure in parsing Volume")
}
Expand Down Expand Up @@ -524,7 +524,7 @@ func (s *AdStorage) VolumeCreateFromSnapshot(ctx context.Context, snapshot block
if err != nil {
return nil, errors.Wrapf(err, "DiskCLient.CreateOrUpdate in VolumeCreateFromSnapshot, diskName: %s, snapshotID: %s", diskName, snapshot.ID)
}
return s.VolumeGet(ctx, blockstorage.String(resp.ID), snapshot.Volume.Az)
return s.VolumeParse(ctx, resp.Disk)
}

func (s *AdStorage) getRegionAndZoneID(ctx context.Context, sourceRegion, volAz string) (string, string, error) {
Expand Down

0 comments on commit 069c08f

Please sign in to comment.