Forcing visibility parameters to capitilize

This commit is contained in:
Kenny Woodson 2020-04-22 15:07:13 -04:00
Родитель 6979be1dcc
Коммит 6cf5ea0332
2 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -175,6 +175,7 @@ def validate_visibility(key):
def _validate_visibility(namespace):
visibility = getattr(namespace, key)
if visibility is not None:
visibility = visibility.capitalize()
if visibility not in ['Private', 'Public']:
raise CLIError("Invalid --%s '%s'." %
(key.replace('_', '-'), visibility))

Просмотреть файл

@ -70,6 +70,12 @@ def aro_create(cmd, # pylint: disable=too-many-locals
else:
worker_vm_size = worker_vm_size or 'Standard_D4s_v3'
if apiserver_visibility is not None:
apiserver_visibility = apiserver_visibility.capitalize()
if ingress_visibility is not None:
ingress_visibility = ingress_visibility.capitalize()
oc = v2020_04_30.OpenShiftCluster(
location=location,
tags=tags,