Skip to content

Commit

Permalink
feat(storage): change id refs to name
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Aug 11, 2023
1 parent c1a3e1d commit 1d9df71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit 1d9df71

Please sign in to comment.