Skip to content

Commit afd8fe0

Browse files
committed
Merge branch 'restapi_auto_datamigration/resource-manager' of https://github.com/vchske/azure-sdk-for-python into restapi_auto_datamigration/resource-manager
2 parents 71fecae + e18d912 commit afd8fe0

File tree

2,012 files changed

+91287
-47223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,012 files changed

+91287
-47223
lines changed

azure-batch/HISTORY.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
Release History
44
===============
55

6+
4.1.3 (2018-04-24)
7+
++++++++++++++++++
8+
9+
- Update some APIs' comments
10+
- New property `leaving_pool` in `node_counts` type.
11+
612
4.1.2 (2018-04-23)
713
++++++++++++++++++
814

azure-batch/azure/batch/models/cloud_job.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ class CloudJob(Model):
9999
:param execution_info: The execution information for the job.
100100
:type execution_info: ~azure.batch.models.JobExecutionInformation
101101
:param stats: Resource usage statistics for the entire lifetime of the
102-
job.
102+
job. The statistics may not be immediately available. The Batch service
103+
performs periodic roll-up of statistics. The typical delay is about 30
104+
minutes.
103105
:type stats: ~azure.batch.models.JobStatistics
104106
"""
105107

azure-batch/azure/batch/models/cloud_job_schedule.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ class CloudJobSchedule(Model):
6464
is solely for the use of user code.
6565
:type metadata: list[~azure.batch.models.MetadataItem]
6666
:param stats: The lifetime resource usage statistics for the job schedule.
67+
The statistics may not be immediately available. The Batch service
68+
performs periodic roll-up of statistics. The typical delay is about 30
69+
minutes.
6770
:type stats: ~azure.batch.models.JobScheduleStatistics
6871
"""
6972

