Skip to content

Commit 6901d28

Browse files
Merge pull request #10135 from AshwinHIBM/lon-survey
OCPBUGS-63710: PowerVS: Fix all zones invalid in lon region
2 parents e07c4ff + bd7888e commit 6901d28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/asset/installconfig/powervs/regions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ func GetZone(region string, defaultZone string) (string, error) {
136136
},
137137
Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error {
138138
choice := zoneTransform(ans).(core.OptionAnswer).Value
139+
sort.Slice(zones, func(i, j int) bool {
140+
return strings.ToLower(zones[i]) < strings.ToLower(zones[j])
141+
})
139142
i := sort.SearchStrings(zones, choice)
140143
if i == len(zones) || zones[i] != choice {
141144
return fmt.Errorf("invalid zone %q", choice)

0 commit comments

Comments
 (0)