From 1d9df71d3d9b2a33c3196bdc0ae79db3ee49445b Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Fri, 11 Aug 2023 19:11:06 +0300 Subject: [PATCH] feat(storage): change id refs to name Signed-off-by: Boris Glimcher --- storage/frontend.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/frontend.go b/storage/frontend.go index 39f4817..6363318 100644 --- a/storage/frontend.go +++ b/storage/frontend.go @@ -76,7 +76,7 @@ func executeVirtioScsiLun(ctx context.Context, c6 pb.FrontendVirtioScsiServiceCl if rss1.Name != ctrlrName { return fmt.Errorf("server filled value '%s' is not matching user requested '%s'", rss1.Name, ctrlrName) } - rl1, err := c6.CreateVirtioScsiLun(ctx, &pb.CreateVirtioScsiLunRequest{VirtioScsiLunId: resourceID, VirtioScsiLun: &pb.VirtioScsiLun{Name: "", TargetId: &pbc.ObjectKey{Value: resourceID}, VolumeId: &pbc.ObjectKey{Value: "Malloc1"}}}) + rl1, err := c6.CreateVirtioScsiLun(ctx, &pb.CreateVirtioScsiLunRequest{VirtioScsiLunId: resourceID, VirtioScsiLun: &pb.VirtioScsiLun{Name: "", TargetNameRef: resourceID, VolumeNameRef: "Malloc1"}}) if err != nil { return err } @@ -87,7 +87,7 @@ func executeVirtioScsiLun(ctx context.Context, c6 pb.FrontendVirtioScsiServiceCl log.Printf("Added VirtioScsiLun: %v", rl1) rl3, err := c6.UpdateVirtioScsiLun(ctx, &pb.UpdateVirtioScsiLunRequest{ UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"*"}}, - VirtioScsiLun: &pb.VirtioScsiLun{Name: rl1.Name, TargetId: &pbc.ObjectKey{Value: resourceID}, VolumeId: &pbc.ObjectKey{Value: "Malloc1"}}}) + VirtioScsiLun: &pb.VirtioScsiLun{Name: rl1.Name, TargetNameRef: resourceID, VolumeNameRef: "Malloc1"}}) if err != nil { return err } @@ -101,7 +101,7 @@ func executeVirtioScsiLun(ctx context.Context, c6 pb.FrontendVirtioScsiServiceCl if err != nil { return err } - log.Printf("Got VirtioScsiLun: %v", rl5.VolumeId.Value) + log.Printf("Got VirtioScsiLun: %v", rl5.VolumeNameRef) rl6, err := c6.StatsVirtioScsiLun(ctx, &pb.StatsVirtioScsiLunRequest{Name: rl1.Name}) if err != nil { return err