azure-batch/azure/batch/models/cloud_pool.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class CloudPool(Model):
5656
machines in a pool are the same size. For information about available
5757
sizes of virtual machines for Cloud Services pools (pools created with
5858
cloudServiceConfiguration), see Sizes for Cloud Services
59-
(http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
59+
(https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
6060
Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and
6161
A2V2. For information about available VM sizes for pools using images from
6262
the Virtual Machines Marketplace (pools created with
@@ -165,7 +165,9 @@ class CloudPool(Model):
165165
metadata.
166166
:type metadata: list[~azure.batch.models.MetadataItem]
167167
:param stats: Utilization and resource usage statistics for the entire
168-
lifetime of the pool.
168+
lifetime of the pool. The statistics may not be immediately available. The
169+
Batch service performs periodic roll-up of statistics. The typical delay
170+
is about 30 minutes.
169171
:type stats: ~azure.batch.models.PoolStatistics
170172
"""
171173

azure-batch/azure/batch/models/cloud_task.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515
class CloudTask(Model):
1616
"""An Azure Batch task.
1717
18+
Batch will retry tasks when a recovery operation is triggered on a compute
19+
node. Examples of recovery operations include (but are not limited to) when
20+
an unhealthy compute node is rebooted or a compute node disappeared due to
21+
host failure. Retries due to recovery operations are independent of and are
22+
not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is
23+
0, an internal retry due to a recovery operation may occur. Because of
24+
this, all tasks should be idempotent. This means tasks need to tolerate
25+
being interrupted and restarted without causing any corruption or duplicate
26+
data. The best practice for long running tasks is to use some form of
27+
checkpointing.
28+
1829
:param id: A string that uniquely identifies the task within the job. The
1930
ID can contain any combination of alphanumeric characters including
2031
hyphens and underscores, and cannot contain more than 64 characters.
@@ -59,7 +70,10 @@ class CloudTask(Model):
5970
take advantage of shell features such as environment variable expansion.
6071
If you want to take advantage of such features, you should invoke the
6172
shell in the command line, for example using "cmd /c MyCommand" in Windows
62-
or "/bin/sh -c MyCommand" in Linux.
73+
or "/bin/sh -c MyCommand" in Linux. If the command line refers to file
74+
paths, it should use a relative path (relative to the task working
75+
directory), or use the Batch provided environment variable
76+
(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
6377
:type command_line: str
6478
:param container_settings: The settings for the container under which the
6579
task runs. If the pool that will run this task has containerConfiguration

azure-batch/azure/batch/models/compute_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ComputeNode(Model):
5656
For information about available sizes of virtual machines for Cloud
5757
Services pools (pools created with cloudServiceConfiguration), see Sizes
5858
for Cloud Services
59-
(http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
59+
(https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
6060
Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and
6161
A2V2. For information about available VM sizes for pools using images from
6262
the Virtual Machines Marketplace (pools created with

azure-batch/azure/batch/models/job_manager_task.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ class JobManagerTask(Model):
2828
have priority over tasks in other jobs. Across jobs, only job level
2929
priorities are observed. For example, if a Job Manager in a priority 0 job
3030
needs to be restarted, it will not displace tasks of a priority 1 job.
31+
Batch will retry tasks when a recovery operation is triggered on a compute
32+
node. Examples of recovery operations include (but are not limited to) when
33+
an unhealthy compute node is rebooted or a compute node disappeared due to
34+
host failure. Retries due to recovery operations are independent of and are
35+
not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is
36+
0, an internal retry due to a recovery operation may occur. Because of
37+
this, all tasks should be idempotent. This means tasks need to tolerate
38+
being interrupted and restarted without causing any corruption or duplicate
39+
data. The best practice for long running tasks is to use some form of
40+
checkpointing.
3141
3242
:param id: A string that uniquely identifies the Job Manager task within
3343
the job. The ID can contain any combination of alphanumeric characters
@@ -43,7 +53,10 @@ class JobManagerTask(Model):
4353
shell features such as environment variable expansion. If you want to take
4454
advantage of such features, you should invoke the shell in the command
4555
line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c
46-
MyCommand" in Linux.
56+
MyCommand" in Linux. If the command line refers to file paths, it should
57+
use a relative path (relative to the task working directory), or use the
58+
Batch provided environment variable
59+
(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
4760
:type command_line: str
4861
:param container_settings: The settings for the container under which the
4962
Job Manager task runs. If the pool that will run this task has
@@ -118,7 +131,7 @@ class JobManagerTask(Model):
118131
:type authentication_token_settings:
119132
~azure.batch.models.AuthenticationTokenSettings
120133
:param allow_low_priority_node: Whether the Job Manager task may run on a
121-
low-priority compute node. The default value is false.
134+
low-priority compute node. The default value is true.
122135
:type allow_low_priority_node: bool
123136
"""
124137

azure-batch/azure/batch/models/job_preparation_task.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ class JobPreparationTask(Model):
3232
run again on the node before scheduling any other task of the job, if
3333
rerunOnNodeRebootAfterSuccess is true or if the Job Preparation task did
3434
not previously complete. If the compute node is reimaged, the Job
35-
Preparation task is run again before scheduling any task of the job.
35+
Preparation task is run again before scheduling any task of the job. Batch
36+
will retry tasks when a recovery operation is triggered on a compute node.
37+
Examples of recovery operations include (but are not limited to) when an
38+
unhealthy compute node is rebooted or a compute node disappeared due to
39+
host failure. Retries due to recovery operations are independent of and are
40+
not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is
41+
0, an internal retry due to a recovery operation may occur. Because of
42+
this, all tasks should be idempotent. This means tasks need to tolerate
43+
being interrupted and restarted without causing any corruption or duplicate
44+
data. The best practice for long running tasks is to use some form of
45+
checkpointing.
3646
3747
:param id: A string that uniquely identifies the Job Preparation task
3848
within the job. The ID can contain any combination of alphanumeric
@@ -49,7 +59,10 @@ class JobPreparationTask(Model):
4959
advantage of shell features such as environment variable expansion. If you
5060
want to take advantage of such features, you should invoke the shell in
5161
the command line, for example using "cmd /c MyCommand" in Windows or
52-
"/bin/sh -c MyCommand" in Linux.
62+
"/bin/sh -c MyCommand" in Linux. If the command line refers to file paths,
63+
it should use a relative path (relative to the task working directory), or
64+
use the Batch provided environment variable
65+
(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
5366
:type command_line: str
5467
:param container_settings: The settings for the container under which the
5568
Job Preparation task runs. When this is specified, all directories

azure-batch/azure/batch/models/job_release_task.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ class JobReleaseTask(Model):
4848
shell features such as environment variable expansion. If you want to take
4949
advantage of such features, you should invoke the shell in the command
5050
line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c
51-
MyCommand" in Linux.
51+
MyCommand" in Linux. If the command line refers to file paths, it should
52+
use a relative path (relative to the task working directory), or use the
53+
Batch provided environment variable
54+
(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
5255
:type command_line: str
5356
:param container_settings: The settings for the container under which the
5457
Job Release task runs. When this is specified, all directories recursively

azure-batch/azure/batch/models/node_counts.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class NodeCounts(Model):
3434
:param start_task_failed: The number of nodes in the startTaskFailed
3535
state.
3636
:type start_task_failed: int
37+
:param leaving_pool: The number of nodes in the leavingPool state.
38+
:type leaving_pool: int
3739
:param unknown: The number of nodes in the unknown state.
3840
:type unknown: int
3941
:param unusable: The number of nodes in the unusable state.
@@ -55,6 +57,7 @@ class NodeCounts(Model):
5557
'running': {'required': True},
5658
'starting': {'required': True},
5759
'start_task_failed': {'required': True},
60+
'leaving_pool': {'required': True},
5861
'unknown': {'required': True},
5962
'unusable': {'required': True},
6063
'waiting_for_start_task': {'required': True},
@@ -71,13 +74,14 @@ class NodeCounts(Model):
7174
'running': {'key': 'running', 'type': 'int'},
7275
'starting': {'key': 'starting', 'type': 'int'},
7376
'start_task_failed': {'key': 'startTaskFailed', 'type': 'int'},
77+
'leaving_pool': {'key': 'leavingPool', 'type': 'int'},
7478
'unknown': {'key': 'unknown', 'type': 'int'},
7579
'unusable': {'key': 'unusable', 'type': 'int'},
7680
'waiting_for_start_task': {'key': 'waitingForStartTask', 'type': 'int'},
7781
'total': {'key': 'total', 'type': 'int'},
7882
}
7983

80-
def __init__(self, creating, idle, offline, preempted, rebooting, reimaging, running, starting, start_task_failed, unknown, unusable, waiting_for_start_task, total):
84+
def __init__(self, creating, idle, offline, preempted, rebooting, reimaging, running, starting, start_task_failed, leaving_pool, unknown, unusable, waiting_for_start_task, total):
8185
super(NodeCounts, self).__init__()
8286
self.creating = creating
8387
self.idle = idle
@@ -88,6 +92,7 @@ def __init__(self, creating, idle, offline, preempted, rebooting, reimaging, run
8892
self.running = running
8993
self.starting = starting
9094
self.start_task_failed = start_task_failed
95+
self.leaving_pool = leaving_pool
9196
self.unknown = unknown
9297
self.unusable = unusable
9398
self.waiting_for_start_task = waiting_for_start_task

azure-batch/azure/batch/models/pool_add_parameter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PoolAddParameter(Model):
2929
machines in a pool are the same size. For information about available
3030
sizes of virtual machines for Cloud Services pools (pools created with
3131
cloudServiceConfiguration), see Sizes for Cloud Services
32-
(http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
32+
(https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
3333
Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and
3434
A2V2. For information about available VM sizes for pools using images from
3535
the Virtual Machines Marketplace (pools created with

azure-batch/azure/batch/models/pool_specification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class PoolSpecification(Model):
2323
machines in a pool are the same size. For information about available
2424
sizes of virtual machines for Cloud Services pools (pools created with
2525
cloudServiceConfiguration), see Sizes for Cloud Services
26-
(http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
26+
(https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/).
2727
Batch supports all Cloud Services VM sizes except ExtraSmall, A1V2 and
2828
A2V2. For information about available VM sizes for pools using images from
2929
the Virtual Machines Marketplace (pools created with

azure-batch/azure/batch/models/start_task.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,26 @@ class StartTask(Model):
1616
"""A task which is run when a compute node joins a pool in the Azure Batch
1717
service, or when the compute node is rebooted or reimaged.
1818
19+
Batch will retry tasks when a recovery operation is triggered on a compute
20+
node. Examples of recovery operations include (but are not limited to) when
21+
an unhealthy compute node is rebooted or a compute node disappeared due to
22+
host failure. Retries due to recovery operations are independent of and are
23+
not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is
24+
0, an internal retry due to a recovery operation may occur. Because of
25+
this, all tasks should be idempotent. This means tasks need to tolerate
26+
being interrupted and restarted without causing any corruption or duplicate
27+
data. The best practice for long running tasks is to use some form of
28+
checkpointing.
29+
1930
:param command_line: The command line of the start task. The command line
2031
does not run under a shell, and therefore cannot take advantage of shell
2132
features such as environment variable expansion. If you want to take
2233
advantage of such features, you should invoke the shell in the command
2334
line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c
24-
MyCommand" in Linux.
35+
MyCommand" in Linux. If the command line refers to file paths, it should
36+
use a relative path (relative to the task working directory), or use the
37+
Batch provided environment variable
38+
(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
2539
:type command_line: str
2640
:param container_settings: The settings for the container under which the
2741
start task runs. When this is specified, all directories recursively below

azure-batch/azure/batch/models/task_add_parameter.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515
class TaskAddParameter(Model):
1616
"""An Azure Batch task to add.
1717
18+
Batch will retry tasks when a recovery operation is triggered on a compute
19+
node. Examples of recovery operations include (but are not limited to) when
20+
an unhealthy compute node is rebooted or a compute node disappeared due to
21+
host failure. Retries due to recovery operations are independent of and are
22+
not counted against the maxTaskRetryCount. Even if the maxTaskRetryCount is
23+
0, an internal retry due to a recovery operation may occur. Because of
24+
this, all tasks should be idempotent. This means tasks need to tolerate
25+
being interrupted and restarted without causing any corruption or duplicate
26+
data. The best practice for long running tasks is to use some form of
27+
checkpointing.
28+
1829
:param id: A string that uniquely identifies the task within the job. The
1930
ID can contain any combination of alphanumeric characters including
2031
hyphens and underscores, and cannot contain more than 64 characters. The
@@ -32,7 +43,10 @@ class TaskAddParameter(Model):
3243
take advantage of shell features such as environment variable expansion.
3344
If you want to take advantage of such features, you should invoke the
3445
shell in the command line, for example using "cmd /c MyCommand" in Windows
35-
or "/bin/sh -c MyCommand" in Linux.
46+
or "/bin/sh -c MyCommand" in Linux. If the command line refers to file
47+
paths, it should use a relative path (relative to the task working
48+
directory), or use the Batch provided environment variable
49+
(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables).
3650
:type command_line: str
3751
:param container_settings: The settings for the container under which the
3852
task runs. If the pool that will run this task has containerConfiguration

azure-batch/azure/batch/models/task_constraints.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@ class TaskConstraints(Model):
2828
:type retention_time: timedelta
2929
:param max_task_retry_count: The maximum number of times the task may be
3030
retried. The Batch service retries a task if its exit code is nonzero.
31-
Note that this value specifically controls the number of retries. The
32-
Batch service will try the task once, and may then retry up to this limit.
33-
For example, if the maximum retry count is 3, Batch tries the task up to 4
34-
times (one initial try and 3 retries). If the maximum retry count is 0,
35-
the Batch service does not retry the task. If the maximum retry count is
36-
-1, the Batch service retries the task without limit.
31+
Note that this value specifically controls the number of retries for the
32+
task executable due to a nonzero exit code. The Batch service will try the
33+
task once, and may then retry up to this limit. For example, if the
34+
maximum retry count is 3, Batch tries the task up to 4 times (one initial
35+
try and 3 retries). If the maximum retry count is 0, the Batch service
36+
does not retry the task after the first attempt. If the maximum retry
37+
count is -1, the Batch service retries the task without limit. Resource
38+
files and application packages are only downloaded again if the task is
39+
retried on a new compute node.
3740
:type max_task_retry_count: int
3841
"""
3942

azure-batch/azure/batch/models/user_identity.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
class UserIdentity(Model):
1616
"""The definition of the user identity under which the task is run.
1717
18-
Specify either the userName or autoUser property, but not both.
18+
Specify either the userName or autoUser property, but not both. On
19+
CloudServiceConfiguration pools, this user is logged in with the
20+
INTERACTIVE flag. On Windows VirtualMachineConfiguration pools, this user
21+
is logged in with the BATCH flag.
1922
2023
:param user_name: The name of the user identity under which the task is
2124
run. The userName and autoUser properties are mutually exclusive; you must

0 commit comments

Comments
 (0)