diff --git a/src/dataprotection/HISTORY.rst b/src/dataprotection/HISTORY.rst index 98f99fce80d..1204567e8b5 100644 --- a/src/dataprotection/HISTORY.rst +++ b/src/dataprotection/HISTORY.rst @@ -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. diff --git a/src/dataprotection/azext_dataprotection/manual/helpers.py b/src/dataprotection/azext_dataprotection/manual/helpers.py index 4f5ef2037ba..4ba090b9e3b 100644 --- a/src/dataprotection/azext_dataprotection/manual/helpers.py +++ b/src/dataprotection/azext_dataprotection/manual/helpers.py @@ -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) diff --git a/src/dataprotection/setup.py b/src/dataprotection/setup.py index 5e67a735120..b00e9c8218d 100644 --- a/src/dataprotection/setup.py +++ b/src/dataprotection/setup.py @@ -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