Skip to content

Commit

Permalink
Revert "add missing stable changes for minimal tls version from Azure…
Browse files Browse the repository at this point in the history
…/azure-cli#27322"

This reverts commit be4709e.
  • Loading branch information
jcarolyn committed Feb 29, 2024
1 parent 9de20ee commit e8e6279
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/cosmosdb-preview/azext_cosmosdb_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
CreatePhysicalPartitionIdListAction)

from azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models import (
ContinuousTier, DefaultPriorityLevel, MinimalTlsVersion
ContinuousTier, DefaultPriorityLevel
)

from azure.cli.core.util import shell_safe_json_parse
Expand Down Expand Up @@ -343,7 +343,6 @@ def load_arguments(self, _):
c.argument('default_priority_level', arg_type=get_enum_type(DefaultPriorityLevel), help="Default Priority Level of Request if not specified.", is_preview=True)
c.argument('enable_per_region_per_partition_autoscale', arg_type=get_three_state_flag(), help="Enable or disable PerRegionPerPartitionAutoscale.", is_preview=True)
c.argument('enable_partition_merge', arg_type=get_three_state_flag(), help="Flag to enable partition merge on the account.")
c.argument('minimal_tls_version', arg_type=get_enum_type(MinimalTlsVersion), help="Indicates the minimum allowed TLS version")

with self.argument_context('cosmosdb update') as c:
c.argument('key_uri', help="The URI of the key vault", is_preview=True)
Expand Down
18 changes: 6 additions & 12 deletions src/cosmosdb-preview/azext_cosmosdb_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,7 @@ def cli_cosmosdb_create(cmd,
enable_priority_based_execution=None,
default_priority_level=None,
enable_per_region_per_partition_autoscale=None,
enable_partition_merge=None,
minimal_tls_version=None):
enable_partition_merge=None):
"""Create a new Azure Cosmos DB database account."""

from azure.cli.core.commands.client_factory import get_mgmt_service_client
Expand Down Expand Up @@ -840,8 +839,7 @@ def cli_cosmosdb_create(cmd,
enable_priority_based_execution=enable_priority_based_execution,
default_priority_level=default_priority_level,
enable_per_region_per_partition_autoscale=enable_per_region_per_partition_autoscale,
enable_partition_merge=enable_partition_merge
minimal_tls_version=minimal_tls_version)
enable_partition_merge=enable_partition_merge)


# pylint: disable=too-many-branches
Expand Down Expand Up @@ -877,8 +875,7 @@ def cli_cosmosdb_update(client,
enable_priority_based_execution=None,
default_priority_level=None,
enable_per_region_per_partition_autoscale=None,
enable_partition_merge=None,
minimal_tls_version=None):
enable_partition_merge=None):
"""Update an existing Azure Cosmos DB database account. """
existing = client.get(resource_group_name, account_name)

Expand Down Expand Up @@ -969,8 +966,7 @@ def cli_cosmosdb_update(client,
enable_priority_based_execution=enable_priority_based_execution,
default_priority_level=default_priority_level,
enable_per_region_per_partition_autoscale=enable_per_region_per_partition_autoscale,
enable_partition_merge=enable_partition_merge,
minimal_tls_version=minimal_tls_version)
enable_partition_merge=enable_partition_merge)

async_docdb_update = client.begin_update(resource_group_name, account_name, params)
docdb_account = async_docdb_update.result()
Expand Down Expand Up @@ -1180,8 +1176,7 @@ def _create_database_account(client,
default_priority_level=None,
enable_per_region_per_partition_autoscale=None,
disable_ttl=None,
enable_partition_merge=None,
minimal_tls_version=None):
enable_partition_merge=None):
consistency_policy = None
if default_consistency_level is not None:
consistency_policy = ConsistencyPolicy(default_consistency_level=default_consistency_level,
Expand Down Expand Up @@ -1320,8 +1315,7 @@ def _create_database_account(client,
enable_priority_based_execution=enable_priority_based_execution,
default_priority_level=default_priority_level,
enable_per_region_per_partition_autoscale=enable_per_region_per_partition_autoscale,
enable_partition_merge=enable_partition_merge,
minimal_tls_version=minimal_tls_version
enable_partition_merge=enable_partition_merge
)

async_docdb_create = client.begin_create_or_update(resource_group_name, account_name, params)
Expand Down

0 comments on commit e8e6279

Please sign in to comment.