Skip to content

Commit 50353d0

Browse files
author
SDKAuto
committed
CodeGen from PR 25564 in Azure/azure-rest-api-specs
Merge 73f8081a33109306fde7eb576df6030896bc9557 into 5dd1107d5f2be8d600325d795450e1d854fbe7e8
1 parent 8d393f0 commit 50353d0

File tree

9 files changed

+225
-62
lines changed

9 files changed

+225
-62
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 158 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/batch/arm-batch/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "64efc48302878a07d1d1231eaed0ca9cadfaf037",
2+
"commit": "c10717e7d69bb8114fb1b248fad4cc16e517189d",
33
"readme": "specification/batch/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\batch\\resource-manager\\readme.md --use=@autorest/[email protected].5 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/batch/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/[email protected].0",
7-
"use": "@autorest/[email protected].5"
6+
"release_tool": "@azure-tools/[email protected].2",
7+
"use": "@autorest/typescript@^6.0.4"
88
}

sdk/batch/arm-batch/package.json

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"node": ">=14.0.0"
99
},
1010
"dependencies": {
11-
"@azure/core-lro": "^2.5.3",
11+
"@azure/core-lro": "^2.5.4",
1212
"@azure/abort-controller": "^1.0.0",
1313
"@azure/core-paging": "^1.2.0",
1414
"@azure/core-client": "^1.7.0",
1515
"@azure/core-auth": "^1.3.0",
16-
"@azure/core-rest-pipeline": "^1.8.0",
16+
"@azure/core-rest-pipeline": "^1.12.0",
1717
"tslib": "^2.2.0"
1818
},
1919
"keywords": [
@@ -38,7 +38,7 @@
3838
"rollup-plugin-sourcemaps": "^0.6.3",
3939
"typescript": "~5.0.0",
4040
"uglify-js": "^3.4.9",
41-
"rimraf": "^3.0.0",
41+
"rimraf": "^5.0.0",
4242
"dotenv": "^16.0.0",
4343
"@azure/identity": "^2.0.1",
4444
"@azure-tools/test-recorder": "^3.0.0",
@@ -48,9 +48,8 @@
4848
"chai": "^4.2.0",
4949
"cross-env": "^7.0.2",
5050
"@types/node": "^14.0.0",
51-
"@azure/dev-tool": "^1.0.0",
52-
"@azure/arm-storage": "^17.1.0",
53-
"ts-node": "^10.0.0"
51+
"ts-node": "^10.0.0",
52+
"@azure/dev-tool": "^1.0.0"
5453
},
5554
"repository": {
5655
"type": "git",
@@ -85,7 +84,7 @@
8584
"extract-api": "api-extractor run --local",
8685
"lint": "echo skipped",
8786
"audit": "echo skipped",
88-
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
87+
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
8988
"build:node": "echo skipped",
9089
"build:browser": "echo skipped",
9190
"build:test": "echo skipped",
@@ -113,13 +112,5 @@
113112
]
114113
},
115114
"autoPublish": true,
116-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/arm-batch",
117-
"//sampleConfiguration": {
118-
"productName": "",
119-
"productSlugs": [
120-
"azure"
121-
],
122-
"disableDocsMs": true,
123-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-batch?view=azure-node-preview"
124-
}
125-
}
115+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/batch/arm-batch"
116+
}

