зеркало из https://github.com/Azure/ARO-RP.git
remove vowels from random strings
This commit is contained in:
Родитель
26cd51d987
Коммит
b16d91a320
|
@ -97,7 +97,7 @@ func (m *Manager) Create(ctx context.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if doc.OpenShiftCluster.Properties.StorageSuffix == "" {
|
if doc.OpenShiftCluster.Properties.StorageSuffix == "" {
|
||||||
doc.OpenShiftCluster.Properties.StorageSuffix, err = randomLowerCaseAlphanumericString(5)
|
doc.OpenShiftCluster.Properties.StorageSuffix, err = randomLowerCaseAlphanumericStringWithNoVowels(5)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -325,8 +325,8 @@ func getRHCOSImage(ctx context.Context) (*azuretypes.Image, error) {
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func randomLowerCaseAlphanumericString(n int) (string, error) {
|
func randomLowerCaseAlphanumericStringWithNoVowels(n int) (string, error) {
|
||||||
return randomString("abcdefghijklmnopqrstuvwxyz0123456789", n)
|
return randomString("bcdfghjklmnpqrstvwxyz0123456789", n)
|
||||||
}
|
}
|
||||||
|
|
||||||
func randomString(letterBytes string, n int) (string, error) {
|
func randomString(letterBytes string, n int) (string, error) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ def aro_create(cmd, # pylint: disable=too-many-locals
|
||||||
subscription_id = get_subscription_id(cmd.cli_ctx)
|
subscription_id = get_subscription_id(cmd.cli_ctx)
|
||||||
|
|
||||||
random_id = ''.join(random.choice(
|
random_id = ''.join(random.choice(
|
||||||
'abcdefghijklmnopqrstuvwxyz0123456789') for _ in range(8))
|
'bcdfghjklmnpqrstvwxyz0123456789') for _ in range(8))
|
||||||
|
|
||||||
aad = AADManager(cmd.cli_ctx)
|
aad = AADManager(cmd.cli_ctx)
|
||||||
if client_id is None:
|
if client_id is None:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче