Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ def _register_network_resource_breaking_change(command_name):
'postgres flexible-server revive-dropped'):
_register_network_resource_breaking_change(network_command)


# High availability command argument changes
register_argument_deprecate('postgres flexible-server create', '--high-availability', redirect='--zonal-resiliency')
register_argument_deprecate('postgres flexible-server update', '--high-availability', redirect='--zonal-resiliency')

# Index Tuning command group renamed to Autonomous Tuning as the feature has expanded to
# include more types of recommendations beyond just index tuning
register_command_group_deprecate(command_group='postgres flexible-server index-tuning',
Comment thread
nasc17 marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ def _flexible_server_params(command_group):
help="The availability zone information of the standby server when high availability is enabled."
Comment thread
nasc17 marked this conversation as resolved.
)

high_availability_arg_type = CLIArgumentType(
arg_type=get_enum_type(['ZoneRedundant', 'SameZone', 'Disabled']),
options_list=['--high-availability'],
help='Enable (ZoneRedundant or SameZone) or disable high availability feature.'
)

zonal_resiliency_arg_type = CLIArgumentType(
arg_type=get_enum_type(['Enabled', 'Disabled']),
options_list=['--zonal-resiliency'],
Expand Down Expand Up @@ -420,7 +414,6 @@ def _flexible_server_params(command_group):
c.argument('location', arg_type=get_location_type(self.cli_ctx))
c.argument('administrator_login', default=generate_username(), arg_type=administrator_login_arg_type)
c.argument('administrator_login_password', arg_type=administrator_login_password_arg_type)
c.argument('high_availability', arg_type=high_availability_arg_type, default="Disabled")
c.argument('public_access', arg_type=public_access_create_arg_type)
c.argument('vnet', arg_type=vnet_arg_type)
c.argument('vnet_address_prefix', arg_type=vnet_address_prefix_arg_type)
Expand Down Expand Up @@ -500,7 +493,6 @@ def _flexible_server_params(command_group):
c.argument('sku_name', arg_type=sku_name_arg_type)
c.argument('storage_gb', arg_type=storage_gb_arg_type)
c.argument('standby_availability_zone', arg_type=standby_availability_zone_arg_type)
c.argument('high_availability', arg_type=high_availability_arg_type)
c.argument('byok_key', arg_type=key_arg_type)
c.argument('byok_identity', arg_type=identity_arg_type)
c.argument('backup_byok_identity', arg_type=backup_identity_arg_type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def flexible_server_create(cmd, client,
password_auth=None, administrator_login=None, administrator_login_password=None,
tags=None, subnet=None, subnet_address_prefix=None, vnet=None, vnet_address_prefix=None,
private_dns_zone_arguments=None, public_access=None,
high_availability=None, zonal_resiliency=None, allow_same_zone=False,
zonal_resiliency=None, allow_same_zone=False,
zone=None, standby_availability_zone=None,
geo_redundant_backup=None, byok_identity=None, byok_key=None, backup_byok_identity=None, backup_byok_key=None,
auto_grow=None, performance_tier=None,
Expand All @@ -94,7 +94,7 @@ def flexible_server_create(cmd, client,
logging_name='PostgreSQL', command_group='postgres', server_client=client, location=location)

server_name = server_name.lower()
high_availability_mode = high_availability
high_availability_mode = "Disabled"

if (sku_name is None) or (version is None) or \
(zonal_resiliency is not None and zonal_resiliency.lower() != 'disabled'):
Expand Down Expand Up @@ -127,7 +127,6 @@ def flexible_server_create(cmd, client,
auto_grow=auto_grow,
storage_type=storage_type,
iops=iops, throughput=throughput,
high_availability=high_availability,
zonal_resiliency=zonal_resiliency,
allow_same_zone=allow_same_zone,
standby_availability_zone=standby_availability_zone,
Expand Down Expand Up @@ -417,7 +416,6 @@ def flexible_server_update_custom_func(cmd, client, instance,
storage_gb=None,
backup_retention=None,
administrator_login_password=None,
high_availability=None,
zonal_resiliency=None,
allow_same_zone=False,
standby_availability_zone=None,
Expand Down Expand Up @@ -449,7 +447,6 @@ def flexible_server_update_custom_func(cmd, client, instance,
auto_grow=auto_grow,
iops=iops,
throughput=throughput,
high_availability=high_availability,
zonal_resiliency=zonal_resiliency,
allow_same_zone=allow_same_zone,
zone=instance.availability_zone,
Expand Down Expand Up @@ -564,6 +561,7 @@ def flexible_server_update_custom_func(cmd, client, instance,

# High availability can't be updated with existing properties
high_availability_param = postgresql_flexibleservers.models.HighAvailability()
high_availability = None
if zonal_resiliency is not None:
Comment thread
nasc17 marked this conversation as resolved.
if zonal_resiliency.lower() == 'disabled':
high_availability = 'Disabled'
Expand Down
Loading
Loading