sdk/batch/arm-batch/src/models/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ export interface StartTask {
805805
environmentSettings?: EnvironmentSetting[];
806806
/** If omitted, the task runs as a non-administrative user unique to the task. */
807807
userIdentity?: UserIdentity;
808-
/** The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit. */
808+
/** The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit. Default is 0. */
809809
maxTaskRetryCount?: number;
810810
/** 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 true. */
811811
waitForSuccess?: boolean;

sdk/batch/arm-batch/src/models/mappers.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,7 @@ export const ImageReference: coreClient.CompositeMapper = {
13761376
}
13771377
},
13781378
version: {
1379+
defaultValue: "latest",
13791380
serializedName: "version",
13801381
type: {
13811382
name: "String"
@@ -1688,6 +1689,7 @@ export const FixedScaleSettings: coreClient.CompositeMapper = {
16881689
className: "FixedScaleSettings",
16891690
modelProperties: {
16901691
resizeTimeout: {
1692+
defaultValue: "PT15M",
16911693
serializedName: "resizeTimeout",
16921694
type: {
16931695
name: "TimeSpan"
@@ -1819,6 +1821,7 @@ export const NetworkConfiguration: coreClient.CompositeMapper = {
18191821
}
18201822
},
18211823
dynamicVnetAssignmentScope: {
1824+
defaultValue: "none",
18221825
serializedName: "dynamicVnetAssignmentScope",
18231826
type: {
18241827
name: "Enum",
@@ -2003,6 +2006,7 @@ export const TaskSchedulingPolicy: coreClient.CompositeMapper = {
20032006
className: "TaskSchedulingPolicy",
20042007
modelProperties: {
20052008
nodeFillType: {
2009+
defaultValue: "Spread",
20062010
serializedName: "nodeFillType",
20072011
required: true,
20082012
type: {
@@ -2167,6 +2171,7 @@ export const StartTask: coreClient.CompositeMapper = {
21672171
}
21682172
},
21692173
maxTaskRetryCount: {
2174+
defaultValue: 0,
21702175
serializedName: "maxTaskRetryCount",
21712176
type: {
21722177
name: "Number"
@@ -3273,6 +3278,7 @@ export const Pool: coreClient.CompositeMapper = {
32733278
}
32743279
},
32753280
taskSlotsPerNode: {
3281+
defaultValue: 1,
32763282
serializedName: "properties.taskSlotsPerNode",
32773283
type: {
32783284
name: "Number"

sdk/batch/arm-batch/src/operations/batchAccountOperations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
284284
* you must make sure your network allows outbound access to these endpoints. Failure to allow access
285285
* to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
286286
* about creating a pool inside of a virtual network, see
287-
* https://docs.microsoft.com/azure/batch/batch-virtual-network.
287+
* https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
288288
* @param resourceGroupName The name of the resource group that contains the Batch account.
289289
* @param accountName The name of the Batch account.
290290
* @param options The options parameters.
@@ -717,7 +717,7 @@ export class BatchAccountOperationsImpl implements BatchAccountOperations {
717717
* you must make sure your network allows outbound access to these endpoints. Failure to allow access
718718
* to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
719719
* about creating a pool inside of a virtual network, see
720-
* https://docs.microsoft.com/azure/batch/batch-virtual-network.
720+
* https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
721721
* @param resourceGroupName The name of the resource group that contains the Batch account.
722722
* @param accountName The name of the Batch account.
723723
* @param options The options parameters.

sdk/batch/arm-batch/src/operationsInterfaces/batchAccountOperations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface BatchAccountOperations {
7171
* you must make sure your network allows outbound access to these endpoints. Failure to allow access
7272
* to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
7373
* about creating a pool inside of a virtual network, see
74-
* https://docs.microsoft.com/azure/batch/batch-virtual-network.
74+
* https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
7575
* @param resourceGroupName The name of the resource group that contains the Batch account.
7676
* @param accountName The name of the Batch account.
7777
* @param options The options parameters.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
import {
10+
Recorder,
11+
RecorderStartOptions,
12+
env
13+
} from "@azure-tools/test-recorder";
14+
import { assert } from "chai";
15+
import { Context } from "mocha";
16+
17+
const replaceableVariables: Record<string, string> = {
18+
AZURE_CLIENT_ID: "azure_client_id",
19+
AZURE_CLIENT_SECRET: "azure_client_secret",
20+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
21+
SUBSCRIPTION_ID: "azure_subscription_id"
22+
};
23+
24+
const recorderOptions: RecorderStartOptions = {
25+
envSetupForPlayback: replaceableVariables
26+
};
27+
28+
describe("My test", () => {
29+
let recorder: Recorder;
30+
31+
beforeEach(async function(this: Context) {
32+
recorder = new Recorder(this.currentTest);
33+
await recorder.start(recorderOptions);
34+
});
35+
36+
afterEach(async function() {
37+
await recorder.stop();
38+
});
39+
40+
it("sample test", async function() {
41+
console.log("Hi, I'm a test!");
42+
});
43+
});

sdk/batch/arm-batch/tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@
1515
],
1616
"declaration": true,
1717
"outDir": "./dist-esm",
18-
"importHelpers": true,
19-
"paths": {
20-
"@azure/arm-batch": [
21-
"./src/index"
22-
]
23-
}
18+
"importHelpers": true
2419
},
2520
"include": [
2621
"./src/**/*.ts",
27-
"./test/**/*.ts",
28-
"samples-dev/**/*.ts"
22+
"./test/**/*.ts"
2923
],
3024
"exclude": [
3125
"node_modules"

0 commit comments

Comments
 (0)