@azure/arm-vmwarecloudsimple 3.0.0-alpha.20220511.3 → 3.0.2-alpha.20220707.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
+ import { __awaiter } from "tslib";
8
9
  import * as coreClient from "@azure/core-client";
9
10
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
11
  import { OperationsImpl, DedicatedCloudNodesImpl, DedicatedCloudServicesImpl, SkusAvailabilityImpl, PrivateCloudsImpl, CustomizationPoliciesImpl, ResourcePoolsImpl, VirtualMachineTemplatesImpl, VirtualNetworksImpl, UsagesImpl, VirtualMachinesImpl } from "./operations";
@@ -31,7 +32,7 @@ export class VMwareCloudSimple extends coreClient.ServiceClient {
31
32
  requestContentType: "application/json; charset=utf-8",
32
33
  credential: credentials
33
34
  };
34
- const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.0.0`;
35
+ const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.0.2`;
35
36
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
36
37
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
37
38
  : `${packageDetails}`;
@@ -74,6 +75,34 @@ export class VMwareCloudSimple extends coreClient.ServiceClient {
74
75
  this.virtualNetworks = new VirtualNetworksImpl(this);
75
76
  this.usages = new UsagesImpl(this);
76
77
  this.virtualMachines = new VirtualMachinesImpl(this);
78
+ this.addCustomApiVersionPolicy(options.apiVersion);
79
+ }
80
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
81
+ addCustomApiVersionPolicy(apiVersion) {
82
+ if (!apiVersion) {
83
+ return;
84
+ }
85
+ const apiVersionPolicy = {
86
+ name: "CustomApiVersionPolicy",
87
+ sendRequest(request, next) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const param = request.url.split("?");
90
+ if (param.length > 1) {
91
+ const newParams = param[1].split("&").map((item) => {
92
+ if (item.indexOf("api-version") > -1) {
93
+ return "api-version=" + apiVersion;
94
+ }
95
+ else {
96
+ return item;
97
+ }
98
+ });
99
+ request.url = param[0] + "?" + newParams.join("&");
100
+ }
101
+ return next(request);
102
+ });
103
+ }
104
+ };
105
+ this.pipeline.addPolicy(apiVersionPolicy);
77
106
  }
78
107
  }
79
108
  //# sourceMappingURL=vMwareCloudSimple.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vMwareCloudSimple.js","sourceRoot":"","sources":["../../src/vMwareCloudSimple.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAgBtB,MAAM,OAAO,iBAAkB,SAAQ,UAAU,CAAC,aAAa;IAK7D;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAyC;;QAEzC,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAoC;YAChD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,sCAAsC,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AG,CAAC,CAAC;qBACpD;oBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;aAAA;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAaF"}
