Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6f25505
{Style} Refine style framework (#16258)
jiasli Jan 20, 2021
74ea23b
{Role} Remove code for classic events (#16581)
jiasli Jan 20, 2021
eb60100
[Profile] az login: Launch browser in WSL 2 (#16556)
jiasli Jan 20, 2021
ee405d3
{Monitor} Migrate monitor to track2 (#16551)
jsntcy Jan 20, 2021
b1c58d6
{Core} Use semver for azure-mgmt-core (#16074)
jonringer Jan 20, 2021
8b5b4a7
[Compute] New command group sshkey (#16331)
qwordy Jan 20, 2021
0e8d09d
{Role} az ad app credential list: Update help (#14513)
tikicoder Jan 20, 2021
bc02176
{Core} Add util function highlight_command (#16349)
houk-ms Jan 20, 2021
f58842b
Fix webapp nonetype errors (#16605)
calvinsID Jan 21, 2021
b1c1498
[Storage] Fix #16079: public blob gives error (#16578)
Juliehzl Jan 21, 2021
dd891a9
[Storage] GA Storage routing reference (#16550)
Juliehzl Jan 21, 2021
e3ec201
{Doc} Add more examples and install extensions part for airgapped clo…
fengzhou-msft Jan 22, 2021
97107f2
[AppService] az webapp up/create: better error handling of app name w…
calvinsID Jan 22, 2021
1c8caad
{Storage} Configure location mode in client (#16474)
Juliehzl Jan 22, 2021
b4c666c
[Storage] Fix #9158: Cannot generate a working SAS key from a policy …
Juliehzl Jan 22, 2021
58a247f
[KeyVault] `az keyvault key import`: Support `--curve` parameter for …
houk-ms Jan 22, 2021
ca313ac
[BACKUP] Add CRR functionality for IaaSVM and other CRR commands (#16…
akshayneema Jan 25, 2021
80216cc
[Keyvault] Fix #16318: deprecated/removed method in keyvault certific…
christianfosli Jan 25, 2021
8c61223
{Core} Config knack only once (#16634)
jiasli Jan 25, 2021
503c250
{Docs} Roadmap for track2 migration (#16532)
jsntcy Jan 25, 2021
378f521
[NetAppFiles] Update azure-mgmt-netapp version to 0.15.0 (#16467)
Jan 25, 2021
7e2f29a
[ACR] az acr connected-registry install: deprecate ACR_SYNC_TOKEN_USE…
rosanch Jan 26, 2021
2ac42d4
bump urllib3 (#16663)
fengzhou-msft Jan 26, 2021
c7155bb
{Packaging} Pin PyJWT to 1.7.1 (#16594)
jiasli Jan 26, 2021
d73236e
[Synapse] Add customer-managed key related cmdlets (#16224)
sunsw1994 Jan 26, 2021
8134e3b
[Network] Network virtual router rename (#16494)
kairu-ms Jan 27, 2021
ac430e7
[AKS] Add managed cluster stop/start bindings (#16599)
NickKeller Jan 27, 2021
6ab0ebf
{Compute} Update vm create examples (#16670)
qwordy Jan 27, 2021
9928d45
[SQL] Upgrade azure-mgmt-sql to 0.26.0 (#16618)
Juliehzl Jan 27, 2021
2e6a3c6
[Storage] Fix #16489: Upgrade azcopy to 10.8.0 (#16552)
Juliehzl Jan 27, 2021
73e7546
{AKS} AKS to LA final region map update for Azure Monitor for Contain…
bragi92 Jan 27, 2021
9ed4d32
[Extension] Support extension command prefix match for dynamic instal…
fengzhou-msft Jan 27, 2021
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
Prev Previous commit
Next Next commit
[BACKUP] Add CRR functionality for IaaSVM and other CRR commands (Azu…
  • Loading branch information
akshayneema authored Jan 25, 2021
commit ca313acce43fc080938474dda9612767028918fe
3 changes: 3 additions & 0 deletions linter_exclusions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ backup vault backup-properties set:
soft_delete_feature_state:
rule_exclusions:
- option_length_too_long
cross_region_restore_flag:
rule_exclusions:
- option_length_too_long
batch account create:
parameters:
encryption_key_identifier:
Expand Down
29 changes: 29 additions & 0 deletions src/azure-cli/azure/cli/command_modules/backup/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,18 @@ def backup_protected_items_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_protected_items


def backup_protected_items_crr_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_protected_items_crr


def backup_operation_statuses_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_operation_statuses


def crr_operation_status_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).crr_operation_status


def backups_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backups

Expand All @@ -112,6 +120,10 @@ def backup_jobs_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_jobs


def backup_crr_jobs_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_crr_jobs


def backup_workload_items_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_workload_items

Expand All @@ -121,6 +133,10 @@ def job_details_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).job_details


def backup_crr_job_details_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_crr_job_details


def job_cancellations_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).job_cancellations

Expand All @@ -130,13 +146,26 @@ def recovery_points_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).recovery_points


def recovery_points_crr_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).recovery_points_crr


def restores_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).restores


def cross_region_restore_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).cross_region_restore


def item_level_recovery_connections_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).item_level_recovery_connections


def backup_resource_vault_config_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).backup_resource_vault_configs


# Azure Active Directory Client Factories
def aad_properties_cf(cli_ctx, *_):
return _backup_client_factory(cli_ctx).aad_properties
11 changes: 11 additions & 0 deletions src/azure-cli/azure/cli/command_modules/backup/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def load_arguments(self, _):
with self.argument_context('backup vault backup-properties set') as c:
c.argument('backup_storage_redundancy', arg_type=get_enum_type(['GeoRedundant', 'LocallyRedundant']), help='Sets backup storage properties for a Recovery Services vault.')
c.argument('soft_delete_feature_state', arg_type=get_enum_type(['Enable', 'Disable']), help='Set soft-delete feature state for a Recovery Services Vault.')
c.argument('cross_region_restore_flag', arg_type=get_enum_type(['True', 'False']), help='Set cross-region-restore feature state for a Recovery Services Vault. Default: False.')

# Container
with self.argument_context('backup container') as c:
Expand All @@ -87,9 +88,12 @@ def load_arguments(self, _):
with self.argument_context('backup container show') as c:
c.argument('name', container_name_type, options_list=['--name', '-n'], help='Name of the container. You can use the backup container list command to get the name of a container.')
c.argument('backup_management_type', backup_management_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to show container in secondary region.')

with self.argument_context('backup container list') as c:
c.argument('vault_name', vault_name_type, id_part=None)
c.argument('backup_management_type', backup_management_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to list containers in secondary region.')

with self.argument_context('backup container unregister') as c:
c.argument('backup_management_type', backup_management_type)
Expand All @@ -114,6 +118,7 @@ def load_arguments(self, _):
c.argument('name', item_name_type, options_list=['--name', '-n'], help='Name of the backed up item. You can use the backup item list command to get the name of a backed up item.')
c.argument('backup_management_type', backup_management_type)
c.argument('workload_type', workload_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to show item in secondary region.')

# TODO: Need to use item.id once https://github.com/Azure/msrestazure-for-python/issues/80 is fixed.
with self.argument_context('backup item set-policy') as c:
Expand All @@ -126,6 +131,7 @@ def load_arguments(self, _):
c.argument('vault_name', vault_name_type, id_part=None)
c.argument('backup_management_type', arg_type=get_enum_type(allowed_backup_management_types + ["MAB"]), help=backup_management_type_help)
c.argument('workload_type', workload_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to list items in secondary region.')

# Policy
with self.argument_context('backup policy') as c:
Expand Down Expand Up @@ -170,12 +176,14 @@ def load_arguments(self, _):
c.argument('backup_management_type', backup_management_type)
c.argument('container_name', container_name_type)
c.argument('workload_type', workload_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to list recoverypoints in secondary region.')

with self.argument_context('backup recoverypoint show') as c:
c.argument('name', rp_name_type, options_list=['--name', '-n'], help='Name of the recovery point. You can use the backup recovery point list command to get the name of a backed up item.')
c.argument('backup_management_type', backup_management_type)
c.argument('container_name', container_name_type)
c.argument('workload_type', workload_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to show recoverypoints in secondary region.')

# Protection
with self.argument_context('backup protection') as c:
Expand Down Expand Up @@ -251,6 +259,7 @@ def load_arguments(self, _):
c.argument('diskslist', diskslist_type)
c.argument('restore_only_osdisk', arg_type=get_three_state_flag(), help='Use this flag to restore only OS disks of a backed up VM.')
c.argument('restore_as_unmanaged_disks', arg_type=get_three_state_flag(), help='Use this flag to specify to restore as unmanaged disks')
c.argument('use_secondary_region', action='store_true', help='Use this flag to show recoverypoints in secondary region.')

with self.argument_context('backup restore restore-azurefileshare') as c:
c.argument('resolve_conflict', resolve_conflict_type)
Expand Down Expand Up @@ -296,6 +305,7 @@ def load_arguments(self, _):
for command in ['show', 'stop', 'wait']:
with self.argument_context('backup job ' + command) as c:
c.argument('name', job_name_type, help='Name of the job. You can use the backup job list command to get the name of a job.')
c.argument('use_secondary_region', action='store_true', help='Use this flag to show recoverypoints in secondary region.')

with self.argument_context('backup job list') as c:
c.argument('vault_name', vault_name_type, id_part=None)
Expand All @@ -304,6 +314,7 @@ def load_arguments(self, _):
c.argument('start_date', type=datetime_type, help='The start date of the range in UTC (d-m-Y).')
c.argument('end_date', type=datetime_type, help='The end date of the range in UTC (d-m-Y).')
c.argument('backup_management_type', backup_management_type)
c.argument('use_secondary_region', action='store_true', help='Use this flag to show recoverypoints in secondary region.')

with self.argument_context('backup job wait') as c:
c.argument('timeout', type=int, help='Maximum time, in seconds, to wait before aborting.')
Loading