Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package azure-cli for openSUSE:Factory 
checked in at 2021-09-10 23:40:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli"

Fri Sep 10 23:40:37 2021 rev:32 rq:916059 version:2.27.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli/azure-cli.changes      2021-08-20 
16:57:37.490896358 +0200
+++ /work/SRC/openSUSE:Factory/.azure-cli.new.1899/azure-cli.changes    
2021-09-10 23:40:38.478516614 +0200
@@ -1,0 +2,9 @@
+Wed Aug 25 11:16:13 UTC 2021 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 2.27.2
+  + For detailed information about changes see the
+    HISTORY.rst file provided with this package
+- Update Requires from setup.py
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-2.27.0.tar.gz

New:
----
  azure-cli-2.27.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ azure-cli.spec ++++++
--- /var/tmp/diff_new_pack.N1X60M/_old  2021-09-10 23:40:38.898517061 +0200
+++ /var/tmp/diff_new_pack.N1X60M/_new  2021-09-10 23:40:38.902517065 +0200
@@ -32,7 +32,7 @@
 Name:           azure-cli%{?name_ext}
 %endif
 %define         short_name azure-cli
-Version:        2.27.0
+Version:        2.27.2
 Release:        0
 Summary:        Microsoft Azure CLI 2.0
 License:        MIT
@@ -57,7 +57,7 @@
 Requires:       python3-PyYAML >= 5.1
 Requires:       python3-antlr4-python3-runtime >= 4.7.2
 Requires:       python3-azure-appconfiguration >= 1.1.1
-Requires:       python3-azure-batch >= 10.0
+Requires:       python3-azure-batch >= 11.0
 Requires:       python3-azure-cosmos >= 3.0.2
 Requires:       python3-azure-datalake-store >= 0.0.49
 Requires:       python3-azure-functions-devops-build >= 0.0.22
@@ -71,7 +71,7 @@
 Requires:       python3-azure-mgmt-appconfiguration >= 2.0.0
 Requires:       python3-azure-mgmt-applicationinsights >= 1.0.0
 Requires:       python3-azure-mgmt-authorization >= 0.61.0
-Requires:       python3-azure-mgmt-batch >= 15.0.0
+Requires:       python3-azure-mgmt-batch >= 16.0.0
 Requires:       python3-azure-mgmt-batchai >= 7.0.0b1
 Requires:       python3-azure-mgmt-billing >= 6.0.0
 Requires:       python3-azure-mgmt-botservice >= 0.3.0
@@ -80,7 +80,7 @@
 Requires:       python3-azure-mgmt-compute >= 22.0.0
 Requires:       python3-azure-mgmt-consumption >= 2.0
 Requires:       python3-azure-mgmt-containerinstance >= 1.4
-Requires:       python3-azure-mgmt-containerregistry >= 8.0.0
+Requires:       python3-azure-mgmt-containerregistry >= 8.1.0
 Requires:       python3-azure-mgmt-containerservice >= 16.0.0
 Requires:       python3-azure-mgmt-cosmosdb >= 6.4.0
 Requires:       python3-azure-mgmt-databoxedge >= 1.0.0

++++++ azure-cli-2.27.0.tar.gz -> azure-cli-2.27.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-2.27.0/HISTORY.rst 
new/azure-cli-2.27.2/HISTORY.rst
--- old/azure-cli-2.27.0/HISTORY.rst    2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/HISTORY.rst    2021-08-23 05:32:32.000000000 +0200
@@ -3,6 +3,27 @@
 Release History
 ===============
 
