@openshift-migration-advisor/agent-sdk 0.8.0 → 0.12.0-d4bdc4301890
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.
- package/.openapi-generator/FILES +20 -2
- package/.openapi-generator/VERSION +1 -1
- package/README.md +29 -17
- package/dist/apis/DefaultApi.d.ts +260 -130
- package/dist/apis/DefaultApi.js +313 -172
- package/dist/esm/apis/DefaultApi.d.ts +260 -130
- package/dist/esm/apis/DefaultApi.js +295 -154
- package/dist/esm/models/InspectorStatus.d.ts +20 -7
- package/dist/esm/models/InspectorStatus.js +12 -7
- package/dist/esm/models/RightsizingCollectRequest.d.ts +70 -0
- package/dist/esm/models/RightsizingCollectRequest.js +56 -0
- package/dist/esm/models/RightsizingMetricStats.d.ts +62 -0
- package/dist/esm/models/RightsizingMetricStats.js +63 -0
- package/dist/esm/models/RightsizingReport.d.ts +81 -0
- package/dist/esm/models/RightsizingReport.js +76 -0
- package/dist/esm/models/RightsizingReportListResponse.d.ts +39 -0
- package/dist/esm/models/RightsizingReportListResponse.js +48 -0
- package/dist/esm/models/RightsizingReportSummary.d.ts +74 -0
- package/dist/esm/models/RightsizingReportSummary.js +71 -0
- package/dist/esm/models/RightsizingVMReport.d.ts +53 -0
- package/dist/esm/models/RightsizingVMReport.js +57 -0
- package/dist/esm/models/StartInspectionRequest.d.ts +32 -0
- package/dist/esm/models/StartInspectionRequest.js +43 -0
- package/dist/esm/models/VMs.d.ts +18 -0
- package/dist/esm/models/VMs.js +4 -0
- package/dist/esm/models/VirtualMachine.d.ts +31 -1
- package/dist/esm/models/VirtualMachine.js +12 -4
- package/dist/esm/models/VirtualMachineDetail.d.ts +3 -3
- package/dist/esm/models/VirtualMachineDetail.js +3 -3
- package/dist/esm/models/VmInspectionConcern.d.ts +44 -0
- package/dist/esm/models/VmInspectionConcern.js +51 -0
- package/dist/esm/models/VmInspectionResults.d.ts +33 -0
- package/dist/esm/models/VmInspectionResults.js +42 -0
- package/dist/esm/models/VmInspectionStatus.d.ts +0 -1
- package/dist/esm/models/VmInspectionStatus.js +1 -2
- package/dist/esm/models/VmUtilizationDetails.d.ts +98 -0
- package/dist/esm/models/VmUtilizationDetails.js +87 -0
- package/dist/esm/models/index.d.ts +10 -1
- package/dist/esm/models/index.js +10 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/InspectorStatus.d.ts +20 -7
- package/dist/models/InspectorStatus.js +12 -7
- package/dist/models/RightsizingCollectRequest.d.ts +70 -0
- package/dist/models/RightsizingCollectRequest.js +63 -0
- package/dist/models/RightsizingMetricStats.d.ts +62 -0
- package/dist/models/RightsizingMetricStats.js +70 -0
- package/dist/models/RightsizingReport.d.ts +81 -0
- package/dist/models/RightsizingReport.js +83 -0
- package/dist/models/RightsizingReportListResponse.d.ts +39 -0
- package/dist/models/RightsizingReportListResponse.js +55 -0
- package/dist/models/RightsizingReportSummary.d.ts +74 -0
- package/dist/models/RightsizingReportSummary.js +78 -0
- package/dist/models/RightsizingVMReport.d.ts +53 -0
- package/dist/models/RightsizingVMReport.js +64 -0
- package/dist/models/StartInspectionRequest.d.ts +32 -0
- package/dist/models/StartInspectionRequest.js +50 -0
- package/dist/models/VMs.d.ts +18 -0
- package/dist/models/VMs.js +4 -0
- package/dist/models/VirtualMachine.d.ts +31 -1
- package/dist/models/VirtualMachine.js +12 -4
- package/dist/models/VirtualMachineDetail.d.ts +3 -3
- package/dist/models/VirtualMachineDetail.js +3 -3
- package/dist/models/VmInspectionConcern.d.ts +44 -0
- package/dist/models/VmInspectionConcern.js +58 -0
- package/dist/models/VmInspectionResults.d.ts +33 -0
- package/dist/models/VmInspectionResults.js +49 -0
- package/dist/models/VmInspectionStatus.d.ts +0 -1
- package/dist/models/VmInspectionStatus.js +1 -2
- package/dist/models/VmUtilizationDetails.d.ts +98 -0
- package/dist/models/VmUtilizationDetails.js +94 -0
- package/dist/models/index.d.ts +10 -1
- package/dist/models/index.js +10 -1
- package/dist/runtime.js +1 -1
- package/docs/DefaultApi.md +368 -163
- package/docs/InspectorStatus.md +4 -0
- package/docs/RightsizingCollectRequest.md +46 -0
- package/docs/RightsizingMetricStats.md +44 -0
- package/docs/RightsizingReport.md +50 -0
- package/docs/RightsizingReportListResponse.md +36 -0
- package/docs/RightsizingReportSummary.md +49 -0
- package/docs/RightsizingVMReport.md +40 -0
- package/docs/{InspectorStartRequest.md → StartInspectionRequest.md} +5 -6
- package/docs/VMs.md +4 -0
- package/docs/VirtualMachine.md +12 -2
- package/docs/VirtualMachineDetail.md +1 -1
- package/docs/VmInspectionConcern.md +39 -0
- package/docs/VmInspectionResults.md +35 -0
- package/docs/VmUtilizationDetails.md +56 -0
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +564 -285
- package/src/models/InspectorStatus.ts +37 -7
- package/src/models/RightsizingCollectRequest.ts +123 -0
- package/src/models/RightsizingMetricStats.ts +111 -0
- package/src/models/RightsizingReport.ts +146 -0
- package/src/models/RightsizingReportListResponse.ts +83 -0
- package/src/models/RightsizingReportSummary.ts +129 -0
- package/src/models/RightsizingVMReport.ts +101 -0
- package/src/models/StartInspectionRequest.ts +66 -0
- package/src/models/VMs.ts +18 -0
- package/src/models/VirtualMachine.ts +43 -4
- package/src/models/VirtualMachineDetail.ts +11 -11
- package/src/models/VmInspectionConcern.ts +84 -0
- package/src/models/VmInspectionResults.ts +73 -0
- package/src/models/VmInspectionStatus.ts +1 -2
- package/src/models/VmUtilizationDetails.ts +165 -0
- package/src/models/index.ts +10 -1
- package/src/runtime.ts +1 -2
- package/dist/esm/models/InspectorStartRequest.d.ts +0 -39
- package/dist/esm/models/InspectorStartRequest.js +0 -48
- package/dist/models/InspectorStartRequest.d.ts +0 -39
- package/dist/models/InspectorStartRequest.js +0 -55
- package/src/models/InspectorStartRequest.ts +0 -83
|
@@ -21,51 +21,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime.js';
|
|
24
|
-
import { AgentModeRequestToJSON,
|
|
24
|
+
import { AgentModeRequestToJSON, } from '../models/AgentModeRequest.js';
|
|
25
|
+
import { AgentStatusFromJSON, } from '../models/AgentStatus.js';
|
|
26
|
+
import { CollectorStartRequestToJSON, } from '../models/CollectorStartRequest.js';
|
|
27
|
+
import { CollectorStatusFromJSON, } from '../models/CollectorStatus.js';
|
|
28
|
+
import { CreateGroupRequestToJSON, } from '../models/CreateGroupRequest.js';
|
|
29
|
+
import { GetInventory200ResponseFromJSON, } from '../models/GetInventory200Response.js';
|
|
30
|
+
import { GroupFromJSON, } from '../models/Group.js';
|
|
31
|
+
import { GroupListResponseFromJSON, } from '../models/GroupListResponse.js';
|
|
32
|
+
import { GroupResponseFromJSON, } from '../models/GroupResponse.js';
|
|
33
|
+
import { InspectorStatusFromJSON, } from '../models/InspectorStatus.js';
|
|
34
|
+
import { RightsizingCollectRequestToJSON, } from '../models/RightsizingCollectRequest.js';
|
|
35
|
+
import { RightsizingReportFromJSON, } from '../models/RightsizingReport.js';
|
|
36
|
+
import { RightsizingReportListResponseFromJSON, } from '../models/RightsizingReportListResponse.js';
|
|
37
|
+
import { RightsizingReportSummaryFromJSON, } from '../models/RightsizingReportSummary.js';
|
|
38
|
+
import { StartInspectionRequestToJSON, } from '../models/StartInspectionRequest.js';
|
|
39
|
+
import { UpdateGroupRequestToJSON, } from '../models/UpdateGroupRequest.js';
|
|
40
|
+
import { VcenterCredentialsToJSON, } from '../models/VcenterCredentials.js';
|
|
41
|
+
import { VddkPropertiesFromJSON, } from '../models/VddkProperties.js';
|
|
42
|
+
import { VersionInfoFromJSON, } from '../models/VersionInfo.js';
|
|
43
|
+
import { VirtualMachineDetailFromJSON, } from '../models/VirtualMachineDetail.js';
|
|
44
|
+
import { VirtualMachineListResponseFromJSON, } from '../models/VirtualMachineListResponse.js';
|
|
45
|
+
import { VmInspectionStatusFromJSON, } from '../models/VmInspectionStatus.js';
|
|
46
|
+
import { VmUtilizationDetailsFromJSON, } from '../models/VmUtilizationDetails.js';
|
|
25
47
|
/**
|
|
26
48
|
*
|
|
27
49
|
*/
|
|
28
50
|
export class DefaultApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Creates request options for addVMsToInspection without sending the request
|
|
31
|
-
*/
|
|
32
|
-
addVMsToInspectionRequestOpts(requestParameters) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (requestParameters['requestBody'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling addVMsToInspection().');
|
|
36
|
-
}
|
|
37
|
-
const queryParameters = {};
|
|
38
|
-
const headerParameters = {};
|
|
39
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
40
|
-
let urlPath = `/vms/inspector`;
|
|
41
|
-
return {
|
|
42
|
-
path: urlPath,
|
|
43
|
-
method: 'PATCH',
|
|
44
|
-
headers: headerParameters,
|
|
45
|
-
query: queryParameters,
|
|
46
|
-
body: requestParameters['requestBody'],
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Add more VMs to inspection queue
|
|
52
|
-
*/
|
|
53
|
-
addVMsToInspectionRaw(requestParameters, initOverrides) {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const requestOptions = yield this.addVMsToInspectionRequestOpts(requestParameters);
|
|
56
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
57
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => InspectorStatusFromJSON(jsonValue));
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Add more VMs to inspection queue
|
|
62
|
-
*/
|
|
63
|
-
addVMsToInspection(requestParameters, initOverrides) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
const response = yield this.addVMsToInspectionRaw(requestParameters, initOverrides);
|
|
66
|
-
return yield response.value();
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
51
|
/**
|
|
70
52
|
* Creates request options for createGroup without sending the request
|
|
71
53
|
*/
|
|
@@ -117,7 +99,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
117
99
|
const queryParameters = {};
|
|
118
100
|
const headerParameters = {};
|
|
119
101
|
let urlPath = `/groups/{id}`;
|
|
120
|
-
urlPath = urlPath.replace(
|
|
102
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
121
103
|
return {
|
|
122
104
|
path: urlPath,
|
|
123
105
|
method: 'DELETE',
|
|
@@ -234,7 +216,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
234
216
|
}
|
|
235
217
|
const headerParameters = {};
|
|
236
218
|
let urlPath = `/groups/{id}`;
|
|
237
|
-
urlPath = urlPath.replace(
|
|
219
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
238
220
|
return {
|
|
239
221
|
path: urlPath,
|
|
240
222
|
method: 'GET',
|
|
@@ -265,11 +247,17 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
265
247
|
/**
|
|
266
248
|
* Creates request options for getInspectorStatus without sending the request
|
|
267
249
|
*/
|
|
268
|
-
getInspectorStatusRequestOpts() {
|
|
250
|
+
getInspectorStatusRequestOpts(requestParameters) {
|
|
269
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
252
|
const queryParameters = {};
|
|
253
|
+
if (requestParameters['includeVddk'] != null) {
|
|
254
|
+
queryParameters['includeVddk'] = requestParameters['includeVddk'];
|
|
255
|
+
}
|
|
256
|
+
if (requestParameters['includeCredentials'] != null) {
|
|
257
|
+
queryParameters['includeCredentials'] = requestParameters['includeCredentials'];
|
|
258
|
+
}
|
|
271
259
|
const headerParameters = {};
|
|
272
|
-
let urlPath = `/
|
|
260
|
+
let urlPath = `/inspector`;
|
|
273
261
|
return {
|
|
274
262
|
path: urlPath,
|
|
275
263
|
method: 'GET',
|
|
@@ -281,9 +269,9 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
281
269
|
/**
|
|
282
270
|
* Get inspector status
|
|
283
271
|
*/
|
|
284
|
-
getInspectorStatusRaw(initOverrides) {
|
|
272
|
+
getInspectorStatusRaw(requestParameters, initOverrides) {
|
|
285
273
|
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
const requestOptions = yield this.getInspectorStatusRequestOpts();
|
|
274
|
+
const requestOptions = yield this.getInspectorStatusRequestOpts(requestParameters);
|
|
287
275
|
const response = yield this.request(requestOptions, initOverrides);
|
|
288
276
|
return new runtime.JSONApiResponse(response, (jsonValue) => InspectorStatusFromJSON(jsonValue));
|
|
289
277
|
});
|
|
@@ -291,9 +279,44 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
291
279
|
/**
|
|
292
280
|
* Get inspector status
|
|
293
281
|
*/
|
|
294
|
-
getInspectorStatus(
|
|
282
|
+
getInspectorStatus() {
|
|
283
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
284
|
+
const response = yield this.getInspectorStatusRaw(requestParameters, initOverrides);
|
|
285
|
+
return yield response.value();
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Creates request options for getInspectorVddkStatus without sending the request
|
|
290
|
+
*/
|
|
291
|
+
getInspectorVddkStatusRequestOpts() {
|
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
+
const queryParameters = {};
|
|
294
|
+
const headerParameters = {};
|
|
295
|
+
let urlPath = `/inspector/vddk`;
|
|
296
|
+
return {
|
|
297
|
+
path: urlPath,
|
|
298
|
+
method: 'GET',
|
|
299
|
+
headers: headerParameters,
|
|
300
|
+
query: queryParameters,
|
|
301
|
+
};
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Get VDDK status
|
|
306
|
+
*/
|
|
307
|
+
getInspectorVddkStatusRaw(initOverrides) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
+
const requestOptions = yield this.getInspectorVddkStatusRequestOpts();
|
|
310
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
311
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VddkPropertiesFromJSON(jsonValue));
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Get VDDK status
|
|
316
|
+
*/
|
|
317
|
+
getInspectorVddkStatus(initOverrides) {
|
|
295
318
|
return __awaiter(this, void 0, void 0, function* () {
|
|
296
|
-
const response = yield this.
|
|
319
|
+
const response = yield this.getInspectorVddkStatusRaw(initOverrides);
|
|
297
320
|
return yield response.value();
|
|
298
321
|
});
|
|
299
322
|
}
|
|
@@ -338,6 +361,45 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
338
361
|
return yield response.value();
|
|
339
362
|
});
|
|
340
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* Creates request options for getRightsizingReport without sending the request
|
|
366
|
+
*/
|
|
367
|
+
getRightsizingReportRequestOpts(requestParameters) {
|
|
368
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
if (requestParameters['id'] == null) {
|
|
370
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getRightsizingReport().');
|
|
371
|
+
}
|
|
372
|
+
const queryParameters = {};
|
|
373
|
+
const headerParameters = {};
|
|
374
|
+
let urlPath = `/rightsizing/{id}`;
|
|
375
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
376
|
+
return {
|
|
377
|
+
path: urlPath,
|
|
378
|
+
method: 'GET',
|
|
379
|
+
headers: headerParameters,
|
|
380
|
+
query: queryParameters,
|
|
381
|
+
};
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Get a specific rightsizing report with full VM metrics
|
|
386
|
+
*/
|
|
387
|
+
getRightsizingReportRaw(requestParameters, initOverrides) {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
389
|
+
const requestOptions = yield this.getRightsizingReportRequestOpts(requestParameters);
|
|
390
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
391
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingReportFromJSON(jsonValue));
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Get a specific rightsizing report with full VM metrics
|
|
396
|
+
*/
|
|
397
|
+
getRightsizingReport(requestParameters, initOverrides) {
|
|
398
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
+
const response = yield this.getRightsizingReportRaw(requestParameters, initOverrides);
|
|
400
|
+
return yield response.value();
|
|
401
|
+
});
|
|
402
|
+
}
|
|
341
403
|
/**
|
|
342
404
|
* Creates request options for getVM without sending the request
|
|
343
405
|
*/
|
|
@@ -349,7 +411,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
349
411
|
const queryParameters = {};
|
|
350
412
|
const headerParameters = {};
|
|
351
413
|
let urlPath = `/vms/{id}`;
|
|
352
|
-
urlPath = urlPath.replace(
|
|
414
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
353
415
|
return {
|
|
354
416
|
path: urlPath,
|
|
355
417
|
method: 'GET',
|
|
@@ -378,17 +440,17 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
378
440
|
});
|
|
379
441
|
}
|
|
380
442
|
/**
|
|
381
|
-
* Creates request options for
|
|
443
|
+
* Creates request options for getVMUtilization without sending the request
|
|
382
444
|
*/
|
|
383
|
-
|
|
445
|
+
getVMUtilizationRequestOpts(requestParameters) {
|
|
384
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
385
447
|
if (requestParameters['id'] == null) {
|
|
386
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
448
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getVMUtilization().');
|
|
387
449
|
}
|
|
388
450
|
const queryParameters = {};
|
|
389
451
|
const headerParameters = {};
|
|
390
|
-
let urlPath = `/vms/{id}/
|
|
391
|
-
urlPath = urlPath.replace(
|
|
452
|
+
let urlPath = `/vms/{id}/utilization`;
|
|
453
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
392
454
|
return {
|
|
393
455
|
path: urlPath,
|
|
394
456
|
method: 'GET',
|
|
@@ -398,21 +460,21 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
398
460
|
});
|
|
399
461
|
}
|
|
400
462
|
/**
|
|
401
|
-
* Get
|
|
463
|
+
* Get utilization breakdown for a specific VM
|
|
402
464
|
*/
|
|
403
|
-
|
|
465
|
+
getVMUtilizationRaw(requestParameters, initOverrides) {
|
|
404
466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
-
const requestOptions = yield this.
|
|
467
|
+
const requestOptions = yield this.getVMUtilizationRequestOpts(requestParameters);
|
|
406
468
|
const response = yield this.request(requestOptions, initOverrides);
|
|
407
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
469
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VmUtilizationDetailsFromJSON(jsonValue));
|
|
408
470
|
});
|
|
409
471
|
}
|
|
410
472
|
/**
|
|
411
|
-
* Get
|
|
473
|
+
* Get utilization breakdown for a specific VM
|
|
412
474
|
*/
|
|
413
|
-
|
|
475
|
+
getVMUtilization(requestParameters, initOverrides) {
|
|
414
476
|
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
-
const response = yield this.
|
|
477
|
+
const response = yield this.getVMUtilizationRaw(requestParameters, initOverrides);
|
|
416
478
|
return yield response.value();
|
|
417
479
|
});
|
|
418
480
|
}
|
|
@@ -463,41 +525,6 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
463
525
|
return yield response.value();
|
|
464
526
|
});
|
|
465
527
|
}
|
|
466
|
-
/**
|
|
467
|
-
* Creates request options for getVddkStatus without sending the request
|
|
468
|
-
*/
|
|
469
|
-
getVddkStatusRequestOpts() {
|
|
470
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
471
|
-
const queryParameters = {};
|
|
472
|
-
const headerParameters = {};
|
|
473
|
-
let urlPath = `/vddk`;
|
|
474
|
-
return {
|
|
475
|
-
path: urlPath,
|
|
476
|
-
method: 'GET',
|
|
477
|
-
headers: headerParameters,
|
|
478
|
-
query: queryParameters,
|
|
479
|
-
};
|
|
480
|
-
});
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* Get VDDK status
|
|
484
|
-
*/
|
|
485
|
-
getVddkStatusRaw(initOverrides) {
|
|
486
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
487
|
-
const requestOptions = yield this.getVddkStatusRequestOpts();
|
|
488
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
489
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => VddkPropertiesFromJSON(jsonValue));
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Get VDDK status
|
|
494
|
-
*/
|
|
495
|
-
getVddkStatus(initOverrides) {
|
|
496
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
497
|
-
const response = yield this.getVddkStatusRaw(initOverrides);
|
|
498
|
-
return yield response.value();
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
528
|
/**
|
|
502
529
|
* Creates request options for getVersion without sending the request
|
|
503
530
|
*/
|
|
@@ -577,6 +604,137 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
577
604
|
return yield response.value();
|
|
578
605
|
});
|
|
579
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* Creates request options for listRightsizingReports without sending the request
|
|
609
|
+
*/
|
|
610
|
+
listRightsizingReportsRequestOpts() {
|
|
611
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
612
|
+
const queryParameters = {};
|
|
613
|
+
const headerParameters = {};
|
|
614
|
+
let urlPath = `/rightsizing`;
|
|
615
|
+
return {
|
|
616
|
+
path: urlPath,
|
|
617
|
+
method: 'GET',
|
|
618
|
+
headers: headerParameters,
|
|
619
|
+
query: queryParameters,
|
|
620
|
+
};
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* List all rightsizing reports
|
|
625
|
+
*/
|
|
626
|
+
listRightsizingReportsRaw(initOverrides) {
|
|
627
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
628
|
+
const requestOptions = yield this.listRightsizingReportsRequestOpts();
|
|
629
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
630
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingReportListResponseFromJSON(jsonValue));
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* List all rightsizing reports
|
|
635
|
+
*/
|
|
636
|
+
listRightsizingReports(initOverrides) {
|
|
637
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
638
|
+
const response = yield this.listRightsizingReportsRaw(initOverrides);
|
|
639
|
+
return yield response.value();
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Creates request options for putInspectorCredentials without sending the request
|
|
644
|
+
*/
|
|
645
|
+
putInspectorCredentialsRequestOpts(requestParameters) {
|
|
646
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
647
|
+
if (requestParameters['vcenterCredentials'] == null) {
|
|
648
|
+
throw new runtime.RequiredError('vcenterCredentials', 'Required parameter "vcenterCredentials" was null or undefined when calling putInspectorCredentials().');
|
|
649
|
+
}
|
|
650
|
+
const queryParameters = {};
|
|
651
|
+
const headerParameters = {};
|
|
652
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
653
|
+
let urlPath = `/inspector/credentials`;
|
|
654
|
+
return {
|
|
655
|
+
path: urlPath,
|
|
656
|
+
method: 'PUT',
|
|
657
|
+
headers: headerParameters,
|
|
658
|
+
query: queryParameters,
|
|
659
|
+
body: VcenterCredentialsToJSON(requestParameters['vcenterCredentials']),
|
|
660
|
+
};
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Set or replace inspector credentials
|
|
665
|
+
*/
|
|
666
|
+
putInspectorCredentialsRaw(requestParameters, initOverrides) {
|
|
667
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
668
|
+
const requestOptions = yield this.putInspectorCredentialsRequestOpts(requestParameters);
|
|
669
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
670
|
+
return new runtime.VoidApiResponse(response);
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Set or replace inspector credentials
|
|
675
|
+
*/
|
|
676
|
+
putInspectorCredentials(requestParameters, initOverrides) {
|
|
677
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
678
|
+
yield this.putInspectorCredentialsRaw(requestParameters, initOverrides);
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Creates request options for putInspectorVddk without sending the request
|
|
683
|
+
*/
|
|
684
|
+
putInspectorVddkRequestOpts(requestParameters) {
|
|
685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
686
|
+
if (requestParameters['file'] == null) {
|
|
687
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling putInspectorVddk().');
|
|
688
|
+
}
|
|
689
|
+
const queryParameters = {};
|
|
690
|
+
const headerParameters = {};
|
|
691
|
+
const consumes = [
|
|
692
|
+
{ contentType: 'multipart/form-data' },
|
|
693
|
+
];
|
|
694
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
695
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
696
|
+
let formParams;
|
|
697
|
+
let useForm = false;
|
|
698
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
699
|
+
useForm = canConsumeForm;
|
|
700
|
+
if (useForm) {
|
|
701
|
+
formParams = new FormData();
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
formParams = new URLSearchParams();
|
|
705
|
+
}
|
|
706
|
+
if (requestParameters['file'] != null) {
|
|
707
|
+
formParams.append('file', requestParameters['file']);
|
|
708
|
+
}
|
|
709
|
+
let urlPath = `/inspector/vddk`;
|
|
710
|
+
return {
|
|
711
|
+
path: urlPath,
|
|
712
|
+
method: 'PUT',
|
|
713
|
+
headers: headerParameters,
|
|
714
|
+
query: queryParameters,
|
|
715
|
+
body: formParams,
|
|
716
|
+
};
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Upload VDDK tarball
|
|
721
|
+
*/
|
|
722
|
+
putInspectorVddkRaw(requestParameters, initOverrides) {
|
|
723
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
724
|
+
const requestOptions = yield this.putInspectorVddkRequestOpts(requestParameters);
|
|
725
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
726
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VddkPropertiesFromJSON(jsonValue));
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Upload VDDK tarball
|
|
731
|
+
*/
|
|
732
|
+
putInspectorVddk(requestParameters, initOverrides) {
|
|
733
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
734
|
+
const response = yield this.putInspectorVddkRaw(requestParameters, initOverrides);
|
|
735
|
+
return yield response.value();
|
|
736
|
+
});
|
|
737
|
+
}
|
|
580
738
|
/**
|
|
581
739
|
* Creates request options for removeVMFromInspection without sending the request
|
|
582
740
|
*/
|
|
@@ -587,8 +745,8 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
587
745
|
}
|
|
588
746
|
const queryParameters = {};
|
|
589
747
|
const headerParameters = {};
|
|
590
|
-
let urlPath = `/vms/{id}/
|
|
591
|
-
urlPath = urlPath.replace(
|
|
748
|
+
let urlPath = `/vms/{id}/inspection`;
|
|
749
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
592
750
|
return {
|
|
593
751
|
path: urlPath,
|
|
594
752
|
method: 'DELETE',
|
|
@@ -701,19 +859,19 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
701
859
|
*/
|
|
702
860
|
startInspectionRequestOpts(requestParameters) {
|
|
703
861
|
return __awaiter(this, void 0, void 0, function* () {
|
|
704
|
-
if (requestParameters['
|
|
705
|
-
throw new runtime.RequiredError('
|
|
862
|
+
if (requestParameters['startInspectionRequest'] == null) {
|
|
863
|
+
throw new runtime.RequiredError('startInspectionRequest', 'Required parameter "startInspectionRequest" was null or undefined when calling startInspection().');
|
|
706
864
|
}
|
|
707
865
|
const queryParameters = {};
|
|
708
866
|
const headerParameters = {};
|
|
709
867
|
headerParameters['Content-Type'] = 'application/json';
|
|
710
|
-
let urlPath = `/
|
|
868
|
+
let urlPath = `/inspector`;
|
|
711
869
|
return {
|
|
712
870
|
path: urlPath,
|
|
713
871
|
method: 'POST',
|
|
714
872
|
headers: headerParameters,
|
|
715
873
|
query: queryParameters,
|
|
716
|
-
body:
|
|
874
|
+
body: StartInspectionRequestToJSON(requestParameters['startInspectionRequest']),
|
|
717
875
|
};
|
|
718
876
|
});
|
|
719
877
|
}
|
|
@@ -777,7 +935,7 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
777
935
|
return __awaiter(this, void 0, void 0, function* () {
|
|
778
936
|
const queryParameters = {};
|
|
779
937
|
const headerParameters = {};
|
|
780
|
-
let urlPath = `/
|
|
938
|
+
let urlPath = `/inspector`;
|
|
781
939
|
return {
|
|
782
940
|
path: urlPath,
|
|
783
941
|
method: 'DELETE',
|
|
@@ -806,103 +964,86 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
806
964
|
});
|
|
807
965
|
}
|
|
808
966
|
/**
|
|
809
|
-
* Creates request options for
|
|
967
|
+
* Creates request options for triggerRightsizingCollection without sending the request
|
|
810
968
|
*/
|
|
811
|
-
|
|
969
|
+
triggerRightsizingCollectionRequestOpts(requestParameters) {
|
|
812
970
|
return __awaiter(this, void 0, void 0, function* () {
|
|
813
|
-
if (requestParameters['
|
|
814
|
-
throw new runtime.RequiredError('
|
|
815
|
-
}
|
|
816
|
-
if (requestParameters['updateGroupRequest'] == null) {
|
|
817
|
-
throw new runtime.RequiredError('updateGroupRequest', 'Required parameter "updateGroupRequest" was null or undefined when calling updateGroup().');
|
|
971
|
+
if (requestParameters['rightsizingCollectRequest'] == null) {
|
|
972
|
+
throw new runtime.RequiredError('rightsizingCollectRequest', 'Required parameter "rightsizingCollectRequest" was null or undefined when calling triggerRightsizingCollection().');
|
|
818
973
|
}
|
|
819
974
|
const queryParameters = {};
|
|
820
975
|
const headerParameters = {};
|
|
821
976
|
headerParameters['Content-Type'] = 'application/json';
|
|
822
|
-
let urlPath = `/
|
|
823
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
977
|
+
let urlPath = `/rightsizing`;
|
|
824
978
|
return {
|
|
825
979
|
path: urlPath,
|
|
826
|
-
method: '
|
|
980
|
+
method: 'POST',
|
|
827
981
|
headers: headerParameters,
|
|
828
982
|
query: queryParameters,
|
|
829
|
-
body:
|
|
983
|
+
body: RightsizingCollectRequestToJSON(requestParameters['rightsizingCollectRequest']),
|
|
830
984
|
};
|
|
831
985
|
});
|
|
832
986
|
}
|
|
833
987
|
/**
|
|
834
|
-
*
|
|
988
|
+
* Trigger rightsizing metrics collection
|
|
835
989
|
*/
|
|
836
|
-
|
|
990
|
+
triggerRightsizingCollectionRaw(requestParameters, initOverrides) {
|
|
837
991
|
return __awaiter(this, void 0, void 0, function* () {
|
|
838
|
-
const requestOptions = yield this.
|
|
992
|
+
const requestOptions = yield this.triggerRightsizingCollectionRequestOpts(requestParameters);
|
|
839
993
|
const response = yield this.request(requestOptions, initOverrides);
|
|
840
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
994
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingReportSummaryFromJSON(jsonValue));
|
|
841
995
|
});
|
|
842
996
|
}
|
|
843
997
|
/**
|
|
844
|
-
*
|
|
998
|
+
* Trigger rightsizing metrics collection
|
|
845
999
|
*/
|
|
846
|
-
|
|
1000
|
+
triggerRightsizingCollection(requestParameters, initOverrides) {
|
|
847
1001
|
return __awaiter(this, void 0, void 0, function* () {
|
|
848
|
-
const response = yield this.
|
|
1002
|
+
const response = yield this.triggerRightsizingCollectionRaw(requestParameters, initOverrides);
|
|
849
1003
|
return yield response.value();
|
|
850
1004
|
});
|
|
851
1005
|
}
|
|
852
1006
|
/**
|
|
853
|
-
* Creates request options for
|
|
1007
|
+
* Creates request options for updateGroup without sending the request
|
|
854
1008
|
*/
|
|
855
|
-
|
|
1009
|
+
updateGroupRequestOpts(requestParameters) {
|
|
856
1010
|
return __awaiter(this, void 0, void 0, function* () {
|
|
857
|
-
if (requestParameters['
|
|
858
|
-
throw new runtime.RequiredError('
|
|
1011
|
+
if (requestParameters['id'] == null) {
|
|
1012
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateGroup().');
|
|
1013
|
+
}
|
|
1014
|
+
if (requestParameters['updateGroupRequest'] == null) {
|
|
1015
|
+
throw new runtime.RequiredError('updateGroupRequest', 'Required parameter "updateGroupRequest" was null or undefined when calling updateGroup().');
|
|
859
1016
|
}
|
|
860
1017
|
const queryParameters = {};
|
|
861
1018
|
const headerParameters = {};
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
];
|
|
865
|
-
// @ts-ignore: canConsumeForm may be unused
|
|
866
|
-
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
867
|
-
let formParams;
|
|
868
|
-
let useForm = false;
|
|
869
|
-
// use FormData to transmit files using content-type "multipart/form-data"
|
|
870
|
-
useForm = canConsumeForm;
|
|
871
|
-
if (useForm) {
|
|
872
|
-
formParams = new FormData();
|
|
873
|
-
}
|
|
874
|
-
else {
|
|
875
|
-
formParams = new URLSearchParams();
|
|
876
|
-
}
|
|
877
|
-
if (requestParameters['file'] != null) {
|
|
878
|
-
formParams.append('file', requestParameters['file']);
|
|
879
|
-
}
|
|
880
|
-
let urlPath = `/vddk`;
|
|
1019
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1020
|
+
let urlPath = `/groups/{id}`;
|
|
1021
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
881
1022
|
return {
|
|
882
1023
|
path: urlPath,
|
|
883
|
-
method: '
|
|
1024
|
+
method: 'PATCH',
|
|
884
1025
|
headers: headerParameters,
|
|
885
1026
|
query: queryParameters,
|
|
886
|
-
body:
|
|
1027
|
+
body: UpdateGroupRequestToJSON(requestParameters['updateGroupRequest']),
|
|
887
1028
|
};
|
|
888
1029
|
});
|
|
889
1030
|
}
|
|
890
1031
|
/**
|
|
891
|
-
*
|
|
1032
|
+
* Update group
|
|
892
1033
|
*/
|
|
893
|
-
|
|
1034
|
+
updateGroupRaw(requestParameters, initOverrides) {
|
|
894
1035
|
return __awaiter(this, void 0, void 0, function* () {
|
|
895
|
-
const requestOptions = yield this.
|
|
1036
|
+
const requestOptions = yield this.updateGroupRequestOpts(requestParameters);
|
|
896
1037
|
const response = yield this.request(requestOptions, initOverrides);
|
|
897
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
1038
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GroupFromJSON(jsonValue));
|
|
898
1039
|
});
|
|
899
1040
|
}
|
|
900
1041
|
/**
|
|
901
|
-
*
|
|
1042
|
+
* Update group
|
|
902
1043
|
*/
|
|
903
|
-
|
|
1044
|
+
updateGroup(requestParameters, initOverrides) {
|
|
904
1045
|
return __awaiter(this, void 0, void 0, function* () {
|
|
905
|
-
const response = yield this.
|
|
1046
|
+
const response = yield this.updateGroupRaw(requestParameters, initOverrides);
|
|
906
1047
|
return yield response.value();
|
|
907
1048
|
});
|
|
908
1049
|
}
|