Skip to content

Commit aeca514

Browse files
committed
PowerVS: Remove unused function
When looking at regions, I found this old code. Seeing as it is unused, I removed it instead of updating it.
1 parent e181103 commit aeca514

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

pkg/destroy/powervs/powervs.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -110,36 +110,6 @@ func fetchUserDetails(bxSession *bxsession.Session, generation int) (*User, erro
110110
return &user, nil
111111
}
112112

113-
// GetRegion converts from a zone into a region.
114-
func GetRegion(zone string) (region string, err error) {
115-
err = nil
116-
switch {
117-
case strings.HasPrefix(zone, "dal"), strings.HasPrefix(zone, "us-south"):
118-
region = "us-south"
119-
case strings.HasPrefix(zone, "sao"):
120-
region = "sao"
121-
case strings.HasPrefix(zone, "us-east"):
122-
region = "us-east"
123-
case strings.HasPrefix(zone, "tor"):
124-
region = "tor"
125-
case strings.HasPrefix(zone, "eu-de-"):
126-
region = "eu-de"
127-
case strings.HasPrefix(zone, "lon"):
128-
region = "lon"
129-
case strings.HasPrefix(zone, "syd"):
130-
region = "syd"
131-
case strings.HasPrefix(zone, "tok"):
132-
region = "tok"
133-
case strings.HasPrefix(zone, "osa"):
134-
region = "osa"
135-
case strings.HasPrefix(zone, "mon"):
136-
region = "mon"
137-
default:
138-
return "", fmt.Errorf("region not found for the zone: %s", zone)
139-
}
140-
return
141-
}
142-
143113
// ClusterUninstaller holds the various options for the cluster we want to delete.
144114
type ClusterUninstaller struct {
145115
APIKey string

0 commit comments

Comments
 (0)