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
4 changes: 4 additions & 0 deletions src/azure-cli-core/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

2.27.1
++++++
* No changes

2.27.0
++++++
* Minor fixes
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long

__version__ = "2.27.0"
__version__ = "2.27.1"

import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "2.27.0"
VERSION = "2.27.1"

# If we have source, validate that our version numbers match
# This should prevent uploading releases with mismatched versions.
Expand Down
14 changes: 14 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
Release History
===============

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
++++++

Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from knack.log import get_logger

__author__ = "Microsoft Corporation <[email protected]>"
__version__ = "2.27.0"
__version__ = "2.27.1"


# A workaround for https://bugs.python.org/issue32502 (https://github.com/Azure/azure-cli/issues/5184)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def compute_node_client_factory(cli_ctx, kwargs):


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):
Expand Down
22 changes: 22 additions & 0 deletions src/azure-cli/azure/cli/command_modules/batch/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion src/azure-cli/azure/cli/command_modules/batch/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ def load_arguments(self, _):
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ def keyvault_id(cmd, namespace):

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))
Expand Down Expand Up @@ -294,7 +294,7 @@ def validate_cert_settings(namespace):

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
Expand All @@ -315,7 +315,7 @@ def validate_client_parameters(cmd, namespace):
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:
Expand Down
4 changes: 4 additions & 0 deletions src/azure-cli/azure/cli/command_modules/batch/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def get_data_factory(name):
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)
Expand All @@ -79,6 +80,9 @@ def get_data_factory(name):
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')
Expand Down
4 changes: 2 additions & 2 deletions src/azure-cli/azure/cli/command_modules/batch/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -223,7 +223,7 @@ def create_application_package(cmd, client,
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
Expand Down
Loading