Skip to content

Commit 1e47613

Browse files
xingwu1ramya-rao-adeyaaeldeen
authored
Upgrade arm-batch to match latest swagger spec. (Azure#11825)
* Upgrade arm-batch to match latest swagger spec. * Add arm-batch live test cases. * Update sdk/batch/arm-batch/src/batchManagementClientContext.ts Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> * Update sdk/batch/arm-batch/package.json Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com> * Update sdk/batch/arm-batch/package.json Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com> * Undo the change for rush environment. * Update based on feedback. * update based on feedback Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com> Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com>
1 parent 9cf8af8 commit 1e47613

29 files changed

+4563
-1791
lines changed

sdk/batch/arm-batch/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Microsoft
3+
Copyright (c) 2020 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/batch/arm-batch/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This package contains an isomorphic SDK for BatchManagementClient.
99

1010
### How to Install
1111

12-
```
12+
```bash
1313
npm install @azure/arm-batch
1414
```
1515

@@ -19,13 +19,14 @@ npm install @azure/arm-batch
1919

2020
##### Install @azure/ms-rest-nodeauth
2121

22-
```
23-
npm install @azure/ms-rest-nodeauth
22+
- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23+
```bash
24+
npm install @azure/ms-rest-nodeauth@"^3.0.0"
2425
```
2526

2627
##### Sample code
2728

28-
```ts
29+
```typescript
2930
import * as msRest from "@azure/ms-rest-js";
3031
import * as msRestAzure from "@azure/ms-rest-azure-js";
3132
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
@@ -49,7 +50,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
4950

5051
##### Install @azure/ms-rest-browserauth
5152

52-
```
53+
```bash
5354
npm install @azure/ms-rest-browserauth
5455
```
5556

@@ -99,5 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
99100

100101
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
101102

102-
103-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fbatch%2Farm-batch%2FREADME.png)
103+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/README.png)

sdk/batch/arm-batch/package.json

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "@azure/arm-batch",
33
"author": "Microsoft Corporation",
44
"description": "BatchManagementClient Library with typescript type definitions for node.js and browser.",
5-
"version": "4.0.0",
5+
"version": "5.0.0",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.1.0",
8-
"@azure/ms-rest-js": "^1.1.0",
9-
"tslib": "^1.9.3"
7+
"@azure/ms-rest-azure-js": "^2.0.1",
8+
"@azure/ms-rest-js": "^2.0.4",
9+
"tslib": "^2.0.0"
1010
},
1111
"keywords": [
1212
"node",
@@ -20,18 +20,27 @@
2020
"module": "./esm/batchManagementClient.js",
2121
"types": "./esm/batchManagementClient.d.ts",
2222
"devDependencies": {
23-
"typescript": "^3.1.1",
24-
"rollup": "^0.66.2",
25-
"rollup-plugin-node-resolve": "^3.4.0",
23+
"@types/chai": "^4.1.6",
24+
"@types/jssha": "^2.0.0",
25+
"@types/mocha": "^7.0.2",
26+
"chai": "^4.2.0",
27+
"dotenv": "^8.2.0",
28+
"mocha": "^7.1.1",
29+
"rollup": "^1.16.3",
30+
"rollup-plugin-node-resolve": "^5.2.0",
31+
"rollup-plugin-sourcemaps": "^0.4.2",
32+
"esm": "^3.2.25",
33+
"ts-node": "^8.3.0",
34+
"typescript": "~3.9.3",
2635
"uglify-js": "^3.4.9"
2736
},
28-
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/batch/arm-batch",
37+
"homepage": "https://github.com/Azure/azure-sdk-for-js",
2938
"repository": {
3039
"type": "git",
31-
"url": "https://github.com/azure/azure-sdk-for-js.git"
40+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
3241
},
3342
"bugs": {
34-
"url": "https://github.com/azure/azure-sdk-for-js/issues"
43+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
3544
},
3645
"files": [
3746
"dist/**/*.js",
@@ -43,14 +52,15 @@
4352
"esm/**/*.d.ts",
4453
"esm/**/*.d.ts.map",
4554
"src/**/*.ts",
55+
"README.md",
4656
"rollup.config.js",
4757
"tsconfig.json"
4858
],
4959
"scripts": {
5060
"build": "tsc && rollup -c rollup.config.js && npm run minify",
5161
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-batch.js.map'\" -o ./dist/arm-batch.min.js ./dist/arm-batch.js",
52-
"prepack": "npm install && npm run build"
62+
"prepack": "npm install && npm run build",
63+
"test": "mocha -r esm --require ts-node/register test/*.spec.ts --timeout 1200000 --full-trace"
5364
},
54-
"sideEffects": false,
55-
"autoPublish": true
65+
"sideEffects": false
5666
}
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
import rollup from "rollup";
12
import nodeResolve from "rollup-plugin-node-resolve";
3+
import sourcemaps from "rollup-plugin-sourcemaps";
4+
25
/**
3-
* @type {import('rollup').RollupFileOptions}
6+
* @type {rollup.RollupFileOptions}
47
*/
58
const config = {
6-
input: './esm/batchManagementClient.js',
7-
external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
9+
input: "./esm/batchManagementClient.js",
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
814
output: {
915
file: "./dist/arm-batch.js",
1016
format: "umd",
@@ -16,16 +22,16 @@ const config = {
1622
},
1723
banner: `/*
1824
* Copyright (c) Microsoft Corporation. All rights reserved.
19-
* Licensed under the MIT License. See License.txt in the project root for
20-
* license information.
25+
* Licensed under the MIT License. See License.txt in the project root for license information.
2126
*
2227
* Code generated by Microsoft (R) AutoRest Code Generator.
23-
* Changes may cause incorrect behavior and will be lost if the code is
24-
* regenerated.
28+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2529
*/`
2630
},
2731
plugins: [
28-
nodeResolve({ module: true })
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
2934
]
3035
};
36+
3137
export default config;

sdk/batch/arm-batch/src/batchManagementClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class BatchManagementClient extends BatchManagementClientContext {
2323
location: operations.Location;
2424
operations: operations.Operations;
2525
certificate: operations.CertificateOperations;
26+
privateLinkResource: operations.PrivateLinkResourceOperations;
27+
privateEndpointConnection: operations.PrivateEndpointConnectionOperations;
2628
pool: operations.PoolOperations;
2729

2830
/**
@@ -40,6 +42,8 @@ class BatchManagementClient extends BatchManagementClientContext {
4042
this.location = new operations.Location(this);
4143
this.operations = new operations.Operations(this);
4244
this.certificate = new operations.CertificateOperations(this);
45+
this.privateLinkResource = new operations.PrivateLinkResourceOperations(this);
46+
this.privateEndpointConnection = new operations.PrivateEndpointConnectionOperations(this);
4347
this.pool = new operations.PoolOperations(this);
4448
}
4549
}

sdk/batch/arm-batch/src/batchManagementClientContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js";
1313
import * as msRestAzure from "@azure/ms-rest-azure-js";
1414

1515
const packageName = "@azure/arm-batch";
16-
const packageVersion = "0.1.0";
16+
const packageVersion = "5.0.0";
1717

1818
export class BatchManagementClientContext extends msRestAzure.AzureServiceClient {
1919
credentials: msRest.ServiceClientCredentials;
@@ -45,7 +45,7 @@ export class BatchManagementClientContext extends msRestAzure.AzureServiceClient
4545

4646
super(credentials, options);
4747

48-
this.apiVersion = '2017-09-01';
48+
this.apiVersion = '2020-09-01';
4949
this.acceptLanguage = 'en-US';
5050
this.longRunningOperationRetryTimeout = 30;
5151
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

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

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,72 @@
11
/*
22
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
7-
* Changes may cause incorrect behavior and will be lost if the code is
8-
* regenerated.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
97
*/
108

119
export {
12-
ApplicationCreateParameters,
1310
Application,
1411
ApplicationPackage,
12+
ApplicationPackageReference,
13+
AutoScaleRun,
14+
AutoScaleRunError,
15+
AutoScaleSettings,
16+
AutoStorageBaseProperties,
17+
AutoStorageProperties,
18+
AutoUserSpecification,
19+
AzureBlobFileSystemConfiguration,
20+
AzureFileShareConfiguration,
21+
BaseResource,
22+
BatchAccount,
23+
BatchAccountIdentity,
24+
Certificate,
25+
CertificateCreateOrUpdateParameters,
26+
CertificateReference,
27+
CIFSMountConfiguration,
1528
CloudError,
16-
ApplicationUpdateParameters,
17-
ListApplicationsResult
29+
CloudServiceConfiguration,
30+
ContainerConfiguration,
31+
ContainerRegistry,
32+
DataDisk,
33+
DeleteCertificateError,
34+
DeploymentConfiguration,
35+
DiskEncryptionConfiguration,
36+
EncryptionProperties,
37+
EnvironmentSetting,
38+
FixedScaleSettings,
39+
ImageReference,
40+
InboundNatPool,
41+
KeyVaultProperties,
42+
KeyVaultReference,
43+
LinuxUserConfiguration,
44+
ListApplicationsResult,
45+
MetadataItem,
46+
MountConfiguration,
47+
NetworkConfiguration,
48+
NetworkSecurityGroupRule,
49+
NFSMountConfiguration,
50+
Pool,
51+
PoolEndpointConfiguration,
52+
PrivateEndpoint,
53+
PrivateEndpointConnection,
54+
PrivateLinkResource,
55+
PrivateLinkServiceConnectionState,
56+
ProxyResource,
57+
PublicIPAddressConfiguration,
58+
ResizeError,
59+
ResizeOperationStatus,
60+
Resource,
61+
ResourceFile,
62+
ScaleSettings,
63+
StartTask,
64+
TaskContainerSettings,
65+
TaskSchedulingPolicy,
66+
UserAccount,
67+
UserIdentity,
68+
VirtualMachineConfiguration,
69+
VirtualMachineFamilyCoreQuota,
70+
WindowsConfiguration,
71+
WindowsUserConfiguration
1872
} from "../models/mappers";
19-

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

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,73 @@
11
/*
22
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
7-
* Changes may cause incorrect behavior and will be lost if the code is
8-
* regenerated.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
97
*/
108

119
export {
1210
ActivateApplicationPackageParameters,
11+
Application,
12+
ApplicationPackage,
13+
ApplicationPackageReference,
14+
AutoScaleRun,
15+
AutoScaleRunError,
16+
AutoScaleSettings,
17+
AutoStorageBaseProperties,
18+
AutoStorageProperties,
19+
AutoUserSpecification,
20+
AzureBlobFileSystemConfiguration,
21+
AzureFileShareConfiguration,
22+
BaseResource,
23+
BatchAccount,
24+
BatchAccountIdentity,
25+
Certificate,
26+
CertificateCreateOrUpdateParameters,
27+
CertificateReference,
28+
CIFSMountConfiguration,
1329
CloudError,
14-
ApplicationPackage
30+
CloudServiceConfiguration,
31+
ContainerConfiguration,
32+
ContainerRegistry,
33+
DataDisk,
34+
DeleteCertificateError,
35+
DeploymentConfiguration,
36+
DiskEncryptionConfiguration,
37+
EncryptionProperties,
38+
EnvironmentSetting,
39+
FixedScaleSettings,
40+
ImageReference,
41+
InboundNatPool,
42+
KeyVaultProperties,
43+
KeyVaultReference,
44+
LinuxUserConfiguration,
45+
ListApplicationPackagesResult,
46+
MetadataItem,
47+
MountConfiguration,
48+
NetworkConfiguration,
49+
NetworkSecurityGroupRule,
50+
NFSMountConfiguration,
51+
Pool,
52+
PoolEndpointConfiguration,
53+
PrivateEndpoint,
54+
PrivateEndpointConnection,
55+
PrivateLinkResource,
56+
PrivateLinkServiceConnectionState,
57+
ProxyResource,
58+
PublicIPAddressConfiguration,
59+
ResizeError,
60+
ResizeOperationStatus,
61+
Resource,
62+
ResourceFile,
63+
ScaleSettings,
64+
StartTask,
65+
TaskContainerSettings,
66+
TaskSchedulingPolicy,
67+
UserAccount,
68+
UserIdentity,
69+
VirtualMachineConfiguration,
70+
VirtualMachineFamilyCoreQuota,
71+
WindowsConfiguration,
72+
WindowsUserConfiguration
1573
} from "../models/mappers";
16-

0 commit comments

Comments
 (0)