+2.27.2
+++++++
+
+**Cosmos DB**
+
+* Hotfix: `az cosmosdb restore`: Fix the restore command for deleted accounts 
(#19273)
+
+2.27.1
+++++++
+
+**ARM**
+
+* Hotfix: Fix #19124: `az deployment what-if`: Handle unsupported and no 
effect change types (#19144)
+
+**Batch**
+
+Upgrade batch data-plane to [azure-batch 
11.0.0](https://pypi.org/project/azure-batch/) (#19100)
+Upgrade batch management-plane to [azure-batch-mgmt 
16.0.0](https://pypi.org/project/azure-mgmt-batch/16.0.0/) (#19100)
+`az batch location`: Add `list-skus` command to list SKUs available in a 
location (#19100)
+`az batch account`: Add `outbound-endpoints` command to list outbound network 
dependencies (#19100)
+
 2.27.0
 ++++++
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-2.27.0/PKG-INFO 
new/azure-cli-2.27.2/PKG-INFO
--- old/azure-cli-2.27.0/PKG-INFO       2021-07-30 13:20:51.207184000 +0200
+++ new/azure-cli-2.27.2/PKG-INFO       2021-08-23 05:32:42.015753300 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-cli
-Version: 2.27.0
+Version: 2.27.2
 Summary: Microsoft Azure Command-Line Tools
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-2.27.0/azure/cli/__main__.py 
new/azure-cli-2.27.2/azure/cli/__main__.py
--- old/azure-cli-2.27.0/azure/cli/__main__.py  2021-07-30 13:20:39.000000000 
+0200
+++ new/azure-cli-2.27.2/azure/cli/__main__.py  2021-08-23 05:32:32.000000000 
+0200
@@ -17,7 +17,7 @@
 from knack.log import get_logger
 
 __author__ = "Microsoft Corporation <[email protected]>"
-__version__ = "2.27.0"
+__version__ = "2.27.2"
 
 
 # A workaround for https://bugs.python.org/issue32502 
(https://github.com/Azure/azure-cli/issues/5184)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/acr/_params.py 
new/azure-cli-2.27.2/azure/cli/command_modules/acr/_params.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/acr/_params.py       
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/acr/_params.py       
2021-08-23 05:32:32.000000000 +0200
@@ -78,6 +78,7 @@
         c.argument('cmd', options_list=['--__cmd__'])
         c.argument('cmd_value', help="Commands to execute.", 
options_list=['--cmd'])
         c.argument('zone_redundancy', is_preview=True, 
arg_type=get_enum_type(ZoneRedundancy), help="Indicates whether or not zone 
redundancy should be enabled for this registry or replication. For more 
information, such as supported locations, please visit https://aka.ms/acr/az. 
Zone-redundancy cannot be updated. Defaults to 'Disabled'.")
+        c.argument('allow_exports', arg_type=get_three_state_flag(), 
is_preview=True, help="Configure exportPolicy to allow/disallow artifacts from 
being exported from this registry. Artifacts can be exported via import or 
transfer operations. For more information, please visit 
https://aka.ms/acr/export-policy.";)
 
     for scope in ['acr create', 'acr update']:
         with self.argument_context(scope, arg_group='Network Rule') as c:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/acr/custom.py 
new/azure-cli-2.27.2/azure/cli/command_modules/acr/custom.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/acr/custom.py        
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/acr/custom.py        
2021-08-23 05:32:32.000000000 +0200
@@ -3,6 +3,8 @@
 # Licensed under the MIT License. See License.txt in the project root for 
license information.
 # 
--------------------------------------------------------------------------------------------
 
+# pylint: disable=too-many-locals
+
 from knack.util import CLIError
 from knack.log import get_logger
 from azure.cli.core.util import user_confirmation
@@ -51,6 +53,7 @@
                public_network_enabled=None,
                zone_redundancy=None,
                allow_trusted_services=None,
+               allow_exports=None,
                tags=None):
 
     if default_action and sku not in get_premium_sku(cmd):
@@ -72,6 +75,7 @@
         _configure_cmk(cmd, registry, resource_group_name, identity, 
key_encryption_key)
 
     _handle_network_bypass(cmd, registry, allow_trusted_services)
+    _handle_export_policy(cmd, registry, allow_exports)
 
     lro_poller = client.begin_create(resource_group_name, registry_name, 
registry)
 
@@ -112,6 +116,7 @@
                       public_network_enabled=None,
                       allow_trusted_services=None,
                       anonymous_pull_enabled=None,
+                      allow_exports=None,
                       tags=None):
     if sku is not None:
         Sku = cmd.get_models('Sku')
@@ -137,6 +142,7 @@
         instance.anonymous_pull_enabled = anonymous_pull_enabled
 
     _handle_network_bypass(cmd, instance, allow_trusted_services)
+    _handle_export_policy(cmd, instance, allow_exports)
 
     return instance
 
@@ -153,6 +159,20 @@
                                                 if allow_trusted_services else 
NetworkRuleBypassOptions.none)
 
 
+def _handle_export_policy(cmd, registry, allow_exports):
+    if allow_exports is not None:
+        Policies, ExportPolicy, ExportPolicyStatus = 
cmd.get_models('Policies', 'ExportPolicy', 'ExportPolicyStatus')
+
+        if registry.policies is None:
+            registry.policies = Policies()
+
+        status = ExportPolicyStatus.DISABLED if not allow_exports else 
ExportPolicyStatus.ENABLED
+        try:
+            registry.policies.export_policy.status = status
+        except AttributeError:
+            registry.policies.export_policy = ExportPolicy(status=status)
+
+
 def acr_update_get(cmd):
     """Returns an empty RegistryUpdateParameters object.
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/acs/_help.py 
new/azure-cli-2.27.2/azure/cli/command_modules/acs/_help.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/acs/_help.py 2021-07-30 
13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/acs/_help.py 2021-08-23 
05:32:32.000000000 +0200
@@ -780,7 +780,7 @@
     short-summary: Size in GB of the OS disk for each node in the agent pool. 
Minimum 30 GB.
   - name: --node-osdisk-type
     type: string
-    short-summary: OS disk type to be used for machines in a given agent pool. 
Defaults to 'Ephemeral' when possible in conjunction with VM size and OS disk 
size. May not be changed for this pool after creation.
+    short-summary: OS disk type to be used for machines in a given agent pool. 
Defaults to 'Ephemeral' when possible in conjunction with VM size and OS disk 
size. May not be changed for this pool after creation. ('Ephemeral' or 
'Managed')
   - name: --max-pods -m
     type: int
     short-summary: The maximum number of pods deployable to a node.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/acs/custom.py 
new/azure-cli-2.27.2/azure/cli/command_modules/acs/custom.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/acs/custom.py        
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/acs/custom.py        
2021-08-23 05:32:32.000000000 +0200
@@ -1223,7 +1223,7 @@
     current_context = addition.get('current-context', 'UNKNOWN')
     msg = 'Merged "{}" as current context in {}'.format(
         current_context, existing_file)
-    print(msg)
+    logger.warning(msg)
 
 
 def _get_host_name(acs_info):
@@ -1633,6 +1633,8 @@
         raise CLIError("Failed to check the ACR: {}".format(err))
     if output:
         print(output)
+        if os.getenv("PYTEST_CURRENT_TEST", None):
+            return output
     else:
         raise CLIError("Failed to check the ACR.")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/batch/_client_factory.py 
new/azure-cli-2.27.2/azure/cli/command_modules/batch/_client_factory.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/batch/_client_factory.py     
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/batch/_client_factory.py     
2021-08-23 05:32:33.000000000 +0200
@@ -59,9 +59,9 @@
 
 
 def batch_client_factory(cli_ctx, **_):
-    from azure.mgmt.batch import BatchManagement
+    from azure.mgmt.batch import BatchManagementClient
     from azure.cli.core.commands.client_factory import get_mgmt_service_client
-    return get_mgmt_service_client(cli_ctx, BatchManagement)
+    return get_mgmt_service_client(cli_ctx, BatchManagementClient)
 
 
 def batch_data_service_factory(cli_ctx, kwargs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/batch/_help.py 
new/azure-cli-2.27.2/azure/cli/command_modules/batch/_help.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/batch/_help.py       
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/batch/_help.py       
2021-08-23 05:32:33.000000000 +0200
@@ -68,6 +68,12 @@
     crafted: true
 """
 
+helps['batch account outbound-endpoints'] = """
+type: command
+short-summary: List an account's outbound network dependencies.
+long-summary: List the endpoints that a Batch Compute Node under this Batch 
Account may call as part of Batch service administration. If you are deploying 
a Pool inside of a virtual network that you specify, you must make sure your 
network allows outbound access to these endpoints. Failure to allow access to 
these endpoints may cause Batch to mark the affected nodes as unusable. For 
more information about creating a pool inside of a virtual network, see 
https://docs.microsoft.com/azure/batch/batch-virtual-network.";
+"""
+
 helps['batch application'] = """
 type: group
 short-summary: Manage Batch applications.
@@ -162,6 +168,17 @@
 short-summary: Update the properties of a Batch job. Unspecified properties 
which can be updated are reset to their defaults.
 """
 
+helps['batch job stop'] = """
+type: command
+short-summary: Stop a running Batch job.
+long-summary: Terminate the specified job, marking it as completed. When a 
Terminate Job request is received, the Batch service sets the job to the 
terminating state. The Batch service then terminates any running tasks 
associated with the job and runs any required job release tasks. Then the job 
moves into the completed state. If there are any tasks in the job in the active 
state, they will remain in the active state. Once a job is terminated, new 
tasks cannot be added and any remaining active tasks will not be scheduled.
+parameters:
+  - name: --terminate-reason
+    type: string
+    short-summary: Termination reason
+    long-summary: The text you want to appear as the job's TerminateReason. 
The default is 'UserTerminate'
+"""
+
 helps['batch job set'] = """
 type: command
 short-summary: Update the properties of a Batch job. Updating a property in a 
subgroup will reset the unspecified properties of that group.
@@ -203,6 +220,11 @@
 short-summary: Manage Batch service quotas at the region level.
 """
 
+helps['batch location list-skus'] = """
+type: command
+short-summary: List virtual machine SKUs available in a location.
+"""
+
 helps['batch node'] = """
 type: group
 short-summary: Manage Batch compute nodes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/batch/_params.py 
new/azure-cli-2.27.2/azure/cli/command_modules/batch/_params.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/batch/_params.py     
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/batch/_params.py     
2021-08-23 05:32:33.000000000 +0200
@@ -109,7 +109,10 @@
             c.argument('f_ormat', options_list=('--format',), help="The format 
of the application package binary file.")
 
     with self.argument_context('batch location quotas show') as c:
-        c.argument('location_name', get_location_type(self.cli_ctx), help='The 
region from which to display the Batch service quotas.')
+        c.argument('location_name', get_location_type(self.cli_ctx), help='The 
region for which to display the Batch service quotas.')
+
+    with self.argument_context('batch location list-skus') as c:
+        c.argument('location_name', get_location_type(self.cli_ctx), help='The 
region for which to display the available Batch VM SKUs.')
 
     for command in ['list', 'show', 'create', 'set', 'delete', 'package']:
         with self.argument_context('batch application {}'.format(command)) as 
c:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/batch/_validators.py 
new/azure-cli-2.27.2/azure/cli/command_modules/batch/_validators.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/batch/_validators.py 
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/batch/_validators.py 
2021-08-23 05:32:33.000000000 +0200
@@ -166,10 +166,10 @@
 
 def application_enabled(cmd, namespace):
     """Validates account has auto-storage enabled"""
-    from azure.mgmt.batch import BatchManagement
+    from azure.mgmt.batch import BatchManagementClient
     from azure.cli.core.commands.client_factory import get_mgmt_service_client
 
-    client = get_mgmt_service_client(cmd.cli_ctx, BatchManagement)
+    client = get_mgmt_service_client(cmd.cli_ctx, BatchManagementClient)
     acc = client.batch_account.get(namespace.resource_group_name, 
namespace.account_name)
     if not acc:
         raise ValueError("Batch account '{}' not 
found.".format(namespace.account_name))
@@ -294,7 +294,7 @@
 
 def validate_client_parameters(cmd, namespace):
     """Retrieves Batch connection parameters from environment variables"""
-    from azure.mgmt.batch import BatchManagement
+    from azure.mgmt.batch import BatchManagementClient
     from azure.cli.core.commands.client_factory import get_mgmt_service_client
 
     # simply try to retrieve the remaining variables from environment variables
@@ -315,7 +315,7 @@
         if cmd.cli_ctx.config.get('batch', 'auth_mode', 'shared_key') == 
'shared_key':
             endpoint = urlsplit(namespace.account_endpoint)
             host = endpoint.netloc
-            client = get_mgmt_service_client(cmd.cli_ctx, BatchManagement)
+            client = get_mgmt_service_client(cmd.cli_ctx, 
BatchManagementClient)
             acc = next((x for x in client.batch_account.list()
                         if x.name == namespace.account_name and 
x.account_endpoint == host), None)
             if acc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/batch/commands.py 
new/azure-cli-2.27.2/azure/cli/command_modules/batch/commands.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/batch/commands.py    
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/batch/commands.py    
2021-08-23 05:32:33.000000000 +0200
@@ -60,6 +60,7 @@
         g.command('keys list', 'get_keys', 
table_transformer=account_keys_list_table_format)
         # g.command('keys renew', 'regenerate_key', 
table_transformer=account_keys_renew_table_format)
         g.custom_command('keys renew', 'renew_accounts_keys', 
table_transformer=account_keys_renew_table_format)
+        g.command('outbound-endpoints', 
'list_outbound_network_dependencies_endpoints')
 
     with self.command_group('batch application', get_mgmt_type('application'), 
client_factory=get_mgmt_factory('application')) as g:
         g.command('list', 'list', 
table_transformer=application_list_table_format)
@@ -79,6 +80,9 @@
     with self.command_group('batch location quotas', 
get_mgmt_type('location')) as g:
         g.show_command('show', 'get_quotas')
 
+    with self.command_group('batch location', get_mgmt_type('location')) as g:
+        g.show_command('list-skus', 'list_supported_virtual_machine_skus')
+
     # Data Plane Commands
     with self.command_group('batch application summary', 
get_data_type('application')) as g:
         g.batch_command('list', 'list')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/batch/custom.py 
new/azure-cli-2.27.2/azure/cli/command_modules/batch/custom.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/batch/custom.py      
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/batch/custom.py      
2021-08-23 05:32:33.000000000 +0200
@@ -11,7 +11,7 @@
 
 from msrest.exceptions import DeserializationError
 
-from azure.mgmt.batch import BatchManagement
+from azure.mgmt.batch import BatchManagementClient
 from azure.mgmt.batch.models import (BatchAccountCreateParameters, 
BatchAccountUpdateParameters,
                                      AutoStorageBaseProperties, 
ActivateApplicationPackageParameters,
                                      Application, EncryptionProperties,
@@ -223,7 +223,7 @@
                                resource_group_name, account_name, 
application_name, version_name,
                                package_file):
     # create application if not exist
-    mgmt_client = get_mgmt_service_client(cmd.cli_ctx, BatchManagement)
+    mgmt_client = get_mgmt_service_client(cmd.cli_ctx, BatchManagementClient)
     try:
         mgmt_client.application.get(resource_group_name, account_name, 
application_name)
     except Exception:  # pylint:disable=broad-except
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/cosmosdb/custom.py 
new/azure-cli-2.27.2/azure/cli/command_modules/cosmosdb/custom.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/cosmosdb/custom.py   
2021-07-30 13:20:39.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/cosmosdb/custom.py   
2021-08-23 05:32:33.000000000 +0200
@@ -1615,11 +1615,13 @@
     if restore_timestamp_datetime_utc > current_dateTime:
         raise CLIError("Restore timestamp {} should be less than current 
timestamp {}".format(restore_timestamp_datetime_utc, current_dateTime))
 
+    is_source_restorable_account_deleted = False
     for account in restorable_database_accounts_list:
         if account.account_name == account_name:
             if account.deletion_time is not None:
                 if account.deletion_time >= restore_timestamp_datetime_utc >= 
account.creation_time:
                     target_restorable_account = account
+                    is_source_restorable_account_deleted = True
                     break
             else:
                 if restore_timestamp_datetime_utc >= account.creation_time:
@@ -1629,35 +1631,36 @@
     if target_restorable_account is None:
         raise CLIError("Cannot find a database account with name {} that is 
online at {}".format(account_name, restore_timestamp))
 
-    # Validate if source account is empty
-    restorable_resources = None
-    if target_restorable_account.api_type.lower() == "sql":
-        try:
-            from azure.cli.command_modules.cosmosdb._client_factory import 
cf_restorable_sql_resources
-            restorable_sql_resources_client = 
cf_restorable_sql_resources(cmd.cli_ctx, [])
-            restorable_resources = restorable_sql_resources_client.list(
-                target_restorable_account.location,
-                target_restorable_account.name,
-                location,
-                restore_timestamp_datetime_utc)
-        except ResourceNotFoundError:
-            raise CLIError("Cannot find a database account with name {} that 
is online at {} in location {}".format(account_name, restore_timestamp, 
location))
-    elif target_restorable_account.api_type.lower() == "mongodb":
-        try:
-            from azure.cli.command_modules.cosmosdb._client_factory import 
cf_restorable_mongodb_resources
-            restorable_mongodb_resources_client = 
cf_restorable_mongodb_resources(cmd.cli_ctx, [])
-            restorable_resources = restorable_mongodb_resources_client.list(
-                target_restorable_account.location,
-                target_restorable_account.name,
-                location,
-                restore_timestamp_datetime_utc)
-        except ResourceNotFoundError:
-            raise CLIError("Cannot find a database account with name {} that 
is online at {} in location {}".format(account_name, restore_timestamp, 
location))
-    else:
-        raise CLIError("Provided API Type {} is not supported for account 
{}".format(target_restorable_account.api_type, account_name))
+    # Validate if source account is empty only for live account restores. For 
deleted account restores the api will not work
+    if not is_source_restorable_account_deleted:
+        restorable_resources = None
+        if target_restorable_account.api_type.lower() == "sql":
+            try:
+                from azure.cli.command_modules.cosmosdb._client_factory import 
cf_restorable_sql_resources
+                restorable_sql_resources_client = 
cf_restorable_sql_resources(cmd.cli_ctx, [])
+                restorable_resources = restorable_sql_resources_client.list(
+                    target_restorable_account.location,
+                    target_restorable_account.name,
+                    location,
+                    restore_timestamp_datetime_utc)
+            except ResourceNotFoundError:
+                raise CLIError("Cannot find a database account with name {} 
that is online at {} in location {}".format(account_name, restore_timestamp, 
location))
+        elif target_restorable_account.api_type.lower() == "mongodb":
+            try:
+                from azure.cli.command_modules.cosmosdb._client_factory import 
cf_restorable_mongodb_resources
+                restorable_mongodb_resources_client = 
cf_restorable_mongodb_resources(cmd.cli_ctx, [])
+                restorable_resources = 
restorable_mongodb_resources_client.list(
+                    target_restorable_account.location,
+                    target_restorable_account.name,
+                    location,
+                    restore_timestamp_datetime_utc)
+            except ResourceNotFoundError:
+                raise CLIError("Cannot find a database account with name {} 
that is online at {} in location {}".format(account_name, restore_timestamp, 
location))
+        else:
+            raise CLIError("Provided API Type {} is not supported for account 
{}".format(target_restorable_account.api_type, account_name))
 
-    if restorable_resources is None or not any(restorable_resources):
-        raise CLIError("Database account {} contains no restorable resources 
in location {} at given restore timestamp {}".format(target_restorable_account, 
location, restore_timestamp_datetime_utc))
+        if restorable_resources is None or not any(restorable_resources):
+            raise CLIError("Database account {} contains no restorable 
resources in location {} at given restore timestamp 
{}".format(target_restorable_account, location, restore_timestamp_datetime_utc))
 
     # Trigger restore
     locations = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/network/custom.py 
new/azure-cli-2.27.2/azure/cli/command_modules/network/custom.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/network/custom.py    
2021-07-30 13:20:40.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/network/custom.py    
2021-08-23 05:32:33.000000000 +0200
@@ -2657,7 +2657,7 @@
             if version is None:
                 version = type(network)
             else:
-                if not isinstance(network, version):
+                if not isinstance(network, version):  # pylint: 
disable=isinstance-second-argument-not-valid-type
                     raise CLIError("usage error: '{}' incompatible mix of IPv4 
and IPv6 address prefixes."
                                    .format(prefixes))
         except ValueError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/resource_providers/batch_provider.py
 
new/azure-cli-2.27.2/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/resource_providers/batch_provider.py
--- 
old/azure-cli-2.27.0/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/resource_providers/batch_provider.py
  2021-07-30 13:20:40.000000000 +0200
+++ 
new/azure-cli-2.27.2/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/resource_providers/batch_provider.py
  2021-08-23 05:32:33.000000000 +0200
@@ -3,7 +3,7 @@
 # Licensed under the MIT License. See License.txt in the project root for 
license information.
 # 
--------------------------------------------------------------------------------------------
 from azure.cli.core.commands.client_factory import get_mgmt_service_client
-from azure.mgmt.batch import BatchManagement
+from azure.mgmt.batch import BatchManagementClient
 from azure.mgmt.batch.models import PrivateLinkServiceConnectionState, 
PrivateLinkServiceConnectionStatus
 from azure.mgmt.batch.models import PrivateEndpointConnection
 from knack.log import get_logger
@@ -37,7 +37,7 @@
 
         client = get_mgmt_service_client(
             cmd.cli_ctx,
-            BatchManagement).private_endpoint_connection
+            BatchManagementClient).private_endpoint_connection
         return client.begin_update(
             resource_group_name=resource_group_name,
             account_name=resource_name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/resource/_formatters.py 
new/azure-cli-2.27.2/azure/cli/command_modules/resource/_formatters.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/resource/_formatters.py      
2021-07-30 13:20:40.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/resource/_formatters.py      
2021-08-23 05:32:33.000000000 +0200
@@ -18,6 +18,8 @@
     ChangeType.deploy: Color.BLUE,
     ChangeType.no_change: Color.RESET,
     ChangeType.ignore: Color.GRAY,
+    ChangeType.unsupported: Color.GRAY,
+    PropertyChangeType.no_effect: Color.GRAY,
 }
 
 _property_change_type_to_color = {
@@ -25,6 +27,7 @@
     PropertyChangeType.delete: Color.ORANGE,
     PropertyChangeType.modify: Color.PURPLE,
     PropertyChangeType.array: Color.PURPLE,
+    PropertyChangeType.no_effect: Color.GRAY,
 }
 
 _change_type_to_symbol = {
@@ -34,6 +37,8 @@
     ChangeType.deploy: Symbol.EXCLAMATION_POINT,
     ChangeType.no_change: Symbol.EQUAL,
     ChangeType.ignore: Symbol.ASTERISK,
+    ChangeType.unsupported: Symbol.CROSS,
+    PropertyChangeType.no_effect: Symbol.CROSS,
 }
 
 _property_change_type_to_symbol = {
@@ -41,6 +46,7 @@
     PropertyChangeType.delete: Symbol.MINUS,
     PropertyChangeType.modify: Symbol.TILDE,
     PropertyChangeType.array: Symbol.TILDE,
+    PropertyChangeType.no_effect: Symbol.CROSS,
 }
 
 _change_type_to_weight = {
@@ -49,7 +55,9 @@
     ChangeType.deploy: 2,
     ChangeType.modify: 3,
     ChangeType.no_change: 4,
-    ChangeType.ignore: 5,
+    ChangeType.unsupported: 5,
+    ChangeType.ignore: 6,
+    PropertyChangeType.no_effect: 7,
 }
 
 _property_change_type_to_weight = {
@@ -57,6 +65,7 @@
     PropertyChangeType.create: 1,
     PropertyChangeType.modify: 2,
     PropertyChangeType.array: 2,
+    PropertyChangeType.no_effect: 3,
 }
 
 
@@ -127,7 +136,7 @@
     builder.append(", ".join(change_type_stats)).append(".")
 
 
-def _format_change_type_count(change_type, count):
+def _format_change_type_count(change_type, count):  # pylint: 
disable=too-many-return-statements
     if change_type == ChangeType.create:
         return f"{count} to create"
     if change_type == ChangeType.delete:
@@ -140,6 +149,8 @@
         return f"{count} to ignore"
     if change_type == ChangeType.no_change:
         return f"{count} no change"
+    if change_type == ChangeType.unsupported:
+        return f"{count} unsupported"
 
     raise ValueError(f"Invalid ChangeType: {change_type}")
 
@@ -190,7 +201,7 @@
     elif change_type == ChangeType.delete and resource_change.before:
         _format_json(builder, resource_change.before, indent_level=2)
 
-    elif change_type == ChangeType.modify and resource_change.delta:
+    elif resource_change.delta:
         with builder.new_color_scope(Color.RESET):
             builder.append_line()
             _format_property_changes(
@@ -256,6 +267,9 @@
     elif property_change_type == PropertyChangeType.array:
         _format_property_change_path(builder, property_change, "children", 
max_path_length, indent_level)
         _format_property_array_change(builder, children, indent_level + 1)
+    elif property_change_type == PropertyChangeType.no_effect:
+        _format_property_change_path(builder, property_change, "after", 
max_path_length, indent_level)
+        _format_property_no_effect(builder, after, indent_level + 1)
     else:
         raise ValueError(f"Unknown property change type: 
{property_change_type}.")
 
@@ -290,6 +304,11 @@
     builder.append(property_change_symbol, 
property_change_color).append(Symbol.WHITE_SPACE)
 
 
+def _format_property_no_effect(builder, value, indent_level):
+    with 
builder.new_color_scope(_property_change_type_to_color[PropertyChangeType.no_effect]):
+        _format_json(builder, value, indent_level=indent_level)
+
+
 def _format_property_create(builder, value, indent_level):
     with 
builder.new_color_scope(_property_change_type_to_color[PropertyChangeType.create]):
         _format_json(builder, value, indent_level=indent_level)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/resource/_symbol.py 
new/azure-cli-2.27.2/azure/cli/command_modules/resource/_symbol.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/resource/_symbol.py  
2021-07-30 13:20:40.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/resource/_symbol.py  
2021-08-23 05:32:33.000000000 +0200
@@ -19,6 +19,7 @@
     MINUS = "-"
     TILDE = "~"
     EXCLAMATION_POINT = "!"
+    CROSS = "x"
 
     def __str__(self):
         return self.value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/sql/_help.py 
new/azure-cli-2.27.2/azure/cli/command_modules/sql/_help.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/sql/_help.py 2021-07-30 
13:20:40.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/sql/_help.py 2021-08-23 
05:32:34.000000000 +0200
@@ -892,10 +892,13 @@
     text: az sql mi update -g myResourceGroup -n myServer -i \\
               --user-assigned-identity-id 
/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi
 \\
               --identity-type SystemAssigned,UserAssigned --pid 
/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi
-  - name: Update a managed instance with User Managed Identies and Identity 
Type is UserAssigned.
+  - name: Update a managed instance with User Managed Identies and Identity 
Type is UserAssigned
     text: az sql mi update -g myResourceGroup -n myServer -i \\
               --user-assigned-identity-id 
/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi
 \\
               --identity-type UserAssigned --pid 
/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi
+  - name: Move managed instance to another subnet
+    text: az sql mi update -g myResourceGroup -n myServer -i \\
+              --subnet 
/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi
 \\
 """
 
 helps['sql midb'] = """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/sql/_params.py 
new/azure-cli-2.27.2/azure/cli/command_modules/sql/_params.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/sql/_params.py       
2021-07-30 13:20:40.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/sql/_params.py       
2021-08-23 05:32:34.000000000 +0200
@@ -1979,6 +1979,17 @@
 
         c.ignore('name')  # Hide sku name
 
+        c.extra('vnet_name',
+                options_list=['--vnet-name'],
+                help='The virtual network name',
+                validator=validate_subnet)
+
+        c.argument('virtual_network_subnet_id',
+                   options_list=['--subnet'],
+                   required=False,
+                   help='Name or ID of the subnet that allows access to an 
Azure Sql Managed Instance. '
+                   'If subnet name is provided, --vnet-name must be provided.')
+
     with self.argument_context('sql mi show') as c:
         c.argument('expand_ad_admin',
                    options_list=['--expand-ad-admin'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-2.27.0/azure/cli/command_modules/sql/custom.py 
new/azure-cli-2.27.2/azure/cli/command_modules/sql/custom.py
--- old/azure-cli-2.27.0/azure/cli/command_modules/sql/custom.py        
2021-07-30 13:20:40.000000000 +0200
+++ new/azure-cli-2.27.2/azure/cli/command_modules/sql/custom.py        
2021-08-23 05:32:34.000000000 +0200
@@ -450,7 +450,7 @@
                     if umiDict is None:
                         umiDict = {identity: UserIdentity()}
                     else:
-                        umiDict[identity] = UserIdentity()
+                        umiDict[identity] = UserIdentity()  # pylint: 
disable=unsupported-assignment-operation
 
                 identityResult = 
ResourceIdentity(type=ResourceIdType.system_assigned_user_assigned.value,
                                                   
user_assigned_identities=umiDict)
@@ -470,7 +470,7 @@
                     if umiDict is None:
                         umiDict = {identity: UserIdentity()}
                     else:
-                        umiDict[identity] = UserIdentity()
+                        umiDict[identity] = UserIdentity()  # pylint: 
disable=unsupported-assignment-operation
 
                 identityResult = 
ResourceIdentity(type=ResourceIdType.user_assigned.value,
                                                   
user_assigned_identities=umiDict)
@@ -4313,7 +4313,8 @@
         primary_user_assigned_identity_id=None,
         key_id=None,
         identity_type=None,
-        user_assigned_identity_id=None):
+        user_assigned_identity_id=None,
+        virtual_network_subnet_id=None):
     '''
     Updates a managed instance. Custom update function to apply parameters to 
instance.
     '''
@@ -4362,6 +4363,9 @@
 
     instance.key_id = (key_id or instance.key_id)
 
+    if virtual_network_subnet_id is not None:
+        instance.subnet_id = virtual_network_subnet_id
+
     return instance
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-2.27.0/azure_cli.egg-info/PKG-INFO 
new/azure-cli-2.27.2/azure_cli.egg-info/PKG-INFO
--- old/azure-cli-2.27.0/azure_cli.egg-info/PKG-INFO    2021-07-30 
13:20:51.000000000 +0200
+++ new/azure-cli-2.27.2/azure_cli.egg-info/PKG-INFO    2021-08-23 
05:32:41.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-cli
-Version: 2.27.0
+Version: 2.27.2
 Summary: Microsoft Azure Command-Line Tools
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-2.27.0/azure_cli.egg-info/requires.txt 
new/azure-cli-2.27.2/azure_cli.egg-info/requires.txt
--- old/azure-cli-2.27.0/azure_cli.egg-info/requires.txt        2021-07-30 
13:20:51.000000000 +0200
+++ new/azure-cli-2.27.2/azure_cli.egg-info/requires.txt        2021-08-23 
05:32:41.000000000 +0200
@@ -1,7 +1,7 @@
 antlr4-python3-runtime~=4.7.2
 azure-appconfiguration~=1.1.1
-azure-batch~=10.0.0
-azure-cli-core==2.27.0
+azure-batch~=11.0.0
+azure-cli-core==2.27.2
 azure-cosmos>=3.0.2,~=3.0
 azure-datalake-store~=0.0.49
 azure-functions-devops-build~=0.0.22
@@ -16,7 +16,7 @@
 azure-mgmt-applicationinsights~=1.0.0
 azure-mgmt-authorization~=0.61.0
 azure-mgmt-batchai~=7.0.0b1
-azure-mgmt-batch~=15.0.0
+azure-mgmt-batch~=16.0.0
 azure-mgmt-billing==6.0.0
 azure-mgmt-botservice~=0.3.0
 azure-mgmt-cdn==11.0.0
@@ -24,7 +24,7 @@
 azure-mgmt-compute~=22.0.0
 azure-mgmt-consumption~=2.0
 azure-mgmt-containerinstance~=1.4
-azure-mgmt-containerregistry==8.0.0
+azure-mgmt-containerregistry==8.1.0
 azure-mgmt-containerservice~=16.0.0
 azure-mgmt-cosmosdb~=6.4.0
 azure-mgmt-databoxedge~=1.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-2.27.0/setup.py 
new/azure-cli-2.27.2/setup.py
--- old/azure-cli-2.27.0/setup.py       2021-07-30 13:20:41.000000000 +0200
+++ new/azure-cli-2.27.2/setup.py       2021-08-23 05:32:35.000000000 +0200
@@ -17,7 +17,7 @@
     logger.warn("Wheel is not available, disabling bdist_wheel hook")
     cmdclass = {}
 
-VERSION = "2.27.0"
+VERSION = "2.27.2"
 # If we have source, validate that our version numbers match
 # This should prevent uploading releases with mismatched versions.
 try:
@@ -52,7 +52,7 @@
 DEPENDENCIES = [
     'antlr4-python3-runtime~=4.7.2',
     'azure-appconfiguration~=1.1.1',
-    'azure-batch~=10.0.0',
+    'azure-batch~=11.0.0',
     'azure-cli-core=={}'.format(VERSION),
     'azure-cosmos~=3.0,>=3.0.2',
     'azure-datalake-store~=0.0.49',
@@ -68,7 +68,7 @@
     'azure-mgmt-applicationinsights~=1.0.0',
     'azure-mgmt-authorization~=0.61.0',
     'azure-mgmt-batchai~=7.0.0b1',
-    'azure-mgmt-batch~=15.0.0',
+    'azure-mgmt-batch~=16.0.0',
     'azure-mgmt-billing==6.0.0',
     'azure-mgmt-botservice~=0.3.0',
     'azure-mgmt-cdn==11.0.0',
@@ -76,7 +76,7 @@
     'azure-mgmt-compute~=22.0.0',
     'azure-mgmt-consumption~=2.0',
     'azure-mgmt-containerinstance~=1.4',
-    'azure-mgmt-containerregistry==8.0.0',
+    'azure-mgmt-containerregistry==8.1.0',
     'azure-mgmt-containerservice~=16.0.0',
     'azure-mgmt-cosmosdb~=6.4.0',
     'azure-mgmt-databoxedge~=1.0.0',
@@ -149,9 +149,6 @@
     'xmltodict~=0.12'
 ]
 
-TESTS_REQUIRE = [
-    'mock~=4.0'
-]
 
 with open('README.rst', 'r', encoding='utf-8') as f:
     README = f.read()

Reply via email to