Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/dataprotection/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Release History
===============

1.7.1
+++++
* `az dataprotection backup-instance restore initialize-for-item-recovery`: Fixed a bug where the command would fail for AKS Scenarios.

1.7.0
+++++
* Added support for Azure Data Lake Storage as a backup datasource.
Expand Down
28 changes: 15 additions & 13 deletions src/dataprotection/azext_dataprotection/manual/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,22 +543,24 @@ def get_resource_criteria_list(datasource_type, restore_configuration, container
raise RequiredArgumentMissingError("Please input parameter restore_configuration for AKS cluster restore.\n\
Use command initialize-restoreconfig for creating the RestoreConfiguration")
restore_criteria_list.append(restore_criteria)
else:
# For non-AKS workloads (blobs (non-vaulted)), we need either a prefix-pattern or a container-list. Accordingly, the restore
# criteria's min_matching_value and max_matching_value are set. We need to provide one, but can't provide both
# vaulted blobs also take container list or a different prefix pattern format. These also need to be exclusive.
container_list_present = container_list is not None
prefix_pattern_present = (from_prefix_pattern is not None or to_prefix_pattern is not None)
vaulted_pattern_present = vaulted_blob_prefix_pattern is not None
return restore_criteria_list

# implicit else:
# For non-AKS workloads (blobs (non-vaulted)), we need either a prefix-pattern or a container-list. Accordingly, the restore
# criteria's min_matching_value and max_matching_value are set. We need to provide one, but can't provide both
# vaulted blobs also take container list or a different prefix pattern format. These also need to be exclusive.
container_list_present = container_list is not None
prefix_pattern_present = (from_prefix_pattern is not None or to_prefix_pattern is not None)
vaulted_pattern_present = vaulted_blob_prefix_pattern is not None

if are_multiple_true(container_list_present, prefix_pattern_present, vaulted_pattern_present):
raise MutuallyExclusiveArgumentError("Please specify only one of container list, prefix pattern, or "
"vaulted blob's prefix patterns")
if are_multiple_true(container_list_present, prefix_pattern_present, vaulted_pattern_present):
raise MutuallyExclusiveArgumentError("Please specify only one of container list, prefix pattern, or "
"vaulted blob's prefix patterns")

if not any([container_list_present, prefix_pattern_present, vaulted_pattern_present]):
raise RequiredArgumentMissingError("Provide ContainersList or Prefixes for Item Level Recovery")
if not any([container_list_present, prefix_pattern_present, vaulted_pattern_present]):
raise RequiredArgumentMissingError("Provide ContainersList or Prefixes for Item Level Recovery")

# Process based on the provided parameter type
# Process based on the provided parameter type
if container_list_present:
return _process_container_list(container_list, recovery_point_id)

Expand Down
2 changes: 1 addition & 1 deletion src/dataprotection/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from setuptools import setup, find_packages

# HISTORY.rst entry.
VERSION = '1.7.0'
VERSION = '1.7.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
Loading