Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -441,7 +441,7 @@ def load_arguments(self, _):
c.argument('default_identity', help="The primary identity to access key vault in CMK related features. e.g. 'FirstPartyIdentity', 'SystemAssignedIdentity' and more.")
c.argument('public_network_access', options_list=['--public-network-access', '-p'], arg_type=get_enum_type(['ENABLED', 'DISABLED']), help="Sets public network access in server to either Enabled or Disabled.")
c.argument('disable_ttl', options_list=['--disable-ttl', '-d'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.")
c.argument('source_backup_location', help="This is the location of the source account where backups are located. Provide this value if the source and target are in different locations.", is_preview=True)
c.argument('source_backup_location', help="This is the location of the source account where backups are located. Provide this value if the source and target are in different locations.")

# Mongo role definition
with self.argument_context('cosmosdb mongodb role definition') as c:
Expand Down
6 changes: 4 additions & 2 deletions src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ def _create_database_account(client,
if disable_ttl is not None:
restore_parameters.restore_with_ttl_disabled = disable_ttl

if source_backup_location is not None:
restore_parameters.source_backup_location = source_backup_location

params = DatabaseAccountCreateUpdateParameters(
location=arm_location,
locations=locations,
Expand Down Expand Up @@ -398,8 +401,7 @@ def _create_database_account(client,
enable_per_region_per_partition_autoscale=enable_prpp_autoscale,
minimal_tls_version=minimal_tls_version,
enable_pbe=enable_pbe,
default_priority_level=default_priority_level,
source_backup_location=source_backup_location
default_priority_level=default_priority_level
)

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ def test_cosmosdb_xrr(self, resource_group):
assert restored_account['writeLocations'][0]['locationName'] == 'North Central US'

# Base account deleted, will be recreated and test enabled in the next release.
@live_only()
@AllowLargeResponse()
@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_cross_region_restore', location='westcentralus')
def test_cosmosdb_xrr_single_region_account(self, resource_group):
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/rdbms/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def _flexible_server_params(command_group):
c.argument('cluster_size', default=None, arg_type=create_node_count_arg_type)
c.argument('zonal_resiliency', arg_type=zonal_resiliency_arg_type, default="Disabled")
c.argument('allow_same_zone', arg_type=allow_same_zone_arg_type, default=False)
c.argument('database_name', arg_type=database_name_create_arg_type)
c.argument('database_name', arg_type=database_name_arg_type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq: why do we need this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were build/linter failures which was not moving ahead without this fix. I asked the CLI team about this they have asked me to fix it. If you see the previous commits, they have failed pipelines due to this.
I know its not our module, but I didnt see a choice.

elif command_group == 'mysql':
c.argument('tier', default='Burstable', arg_type=tier_arg_type)
c.argument('sku_name', default='Standard_B1ms', arg_type=sku_name_arg_type)
Expand Down