1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

Merge pull request #10135 from AshwinHIBM/lon-survey

OCPBUGS-63710: PowerVS: Fix all zones invalid in lon region
This commit is contained in:
openshift-merge-bot[bot]
2025-12-04 17:46:34 +00:00
committed by GitHub

View File

@@ -136,6 +136,9 @@ func GetZone(region string, defaultZone string) (string, error) {
},
Validate: survey.ComposeValidators(survey.Required, func(ans interface{}) error {
choice := zoneTransform(ans).(core.OptionAnswer).Value
sort.Slice(zones, func(i, j int) bool {
return strings.ToLower(zones[i]) < strings.ToLower(zones[j])
})
i := sort.SearchStrings(zones, choice)
if i == len(zones) || zones[i] != choice {
return fmt.Errorf("invalid zone %q", choice)