Skip to content

Commit 1d9df71

Browse files
committed
feat(storage): change id refs to name
Signed-off-by: Boris Glimcher <[email protected]>
1 parent c1a3e1d commit 1d9df71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/frontend.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func executeVirtioScsiLun(ctx context.Context, c6 pb.FrontendVirtioScsiServiceCl
7676
if rss1.Name != ctrlrName {
7777
return fmt.Errorf("server filled value '%s' is not matching user requested '%s'", rss1.Name, ctrlrName)
7878
}
79-
rl1, err := c6.CreateVirtioScsiLun(ctx, &pb.CreateVirtioScsiLunRequest{VirtioScsiLunId: resourceID, VirtioScsiLun: &pb.VirtioScsiLun{Name: "", TargetId: &pbc.ObjectKey{Value: resourceID}, VolumeId: &pbc.ObjectKey{Value: "Malloc1"}}})
79+
rl1, err := c6.CreateVirtioScsiLun(ctx, &pb.CreateVirtioScsiLunRequest{VirtioScsiLunId: resourceID, VirtioScsiLun: &pb.VirtioScsiLun{Name: "", TargetNameRef: resourceID, VolumeNameRef: "Malloc1"}})
8080
if err != nil {
8181
return err
8282
}
@@ -87,7 +87,7 @@ func executeVirtioScsiLun(ctx context.Context, c6 pb.FrontendVirtioScsiServiceCl
8787
log.Printf("Added VirtioScsiLun: %v", rl1)
8888
rl3, err := c6.UpdateVirtioScsiLun(ctx, &pb.UpdateVirtioScsiLunRequest{
8989
UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"*"}},
90-
VirtioScsiLun: &pb.VirtioScsiLun{Name: rl1.Name, TargetId: &pbc.ObjectKey{Value: resourceID}, VolumeId: &pbc.ObjectKey{Value: "Malloc1"}}})
90+
VirtioScsiLun: &pb.VirtioScsiLun{Name: rl1.Name, TargetNameRef: resourceID, VolumeNameRef: "Malloc1"}})
9191
if err != nil {
9292
return err
9393
}
@@ -101,7 +101,7 @@ func executeVirtioScsiLun(ctx context.Context, c6 pb.FrontendVirtioScsiServiceCl
101101
if err != nil {
102102
return err
103103
}
104-
log.Printf("Got VirtioScsiLun: %v", rl5.VolumeId.Value)
104+
log.Printf("Got VirtioScsiLun: %v", rl5.VolumeNameRef)
105105
rl6, err := c6.StatsVirtioScsiLun(ctx, &pb.StatsVirtioScsiLunRequest{Name: rl1.Name})
106106
if err != nil {
107107
return err

0 commit comments

Comments
 (0)