@@ -6,24 +6,22 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import { __awaiter } from "tslib";
9
- import { record } from "@azure-tools/test-recorder";
10
- const recorderEnvSetup = {
11
- replaceableVariables: {
12
- AZURE_CLIENT_ID: "azure_client_id",
13
- AZURE_CLIENT_SECRET: "azure_client_secret",
14
- AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
15
- SUBSCRIPTION_ID: "azure_subscription_id"
16
- },
17
- customizationsOnRecordings: [
18
- (recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
19
- ],
20
- queryParametersToSkip: []
9
+ import { Recorder } from "@azure-tools/test-recorder";
10
+ const replaceableVariables = {
11
+ AZURE_CLIENT_ID: "azure_client_id",
12
+ AZURE_CLIENT_SECRET: "azure_client_secret",
13
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
14
+ SUBSCRIPTION_ID: "azure_subscription_id"
15
+ };
16
+ const recorderOptions = {
17
+ envSetupForPlayback: replaceableVariables
21
18
  };
22
19
  describe("My test", () => {
23
20
  let recorder;
24
21
  beforeEach(function () {
25
22
  return __awaiter(this, void 0, void 0, function* () {
26
- recorder = record(this, recorderEnvSetup);
23
+ recorder = new Recorder(this.currentTest);
24
+ yield recorder.start(recorderOptions);
27
25
  });
28
26
  });
29
27
  afterEach(function () {
@@ -1 +1 @@
1
- {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAEL,MAAM,EAGP,MAAM,4BAA4B,CAAC;AAGpC,MAAM,gBAAgB,GAA6B;IACjD,oBAAoB,EA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,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for VMwareCloudSimple.",
6
- "version": "3.0.0-alpha.20220511.3",
6
+ "version": "3.0.2-alpha.20220707.1",
7
7
  "engines": {
8
8
  "node": ">=12.0.0"
9
9
  },
@@ -40,9 +40,13 @@
40
40
  "uglify-js": "^3.4.9",
41
41
  "rimraf": "^3.0.0",
42
42
  "@azure/identity": "^2.0.1",
43
- "@azure-tools/test-recorder": "^1.0.0",
43
+ "@azure-tools/test-recorder": "^2.0.0",
44
+ "@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
44
45
  "mocha": "^7.1.1",
45
- "cross-env": "^7.0.2"
46
+ "@types/chai": "^4.2.8",
47
+ "chai": "^4.2.0",
48
+ "cross-env": "^7.0.2",
49
+ "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb"
46
50
  },
47
51
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/vmwarecloudsimple/arm-vmwarecloudsimple",
48
52
  "repository": {
@@ -93,9 +97,8 @@
93
97
  "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
94
98
  "unit-test:browser": "echo skipped",
95
99
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
96
- "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
97
- "integration-test:browser": "echo skipped",
98
- "docs": "echo skipped"
100
+ "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
101
+ "integration-test:browser": "echo skipped"
99
102
  },
100
103
  "sideEffects": false,
101
104
  "//metadata": {
@@ -431,53 +431,37 @@ export type GuestOSType = "linux" | "windows" | "other";
431
431
 
432
432
  // @public
433
433
  export enum KnownCustomizationHostNameType {
434
- // (undocumented)
435
434
  CustomName = "CUSTOM_NAME",
436
- // (undocumented)
437
435
  Fixed = "FIXED",
438
- // (undocumented)
439
436
  PrefixBased = "PREFIX_BASED",
440
- // (undocumented)
441
437
  UserDefined = "USER_DEFINED",
442
- // (undocumented)
443
438
  VirtualMachineName = "VIRTUAL_MACHINE_NAME"
444
439
  }
445
440
 
446
441
  // @public
447
442
  export enum KnownCustomizationIdentityType {
448
- // (undocumented)
449
443
  Linux = "LINUX",
450
- // (undocumented)
451
444
  Windows = "WINDOWS",
452
- // (undocumented)
453
445
  WindowsText = "WINDOWS_TEXT"
454
446
  }
455
447
 
456
448
  // @public
457
449
  export enum KnownCustomizationIPAddressType {
458
- // (undocumented)
459
450
  Custom = "CUSTOM",
460
- // (undocumented)
461
451
  DhcpIP = "DHCP_IP",
462
- // (undocumented)
463
452
  FixedIP = "FIXED_IP",
464
- // (undocumented)
465
453
  UserDefined = "USER_DEFINED"
466
454
  }
467
455
 
468
456
  // @public
469
457
  export enum KnownCustomizationPolicyPropertiesType {
470
- // (undocumented)
471
458
  Linux = "LINUX",
472
- // (undocumented)
473
459
  Windows = "WINDOWS"
474
460
  }
475
461
 
476
462
  // @public
477
463
  export enum KnownGuestOsnicCustomizationAllocation {
478
- // (undocumented)
479
464
  Dynamic = "dynamic",
480
- // (undocumented)
481
465
  Static = "static"
482
466
  }
483
467
 
@@ -926,7 +926,9 @@ export interface VirtualMachinesStopExceptionHeaders {
926
926
 
927
927
  /** Known values of {@link GuestOsnicCustomizationAllocation} that the service accepts. */
928
928
  export enum KnownGuestOsnicCustomizationAllocation {
929
+ /** Static */
929
930
  Static = "static",
931
+ /** Dynamic */
930
932
  Dynamic = "dynamic"
931
933
  }
932
934
 
@@ -942,10 +944,15 @@ export type GuestOsnicCustomizationAllocation = string;
942
944
 
943
945
  /** Known values of {@link CustomizationHostNameType} that the service accepts. */
944
946
  export enum KnownCustomizationHostNameType {
947
+ /** UserDefined */
945
948
  UserDefined = "USER_DEFINED",
949
+ /** PrefixBased */
946
950
  PrefixBased = "PREFIX_BASED",
951
+ /** Fixed */
947
952
  Fixed = "FIXED",
953
+ /** VirtualMachineName */
948
954
  VirtualMachineName = "VIRTUAL_MACHINE_NAME",
955
+ /** CustomName */
949
956
  CustomName = "CUSTOM_NAME"
950
957
  }
951
958
 
@@ -964,8 +971,11 @@ export type CustomizationHostNameType = string;
964
971
 
965
972
  /** Known values of {@link CustomizationIdentityType} that the service accepts. */
966
973
  export enum KnownCustomizationIdentityType {
974
+ /** WindowsText */
967
975
  WindowsText = "WINDOWS_TEXT",
976
+ /** Windows */
968
977
  Windows = "WINDOWS",
978
+ /** Linux */
969
979
  Linux = "LINUX"
970
980
  }
971
981
 
@@ -982,9 +992,13 @@ export type CustomizationIdentityType = string;
982
992
 
983
993
  /** Known values of {@link CustomizationIPAddressType} that the service accepts. */
984
994
  export enum KnownCustomizationIPAddressType {
995
+ /** Custom */
985
996
  Custom = "CUSTOM",
997
+ /** DhcpIP */
986
998
  DhcpIP = "DHCP_IP",
999
+ /** FixedIP */
987
1000
  FixedIP = "FIXED_IP",
1001
+ /** UserDefined */
988
1002
  UserDefined = "USER_DEFINED"
989
1003
  }
990
1004
 
@@ -1002,7 +1016,9 @@ export type CustomizationIPAddressType = string;
1002
1016
 
1003
1017
  /** Known values of {@link CustomizationPolicyPropertiesType} that the service accepts. */
1004
1018
  export enum KnownCustomizationPolicyPropertiesType {
1019
+ /** Linux */
1005
1020
  Linux = "LINUX",
1021
+ /** Windows */
1006
1022
  Windows = "WINDOWS"
1007
1023
  }
1008
1024
 
@@ -8,6 +8,11 @@
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
10
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
11
16
  import * as coreAuth from "@azure/core-auth";
12
17
  import {
13
18
  OperationsImpl,
@@ -69,7 +74,7 @@ export class VMwareCloudSimple extends coreClient.ServiceClient {
69
74
  credential: credentials
70
75
  };
71
76
 
72
- const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.0.0`;
77
+ const packageDetails = `azsdk-js-arm-vmwarecloudsimple/3.0.2`;
73
78
  const userAgentPrefix =
74
79
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
75
80
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -128,6 +133,35 @@ export class VMwareCloudSimple extends coreClient.ServiceClient {
128
133
  this.virtualNetworks = new VirtualNetworksImpl(this);
129
134
  this.usages = new UsagesImpl(this);
130
135
  this.virtualMachines = new VirtualMachinesImpl(this);
136
+ this.addCustomApiVersionPolicy(options.apiVersion);
137
+ }
138
+
139
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
140
+ private addCustomApiVersionPolicy(apiVersion?: string) {
141
+ if (!apiVersion) {
142
+ return;
143
+ }
144
+ const apiVersionPolicy = {
145
+ name: "CustomApiVersionPolicy",
146
+ async sendRequest(
147
+ request: PipelineRequest,
148
+ next: SendRequest
149
+ ): Promise<PipelineResponse> {
150
+ const param = request.url.split("?");
151
+ if (param.length > 1) {
152
+ const newParams = param[1].split("&").map((item) => {
153
+ if (item.indexOf("api-version") > -1) {
154
+ return "api-version=" + apiVersion;
155
+ } else {
156
+ return item;
157
+ }
158
+ });
159
+ request.url = param[0] + "?" + newParams.join("&");
160
+ }
161
+ return next(request);
162
+ }
163
+ };
164
+ this.pipeline.addPolicy(apiVersionPolicy);
131
165
  }
132
166
 
133
167
  operations: Operations;
@@ -747,37 +747,53 @@ export declare type GuestOSType = "linux" | "windows" | "other";
747
747
 
748
748
  /** Known values of {@link CustomizationHostNameType} that the service accepts. */
749
749
  export declare enum KnownCustomizationHostNameType {
750
+ /** UserDefined */
750
751
  UserDefined = "USER_DEFINED",
752
+ /** PrefixBased */
751
753
  PrefixBased = "PREFIX_BASED",
754
+ /** Fixed */
752
755
  Fixed = "FIXED",
756
+ /** VirtualMachineName */
753
757
  VirtualMachineName = "VIRTUAL_MACHINE_NAME",
758
+ /** CustomName */
754
759
  CustomName = "CUSTOM_NAME"
755
760
  }
756
761
 
757
762
  /** Known values of {@link CustomizationIdentityType} that the service accepts. */
758
763
  export declare enum KnownCustomizationIdentityType {
764
+ /** WindowsText */
759
765
  WindowsText = "WINDOWS_TEXT",
766
+ /** Windows */
760
767
  Windows = "WINDOWS",
768
+ /** Linux */
761
769
  Linux = "LINUX"
762
770
  }
763
771
 
764
772
  /** Known values of {@link CustomizationIPAddressType} that the service accepts. */
765
773
  export declare enum KnownCustomizationIPAddressType {
774
+ /** Custom */
766
775
  Custom = "CUSTOM",
776
+ /** DhcpIP */
767
777
  DhcpIP = "DHCP_IP",
778
+ /** FixedIP */
768
779
  FixedIP = "FIXED_IP",
780
+ /** UserDefined */
769
781
  UserDefined = "USER_DEFINED"
770
782
  }
771
783
 
772
784
  /** Known values of {@link CustomizationPolicyPropertiesType} that the service accepts. */
773
785
  export declare enum KnownCustomizationPolicyPropertiesType {
786
+ /** Linux */
774
787
  Linux = "LINUX",
788
+ /** Windows */
775
789
  Windows = "WINDOWS"
776
790
  }
777
791
 
778
792
  /** Known values of {@link GuestOsnicCustomizationAllocation} that the service accepts. */
779
793
  export declare enum KnownGuestOsnicCustomizationAllocation {
794
+ /** Static */
780
795
  Static = "static",
796
+ /** Dynamic */
781
797
  Dynamic = "dynamic"
782
798
  }
783
799
 
@@ -1844,6 +1860,8 @@ export declare class VMwareCloudSimple extends coreClient.ServiceClient {
1844
1860
  * @param options The parameter options
1845
1861
  */
1846
1862
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: VMwareCloudSimpleOptionalParams);
1863
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
1864
+ private addCustomApiVersionPolicy;
1847
1865
  operations: Operations;
1848
1866
  dedicatedCloudNodes: DedicatedCloudNodes;
1849
1867
  dedicatedCloudServices: DedicatedCloudServices;