This commit is contained in:
Brandon Klein 2020-04-09 15:55:22 -07:00
Родитель 9c9e76276d
Коммит 8f822cf9ce
11 изменённых файлов: 5409 добавлений и 9479 удалений

Просмотреть файл

@ -3,6 +3,11 @@
SDK Release History
===================
8.0.0 (2020-04-??)
------------------
* Update to match latest Python SDK taking associated breaking changes.
7.0.0 (2019-08-20)
------------------

Просмотреть файл

@ -3,4 +3,4 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
VERSION = "7.0.0"
VERSION = "8.0.0"

Просмотреть файл

@ -3,6 +3,11 @@
Release History
===============
6.0.0 (2020-04-??)
------------------
* Update SDK dependency to get latest models and defaults
5.0.1 (2019-08-20)
------------------

Просмотреть файл

@ -29,6 +29,9 @@ def load_arguments(self, _):
c.argument('start_task_wait_for_success', arg_group='Pool: Start Task', action='store_true', help='Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false. True if flag present.')
c.argument('os_family', arg_group="Pool: Cloud Service Configuration",
help='The Azure Guest OS family to be installed on the virtual machines in the pool. Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). Allowed values: 2, 3, 4, 5.')
c.extra('disk_encryption_targets',
arg_group="Pool: Virtual Machine Configuration",
help='A space seperated list of DiskEncryptionTargets. current possible values include OsDisk and TemporaryDisk.')
c.argument('node_agent_sku_id', arg_group="Pool: Virtual Machine Configuration", help='The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the \'List supported node agent SKUs\' operation.')
c.argument('image', completer=load_supported_images, arg_group="Pool: Virtual Machine Configuration",
help="OS image reference. This can be either 'publisher:offer:sku[:version]' format, or a fully qualified ARM image id of the form '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}'. If 'publisher:offer:sku[:version]' format, version is optional and if omitted latest will be used. Valid values can be retrieved via 'az batch pool node-agent-skus list'. For example: 'MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter:latest'")

Просмотреть файл

@ -1,4 +1,4 @@
{
"azext.minCliCoreVersion": "2.0.73",
"azext.minCliCoreVersion": "2.0.74",
"azext.maxCliCoreVersion": "3.0.0"
}

Просмотреть файл

@ -18,9 +18,20 @@ logger = get_logger(__name__)
# pylint: disable=redefined-builtin
def disk_encryption_target_format(value):
"""Space seperated target disks to be encrypted. Values can either be OsDisk or TemporaryDisk"""
from azext.batch.models import DiskEncryptionTarget
if value == 'OsDisk':
return DiskEncryptionTarget.os_disk
if value == 'TemporaryDisk':
return DiskEncryptionTarget.temporary_disk
message = 'Argument {} is not a valid disk_encryption_target'
raise ValueError(message.format(value))
def create_pool(client, template=None, parameters=None, json_file=None, id=None, vm_size=None, # pylint:disable=too-many-arguments, too-many-locals
target_dedicated_nodes=None, target_low_priority_nodes=None, auto_scale_formula=None, # pylint: disable=redefined-builtin
enable_inter_node_communication=False, os_family=None, image=None,
enable_inter_node_communication=False, os_family=None, image=None, disk_encryption_targets=None,
node_agent_sku_id=None, resize_timeout=None, start_task_command_line=None,
start_task_resource_files=None, start_task_wait_for_success=False, application_licenses=None,
certificate_references=None, application_package_references=None, metadata=None):
@ -28,7 +39,8 @@ def create_pool(client, template=None, parameters=None, json_file=None, id=None,
from azext.batch.errors import MissingParameterValue
from azext.batch.models import (
PoolAddOptions, StartTask, ImageReference,
CloudServiceConfiguration, VirtualMachineConfiguration)
CloudServiceConfiguration, VirtualMachineConfiguration,
DiskEncryptionConfiguration)
if template or json_file:
if template:
json_obj = None
@ -81,6 +93,13 @@ def create_pool(client, template=None, parameters=None, json_file=None, id=None,
pool.virtual_machine_configuration = VirtualMachineConfiguration(
image_reference=ImageReference(publisher=publisher, offer=offer, sku=sku, version=version),
node_agent_sku_id=node_agent_sku_id)
if disk_encryption_targets:
targets = disk_encryption_targets.split(' ')
parsed_targets = []
for target in targets:
parsed_targets.append(
disk_encryption_target_format(target))
pool.virtual_machine_configuration.disk_configuration = DiskEncryptionConfiguration(targets=parsed_targets)
except ValueError:
if '/' not in image:
message = ("Incorrect format for VM image. Should be in the format: \n"

Просмотреть файл

@ -3,4 +3,4 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
VERSION = "5.0.2"
VERSION = "6.0.0"

Просмотреть файл

@ -27,7 +27,7 @@ CLASSIFIERS = [
]
DEPENDENCIES = [
'azure-batch-extensions>=7.0.0,<7.1',
'azure-batch-extensions>=8.0.0,<8.1',
'pycparser==2.18'
]

Просмотреть файл

@ -28,7 +28,7 @@ CLASSIFIERS = [
DEPENDENCIES = [
'msrestazure>=0.4.14,<1',
'azure-batch>=8.0,<9',
'azure-batch>=9.0,<10',
'azure-mgmt-batch>=7.0,<8',
'azure-storage-blob>=1.1.0,<2',
'azure-mgmt-storage>=2.0,<3'

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Разница между файлами не показана из-за своего большого размера Загрузить разницу