diff --git a/driver/controller.go b/driver/controller.go index f42c29e2db84dc664c6a6f5e96a139d8a1222010..f2da5ea92595efb0561a9d87fb3920c4091ac554 100644 --- a/driver/controller.go +++ b/driver/controller.go @@ -94,7 +94,7 @@ func (s *ControllerService) CreateVolume(ctx context.Context, req *proto.CreateV AccessibleTopology: []*proto.Topology{ { Segments: map[string]string{ - TopologySegmentLocation: volume.Location, + TopologySegmentLocationLegacy: volume.Location, }, }, }, diff --git a/driver/controller_test.go b/driver/controller_test.go index 7b14042c579312ece6d4d62eb9dd275ada7413cd..1abdb353a1c39f71a7446cdada27560db1bc85b4 100644 --- a/driver/controller_test.go +++ b/driver/controller_test.go @@ -91,7 +91,7 @@ func TestControllerServiceCreateVolume(t *testing.T) { } if len(resp.Volume.AccessibleTopology) == 1 { top := resp.Volume.AccessibleTopology[0] - if loc := top.Segments[TopologySegmentLocation]; loc != "testloc" { + if loc := top.Segments[TopologySegmentLocationLegacy]; loc != "testloc" { t.Errorf("unexpected location segment in topology: %s", loc) } } else { @@ -146,7 +146,7 @@ func TestControllerServiceCreateVolumeWithLocation(t *testing.T) { } if len(resp.Volume.AccessibleTopology) == 1 { top := resp.Volume.AccessibleTopology[0] - if loc := top.Segments[TopologySegmentLocation]; loc != "explicit" { + if loc := top.Segments[TopologySegmentLocationLegacy]; loc != "explicit" { t.Errorf("unexpected location segment in topology: %s", loc) } } else {