зеркало из https://github.com/Azure/azure-cli.git
{RDBMS} az postgres flexible-server create/update: modify the error message for _pg_storage_validator
This commit is contained in:
Родитель
61b92eec28
Коммит
6702433efa
|
@ -389,13 +389,14 @@ def _pg_storage_validator(storage_gb, sku_info, tier, storage_type, iops, throug
|
|||
if instance is not None:
|
||||
original_size = instance.storage.storage_size_gb
|
||||
if original_size > storage_gb:
|
||||
raise CLIError('Updating storage cannot be smaller than the original storage size {} GiB.'
|
||||
.format(original_size))
|
||||
raise CLIError('Decrease of current storage size isn\'t supported. Current storage size is {} GiB \
|
||||
and you\'re trying to set it to {} GiB.'
|
||||
.format(original_size, storage_gb))
|
||||
if not is_ssdv2:
|
||||
storage_sizes = get_postgres_storage_sizes(sku_info, tier)
|
||||
if storage_gb not in storage_sizes:
|
||||
storage_sizes = sorted([int(size) for size in storage_sizes])
|
||||
raise CLIError('Incorrect value for --storage-size : Allowed values(in GiB) : {}'
|
||||
raise CLIError('Incorrect value for --storage-size : Allowed values (in GiB) : {}'
|
||||
.format(storage_sizes))
|
||||
|
||||
# ssdv2 range validation
|
||||
|
|
Загрузка…
Ссылка в новой задаче