Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR] batch/data-plane #4851

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion lib/services/batch/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 5 additions & 3 deletions lib/services/batch/lib/models/cloudJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,11 @@ class CloudJob {
* of terminatejob. Any other string is a user-defined reason specified in a
* call to the 'Terminate a job' operation.
* @property {object} [stats] Resource usage statistics for the entire
* lifetime of the job. The statistics may not be immediately available. The
* Batch service performs periodic roll-up of statistics. The typical delay
* is about 30 minutes.
* lifetime of the job. This property is populated only if the CloudJob was
* retrieved with an expand clause including the 'stats' attribute; otherwise
* it is null. The statistics may not be immediately available. The Batch
* service performs periodic roll-up of statistics. The typical delay is
* about 30 minutes.
* @property {string} [stats.url]
* @property {date} [stats.startTime]
* @property {date} [stats.lastUpdateTime]
Expand Down
4 changes: 3 additions & 1 deletion lib/services/batch/lib/models/cloudPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ class CloudPool {
* @property {array} [metadata] A list of name-value pairs associated with
* the pool as metadata.
* @property {object} [stats] Utilization and resource usage statistics for
* the entire lifetime of the pool. The statistics may not be immediately
* the entire lifetime of the pool. This property is populated only if the
* CloudPool was retrieved with an expand clause including the 'stats'
* attribute; otherwise it is null. The statistics may not be immediately
* available. The Batch service performs periodic roll-up of statistics. The
* typical delay is about 30 minutes.
* @property {string} [stats.url]
Expand Down
2 changes: 1 addition & 1 deletion lib/services/batch/lib/models/computeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ComputeNode {
* @property {string} [url] The URL of the compute node.
* @property {string} [state] The current state of the compute node. The
* low-priority node has been preempted. Tasks which were running on the node
* when it was pre-empted will be rescheduled when another node becomes
* when it was preempted will be rescheduled when another node becomes
* available. Possible values include: 'idle', 'rebooting', 'reimaging',
* 'running', 'unusable', 'creating', 'starting', 'waitingForStartTask',
* 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted'
Expand Down
34 changes: 20 additions & 14 deletions lib/services/batch/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ export interface ResourceFile {
* mutually exclusive and one of them must be specified. This URL must be readable and listable
* using anonymous access; that is, the Batch service does not present any credentials when
* downloading blobs from the container. There are two ways to get such a URL for a container in
* Azure storage: include a Shared Access Signature (SAS) granting read permissions on the
* container, or set the ACL for the container to allow public access.
* Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on
* the container, or set the ACL for the container to allow public access.
*/
storageContainerUrl?: string;
/**
Expand Down Expand Up @@ -1604,7 +1604,7 @@ export interface VirtualMachineConfiguration {
*/
windowsConfiguration?: WindowsConfiguration;
/**
* @summary The configuration for data disks attached to the comptue nodes in the pool.
* @summary The configuration for data disks attached to the compute nodes in the pool.
* @description This property must be specified if the compute nodes in the pool need to have
* empty data disks attached to them. This cannot be updated. Each node gets its own disk (the
* disk is not a file share). Existing disks cannot be attached, each attached disk is empty.
Expand Down Expand Up @@ -2495,9 +2495,11 @@ export interface CloudJob {
*/
executionInfo?: JobExecutionInformation;
/**
* @summary Resource usage statistics for the entire lifetime of the job. The statistics may not
* be immediately available. The Batch service performs periodic roll-up of statistics. The
* typical delay is about 30 minutes.
* @summary Resource usage statistics for the entire lifetime of the job.
* @description This property is populated only if the CloudJob was retrieved with an expand
* clause including the 'stats' attribute; otherwise it is null. The statistics may not be
* immediately available. The Batch service performs periodic roll-up of statistics. The typical
* delay is about 30 minutes.
*/
stats?: JobStatistics;
}
Expand Down Expand Up @@ -3090,9 +3092,11 @@ export interface CloudPool {
*/
metadata?: MetadataItem[];
/**
* @summary Utilization and resource usage statistics for the entire lifetime of the pool. The
* statistics may not be immediately available. The Batch service performs periodic roll-up of
* statistics. The typical delay is about 30 minutes.
* @summary Utilization and resource usage statistics for the entire lifetime of the pool.
* @description This property is populated only if the CloudPool was retrieved with an expand
* clause including the 'stats' attribute; otherwise it is null. The statistics may not be
* immediately available. The Batch service performs periodic roll-up of statistics. The typical
* delay is about 30 minutes.
*/
stats?: PoolStatistics;
}
Expand Down Expand Up @@ -3396,7 +3400,10 @@ export interface NodeAgentInformation {

/**
* @summary Settings which specify how to run a multi-instance task.
* @description Multi-instance tasks are commonly used to support MPI tasks.
* @description Multi-instance tasks are commonly used to support MPI tasks. In the MPI case, if
* any of the subtasks fail (for example due to exiting with a non-zero exit code) the entire
* multi-instance task fails. The multi-instance task is then terminated and retried, up to its
* retry limit.
*/
export interface MultiInstanceSettings {
/**
Expand Down Expand Up @@ -4186,10 +4193,9 @@ export interface ComputeNode {
/**
* @summary The current state of the compute node.
* @description The low-priority node has been preempted. Tasks which were running on the node
* when it was pre-empted will be rescheduled when another node becomes available. Possible
* values include: 'idle', 'rebooting', 'reimaging', 'running', 'unusable', 'creating',
* 'starting', 'waitingForStartTask', 'startTaskFailed', 'unknown', 'leavingPool', 'offline',
* 'preempted'
* when it was preempted will be rescheduled when another node becomes available. Possible values
* include: 'idle', 'rebooting', 'reimaging', 'running', 'unusable', 'creating', 'starting',
* 'waitingForStartTask', 'startTaskFailed', 'unknown', 'leavingPool', 'offline', 'preempted'
*/
state?: string;
/**
Expand Down
5 changes: 4 additions & 1 deletion lib/services/batch/lib/models/multiInstanceSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
/**
* @summary Settings which specify how to run a multi-instance task.
*
* Multi-instance tasks are commonly used to support MPI tasks.
* Multi-instance tasks are commonly used to support MPI tasks. In the MPI
* case, if any of the subtasks fail (for example due to exiting with a
* non-zero exit code) the entire multi-instance task fails. The multi-instance
* task is then terminated and retried, up to its retry limit.
*
*/
class MultiInstanceSettings {
Expand Down
4 changes: 2 additions & 2 deletions lib/services/batch/lib/models/resourceFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class ResourceFile {
* anonymous access; that is, the Batch service does not present any
* credentials when downloading blobs from the container. There are two ways
* to get such a URL for a container in Azure storage: include a Shared
* Access Signature (SAS) granting read permissions on the container, or set
* the ACL for the container to allow public access.
* Access Signature (SAS) granting read and list permissions on the
* container, or set the ACL for the container to allow public access.
* @property {string} [httpUrl] The URL of the file to download. The
* autoStorageContainerName, storageContainerUrl and httpUrl properties are
* mutually exclusive and one of them must be specified. If the URL points to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class VirtualMachineConfiguration {
* @property {boolean} [windowsConfiguration.enableAutomaticUpdates] If
* omitted, the default value is true.
* @property {array} [dataDisks] The configuration for data disks attached to
* the comptue nodes in the pool. This property must be specified if the
* the compute nodes in the pool. This property must be specified if the
* compute nodes in the pool need to have empty data disks attached to them.
* This cannot be updated. Each node gets its own disk (the disk is not a
* file share). Existing disks cannot be attached, each attached disk is
Expand Down
54 changes: 18 additions & 36 deletions lib/services/batch/lib/operations/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,43 +96,37 @@ function _listNodeAgentSkus(options, callback) {
let returnClientRequestId;
let ocpDate;
try {
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined)
{
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined) {
filter = accountListNodeAgentSkusOptions.filter;
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
throw new Error('filter must be of type string.');
}
}
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined)
{
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined) {
maxResults = accountListNodeAgentSkusOptions.maxResults;
if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') {
throw new Error('maxResults must be of type number.');
}
}
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined)
{
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined) {
timeout = accountListNodeAgentSkusOptions.timeout;
if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') {
throw new Error('timeout must be of type number.');
}
}
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined)
{
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined) {
clientRequestId = accountListNodeAgentSkusOptions.clientRequestId;
if (clientRequestId !== null && clientRequestId !== undefined && !(typeof clientRequestId.valueOf() === 'string' && msRest.isValidUuid(clientRequestId))) {
throw new Error('clientRequestId must be of type string and must be a valid uuid.');
}
}
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined)
{
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined) {
returnClientRequestId = accountListNodeAgentSkusOptions.returnClientRequestId;
if (returnClientRequestId !== null && returnClientRequestId !== undefined && typeof returnClientRequestId !== 'boolean') {
throw new Error('returnClientRequestId must be of type boolean.');
}
}
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined)
{
if (accountListNodeAgentSkusOptions !== null && accountListNodeAgentSkusOptions !== undefined) {
ocpDate = accountListNodeAgentSkusOptions.ocpDate;
if (ocpDate && !(ocpDate instanceof Date ||
(typeof ocpDate.valueOf() === 'string' && !isNaN(Date.parse(ocpDate))))) {
Expand Down Expand Up @@ -330,43 +324,37 @@ function _listPoolNodeCounts(options, callback) {
let returnClientRequestId;
let ocpDate;
try {
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined)
{
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined) {
filter = accountListPoolNodeCountsOptions.filter;
if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') {
throw new Error('filter must be of type string.');
}
}
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined)
{
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined) {
maxResults = accountListPoolNodeCountsOptions.maxResults;
if (maxResults !== null && maxResults !== undefined && typeof maxResults !== 'number') {
throw new Error('maxResults must be of type number.');
}
}
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined)
{
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined) {
timeout = accountListPoolNodeCountsOptions.timeout;
if (timeout !== null && timeout !== undefined && typeof timeout !== 'number') {
throw new Error('timeout must be of type number.');
}
}
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined)
{
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined) {
clientRequestId = accountListPoolNodeCountsOptions.clientRequestId;
if (clientRequestId !== null && clientRequestId !== undefined && !(typeof clientRequestId.valueOf() === 'string' && msRest.isValidUuid(clientRequestId))) {
throw new Error('clientRequestId must be of type string and must be a valid uuid.');
}
}
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined)
{
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined) {
returnClientRequestId = accountListPoolNodeCountsOptions.returnClientRequestId;
if (returnClientRequestId !== null && returnClientRequestId !== undefined && typeof returnClientRequestId !== 'boolean') {
throw new Error('returnClientRequestId must be of type boolean.');
}
}
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined)
{
if (accountListPoolNodeCountsOptions !== null && accountListPoolNodeCountsOptions !== undefined) {
ocpDate = accountListPoolNodeCountsOptions.ocpDate;
if (ocpDate && !(ocpDate instanceof Date ||
(typeof ocpDate.valueOf() === 'string' && !isNaN(Date.parse(ocpDate))))) {
Expand Down Expand Up @@ -550,22 +538,19 @@ function _listNodeAgentSkusNext(nextPageLink, options, callback) {
let returnClientRequestId;
let ocpDate;
try {
if (accountListNodeAgentSkusNextOptions !== null && accountListNodeAgentSkusNextOptions !== undefined)
{
if (accountListNodeAgentSkusNextOptions !== null && accountListNodeAgentSkusNextOptions !== undefined) {
clientRequestId = accountListNodeAgentSkusNextOptions.clientRequestId;
if (clientRequestId !== null && clientRequestId !== undefined && !(typeof clientRequestId.valueOf() === 'string' && msRest.isValidUuid(clientRequestId))) {
throw new Error('clientRequestId must be of type string and must be a valid uuid.');
}
}
if (accountListNodeAgentSkusNextOptions !== null && accountListNodeAgentSkusNextOptions !== undefined)
{
if (accountListNodeAgentSkusNextOptions !== null && accountListNodeAgentSkusNextOptions !== undefined) {
returnClientRequestId = accountListNodeAgentSkusNextOptions.returnClientRequestId;
if (returnClientRequestId !== null && returnClientRequestId !== undefined && typeof returnClientRequestId !== 'boolean') {
throw new Error('returnClientRequestId must be of type boolean.');
}
}
if (accountListNodeAgentSkusNextOptions !== null && accountListNodeAgentSkusNextOptions !== undefined)
{
if (accountListNodeAgentSkusNextOptions !== null && accountListNodeAgentSkusNextOptions !== undefined) {
ocpDate = accountListNodeAgentSkusNextOptions.ocpDate;
if (ocpDate && !(ocpDate instanceof Date ||
(typeof ocpDate.valueOf() === 'string' && !isNaN(Date.parse(ocpDate))))) {
Expand Down Expand Up @@ -734,22 +719,19 @@ function _listPoolNodeCountsNext(nextPageLink, options, callback) {
let returnClientRequestId;
let ocpDate;
try {
if (accountListPoolNodeCountsNextOptions !== null && accountListPoolNodeCountsNextOptions !== undefined)
{
if (accountListPoolNodeCountsNextOptions !== null && accountListPoolNodeCountsNextOptions !== undefined) {
clientRequestId = accountListPoolNodeCountsNextOptions.clientRequestId;
if (clientRequestId !== null && clientRequestId !== undefined && !(typeof clientRequestId.valueOf() === 'string' && msRest.isValidUuid(clientRequestId))) {
throw new Error('clientRequestId must be of type string and must be a valid uuid.');
}
}
if (accountListPoolNodeCountsNextOptions !== null && accountListPoolNodeCountsNextOptions !== undefined)
{
if (accountListPoolNodeCountsNextOptions !== null && accountListPoolNodeCountsNextOptions !== undefined) {
returnClientRequestId = accountListPoolNodeCountsNextOptions.returnClientRequestId;
if (returnClientRequestId !== null && returnClientRequestId !== undefined && typeof returnClientRequestId !== 'boolean') {
throw new Error('returnClientRequestId must be of type boolean.');
}
}
if (accountListPoolNodeCountsNextOptions !== null && accountListPoolNodeCountsNextOptions !== undefined)
{
if (accountListPoolNodeCountsNextOptions !== null && accountListPoolNodeCountsNextOptions !== undefined) {
ocpDate = accountListPoolNodeCountsNextOptions.ocpDate;
if (ocpDate && !(ocpDate instanceof Date ||
(typeof ocpDate.valueOf() === 'string' && !isNaN(Date.parse(ocpDate))))) {
Expand Down
Loading