Skip to content

Commit

Permalink
remove WellKnownTopologyKey from PV Topology
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbehery committed May 31, 2021
1 parent 93264f6 commit 27add9f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ func newCreateVolumeResponse(disk *cloud.Disk) *csi.CreateVolumeResponse {
}
}

segments := map[string]string{TopologyKey: disk.AvailabilityZone, WellKnownTopologyKey: disk.AvailabilityZone}
segments := map[string]string{TopologyKey: disk.AvailabilityZone}

arn, err := arn.Parse(disk.OutpostArn)

Expand Down
3 changes: 1 addition & 2 deletions pkg/driver/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ func TestCreateVolume(t *testing.T) {
{
Segments: map[string]string{
TopologyKey: expZone,
WellKnownTopologyKey: expZone,
AwsAccountIDKey: outpostArn.AccountID,
AwsOutpostIDKey: outpostArn.Resource,
AwsRegionKey: outpostArn.Region,
Expand Down Expand Up @@ -1231,7 +1230,7 @@ func TestCreateVolume(t *testing.T) {
VolumeContext: map[string]string{},
AccessibleTopology: []*csi.Topology{
{
Segments: map[string]string{TopologyKey: expZone, WellKnownTopologyKey: expZone},
Segments: map[string]string{TopologyKey: expZone},
},
},
}
Expand Down
1 change: 0 additions & 1 deletion pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ func (d *nodeService) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoReque

segments := map[string]string{
TopologyKey: zone,
WellKnownTopologyKey: zone,
}

outpostArn := d.metadata.GetOutpostArn()
Expand Down
3 changes: 0 additions & 3 deletions pkg/driver/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1654,9 +1654,6 @@ func TestNodeGetInfo(t *testing.T) {
if at.Segments[TopologyKey] != tc.availabilityZone {
t.Fatalf("Expected topology %q, got %q", tc.availabilityZone, at.Segments[TopologyKey])
}
if at.Segments[WellKnownTopologyKey] != tc.availabilityZone {
t.Fatalf("Expected well-known topology %q, got %q", tc.availabilityZone, at.Segments[WellKnownTopologyKey])
}

if at.Segments[AwsAccountIDKey] != tc.outpostArn.AccountID {
t.Fatalf("Expected AwsAccountId %q, got %q", tc.outpostArn.AccountID, at.Segments[AwsAccountIDKey])
Expand Down

0 comments on commit 27add9f

Please sign in to comment.