From 069c08fe986fd2fe2fdc6ef82ec57b30e667040f Mon Sep 17 00:00:00 2001 From: mabhi Date: Tue, 17 Oct 2023 19:38:30 +0530 Subject: [PATCH] Use deferenced disk pointer during volume list Signed-off-by: mabhi --- pkg/blockstorage/azure/azuredisk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/blockstorage/azure/azuredisk.go b/pkg/blockstorage/azure/azuredisk.go index 861ce70cb92..8c2689cdb86 100644 --- a/pkg/blockstorage/azure/azuredisk.go +++ b/pkg/blockstorage/azure/azuredisk.go @@ -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") } @@ -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) {