@openshift-migration-advisor/agent-sdk 0.12.0-d5edcd6935f2 → 0.12.0-e4c04f972747
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 +22 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +25 -5
- package/dist/apis/DefaultApi.d.ts +369 -38
- package/dist/apis/DefaultApi.js +410 -43
- package/dist/esm/apis/DefaultApi.d.ts +369 -38
- package/dist/esm/apis/DefaultApi.js +410 -43
- package/dist/esm/models/AgentStatus.d.ts +1 -1
- package/dist/esm/models/AgentStatus.js +3 -3
- package/dist/esm/models/ApplicationListResponse.d.ts +33 -0
- package/dist/esm/models/ApplicationListResponse.js +44 -0
- package/dist/esm/models/ApplicationOverview.d.ts +51 -0
- package/dist/esm/models/ApplicationOverview.js +56 -0
- package/dist/esm/models/ApplicationVM.d.ts +38 -0
- package/dist/esm/models/ApplicationVM.js +47 -0
- package/dist/esm/models/ClusterFeatures.d.ts +54 -0
- package/dist/esm/models/ClusterFeatures.js +54 -0
- package/dist/esm/models/ClusterUtilization.d.ts +68 -0
- package/dist/esm/models/ClusterUtilization.js +67 -0
- package/dist/esm/models/CreateGroupRequest.d.ts +0 -6
- package/dist/esm/models/CreateGroupRequest.js +0 -2
- package/dist/esm/models/DeleteLabelGloballyResponse.d.ts +38 -0
- package/dist/esm/models/DeleteLabelGloballyResponse.js +47 -0
- package/dist/esm/models/Group.d.ts +0 -6
- package/dist/esm/models/Group.js +0 -2
- package/dist/esm/models/GroupResponse.d.ts +7 -0
- package/dist/esm/models/GroupResponse.js +3 -0
- package/dist/esm/models/Inventory.d.ts +7 -1
- package/dist/esm/models/Inventory.js +5 -3
- package/dist/esm/models/InventoryData.d.ts +14 -0
- package/dist/esm/models/InventoryData.js +6 -0
- package/dist/esm/models/RightsizingClusterListResponse.d.ts +1 -1
- package/dist/esm/models/RightsizingClusterListResponse.js +3 -3
- package/dist/esm/models/RightsizingClusterResponse.d.ts +39 -0
- package/dist/esm/models/RightsizingClusterResponse.js +48 -0
- package/dist/esm/models/RightsizingClusterUtilization.d.ts +12 -12
- package/dist/esm/models/RightsizingClusterUtilization.js +36 -36
- package/dist/esm/models/RightsizingCollectRequest.d.ts +6 -6
- package/dist/esm/models/RightsizingCollectRequest.js +12 -12
- package/dist/esm/models/RightsizingMetricStats.d.ts +1 -1
- package/dist/esm/models/RightsizingMetricStats.js +3 -3
- package/dist/esm/models/RightsizingReport.d.ts +6 -6
- package/dist/esm/models/RightsizingReport.js +18 -18
- package/dist/esm/models/RightsizingReportSummary.d.ts +6 -6
- package/dist/esm/models/RightsizingReportSummary.js +18 -18
- package/dist/esm/models/UpdateGroupRequest.d.ts +0 -6
- package/dist/esm/models/UpdateGroupRequest.js +0 -2
- package/dist/esm/models/UpdateLabelVMsRequest.d.ts +38 -0
- package/dist/esm/models/UpdateLabelVMsRequest.js +43 -0
- package/dist/esm/models/VMFilterOptionsResponse.d.ts +56 -0
- package/dist/esm/models/VMFilterOptionsResponse.js +59 -0
- package/dist/esm/models/VMLabelsResponse.d.ts +38 -0
- package/dist/esm/models/VMLabelsResponse.js +47 -0
- package/dist/esm/models/VMNIC.d.ts +12 -0
- package/dist/esm/models/VMNIC.js +4 -0
- package/dist/esm/models/VirtualMachine.d.ts +30 -6
- package/dist/esm/models/VirtualMachine.js +18 -10
- package/dist/esm/models/VirtualMachineDetail.d.ts +12 -0
- package/dist/esm/models/VirtualMachineDetail.js +4 -0
- package/dist/esm/models/VirtualMachineUpdateRequest.d.ts +38 -0
- package/dist/esm/models/VirtualMachineUpdateRequest.js +43 -0
- package/dist/esm/models/VmUtilizationDetails.d.ts +12 -12
- package/dist/esm/models/VmUtilizationDetails.js +36 -36
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.js +11 -0
- package/dist/models/AgentStatus.d.ts +1 -1
- package/dist/models/AgentStatus.js +3 -3
- package/dist/models/ApplicationListResponse.d.ts +33 -0
- package/dist/models/ApplicationListResponse.js +51 -0
- package/dist/models/ApplicationOverview.d.ts +51 -0
- package/dist/models/ApplicationOverview.js +63 -0
- package/dist/models/ApplicationVM.d.ts +38 -0
- package/dist/models/ApplicationVM.js +54 -0
- package/dist/models/ClusterFeatures.d.ts +54 -0
- package/dist/models/ClusterFeatures.js +62 -0
- package/dist/models/ClusterUtilization.d.ts +68 -0
- package/dist/models/ClusterUtilization.js +74 -0
- package/dist/models/CreateGroupRequest.d.ts +0 -6
- package/dist/models/CreateGroupRequest.js +0 -2
- package/dist/models/DeleteLabelGloballyResponse.d.ts +38 -0
- package/dist/models/DeleteLabelGloballyResponse.js +54 -0
- package/dist/models/Group.d.ts +0 -6
- package/dist/models/Group.js +0 -2
- package/dist/models/GroupResponse.d.ts +7 -0
- package/dist/models/GroupResponse.js +3 -0
- package/dist/models/Inventory.d.ts +7 -1
- package/dist/models/Inventory.js +5 -3
- package/dist/models/InventoryData.d.ts +14 -0
- package/dist/models/InventoryData.js +6 -0
- package/dist/models/RightsizingClusterListResponse.d.ts +1 -1
- package/dist/models/RightsizingClusterListResponse.js +3 -3
- package/dist/models/RightsizingClusterResponse.d.ts +39 -0
- package/dist/models/RightsizingClusterResponse.js +55 -0
- package/dist/models/RightsizingClusterUtilization.d.ts +12 -12
- package/dist/models/RightsizingClusterUtilization.js +36 -36
- package/dist/models/RightsizingCollectRequest.d.ts +6 -6
- package/dist/models/RightsizingCollectRequest.js +12 -12
- package/dist/models/RightsizingMetricStats.d.ts +1 -1
- package/dist/models/RightsizingMetricStats.js +3 -3
- package/dist/models/RightsizingReport.d.ts +6 -6
- package/dist/models/RightsizingReport.js +18 -18
- package/dist/models/RightsizingReportSummary.d.ts +6 -6
- package/dist/models/RightsizingReportSummary.js +18 -18
- package/dist/models/UpdateGroupRequest.d.ts +0 -6
- package/dist/models/UpdateGroupRequest.js +0 -2
- package/dist/models/UpdateLabelVMsRequest.d.ts +38 -0
- package/dist/models/UpdateLabelVMsRequest.js +50 -0
- package/dist/models/VMFilterOptionsResponse.d.ts +56 -0
- package/dist/models/VMFilterOptionsResponse.js +66 -0
- package/dist/models/VMLabelsResponse.d.ts +38 -0
- package/dist/models/VMLabelsResponse.js +54 -0
- package/dist/models/VMNIC.d.ts +12 -0
- package/dist/models/VMNIC.js +4 -0
- package/dist/models/VirtualMachine.d.ts +30 -6
- package/dist/models/VirtualMachine.js +18 -10
- package/dist/models/VirtualMachineDetail.d.ts +12 -0
- package/dist/models/VirtualMachineDetail.js +4 -0
- package/dist/models/VirtualMachineUpdateRequest.d.ts +38 -0
- package/dist/models/VirtualMachineUpdateRequest.js +50 -0
- package/dist/models/VmUtilizationDetails.d.ts +12 -12
- package/dist/models/VmUtilizationDetails.js +36 -36
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +11 -0
- package/docs/AgentStatus.md +2 -2
- package/docs/ApplicationListResponse.md +34 -0
- package/docs/ApplicationOverview.md +40 -0
- package/docs/ApplicationVM.md +36 -0
- package/docs/ClusterFeatures.md +38 -0
- package/docs/ClusterUtilization.md +46 -0
- package/docs/CreateGroupRequest.md +0 -2
- package/docs/DefaultApi.md +679 -79
- package/docs/DeleteLabelGloballyResponse.md +36 -0
- package/docs/GetInventory200Response.md +4 -2
- package/docs/Group.md +0 -2
- package/docs/GroupResponse.md +2 -0
- package/docs/Inventory.md +4 -2
- package/docs/InventoryData.md +4 -0
- package/docs/RightsizingClusterListResponse.md +2 -2
- package/docs/RightsizingClusterResponse.md +36 -0
- package/docs/RightsizingClusterUtilization.md +24 -24
- package/docs/RightsizingCollectRequest.md +12 -12
- package/docs/RightsizingMetricStats.md +2 -2
- package/docs/RightsizingReport.md +12 -12
- package/docs/RightsizingReportSummary.md +12 -12
- package/docs/UpdateGroupRequest.md +0 -2
- package/docs/UpdateLabelVMsRequest.md +36 -0
- package/docs/VMFilterOptionsResponse.md +42 -0
- package/docs/VMLabelsResponse.md +36 -0
- package/docs/VMNIC.md +4 -0
- package/docs/VirtualMachine.md +18 -10
- package/docs/VirtualMachineDetail.md +4 -0
- package/docs/VirtualMachineUpdateRequest.md +36 -0
- package/docs/VmUtilizationDetails.md +24 -24
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +806 -111
- package/src/models/AgentStatus.ts +4 -4
- package/src/models/ApplicationListResponse.ts +74 -0
- package/src/models/ApplicationOverview.ts +101 -0
- package/src/models/ApplicationVM.ts +75 -0
- package/src/models/ClusterFeatures.ts +94 -0
- package/src/models/ClusterUtilization.ts +120 -0
- package/src/models/CreateGroupRequest.ts +0 -8
- package/src/models/DeleteLabelGloballyResponse.ts +75 -0
- package/src/models/Group.ts +0 -8
- package/src/models/GroupResponse.ts +15 -0
- package/src/models/Inventory.ts +12 -4
- package/src/models/InventoryData.ts +30 -0
- package/src/models/RightsizingClusterListResponse.ts +4 -4
- package/src/models/RightsizingClusterResponse.ts +83 -0
- package/src/models/RightsizingClusterUtilization.ts +48 -48
- package/src/models/RightsizingCollectRequest.ts +18 -18
- package/src/models/RightsizingMetricStats.ts +4 -4
- package/src/models/RightsizingReport.ts +24 -24
- package/src/models/RightsizingReportSummary.ts +24 -24
- package/src/models/UpdateGroupRequest.ts +0 -8
- package/src/models/UpdateLabelVMsRequest.ts +73 -0
- package/src/models/VMFilterOptionsResponse.ts +102 -0
- package/src/models/VMLabelsResponse.ts +75 -0
- package/src/models/VMNIC.ts +16 -0
- package/src/models/VirtualMachine.ts +48 -16
- package/src/models/VirtualMachineDetail.ts +16 -0
- package/src/models/VirtualMachineUpdateRequest.ts +73 -0
- package/src/models/VmUtilizationDetails.ts +48 -48
- package/src/models/index.ts +11 -0
package/dist/apis/DefaultApi.js
CHANGED
|
@@ -26,11 +26,13 @@ exports.DefaultApi = void 0;
|
|
|
26
26
|
const runtime = require("../runtime.js");
|
|
27
27
|
const AgentModeRequest_js_1 = require("../models/AgentModeRequest.js");
|
|
28
28
|
const AgentStatus_js_1 = require("../models/AgentStatus.js");
|
|
29
|
+
const ApplicationListResponse_js_1 = require("../models/ApplicationListResponse.js");
|
|
29
30
|
const BenchmarkRun_js_1 = require("../models/BenchmarkRun.js");
|
|
30
31
|
const CollectorStartRequest_js_1 = require("../models/CollectorStartRequest.js");
|
|
31
32
|
const CollectorStatus_js_1 = require("../models/CollectorStatus.js");
|
|
32
33
|
const CreateGroupRequest_js_1 = require("../models/CreateGroupRequest.js");
|
|
33
34
|
const DatastoreDetail_js_1 = require("../models/DatastoreDetail.js");
|
|
35
|
+
const DeleteLabelGloballyResponse_js_1 = require("../models/DeleteLabelGloballyResponse.js");
|
|
34
36
|
const ForecastStats_js_1 = require("../models/ForecastStats.js");
|
|
35
37
|
const ForecasterDatastoresRequest_js_1 = require("../models/ForecasterDatastoresRequest.js");
|
|
36
38
|
const ForecasterStartRequest_js_1 = require("../models/ForecasterStartRequest.js");
|
|
@@ -43,6 +45,7 @@ const InspectorStatus_js_1 = require("../models/InspectorStatus.js");
|
|
|
43
45
|
const PairCapability_js_1 = require("../models/PairCapability.js");
|
|
44
46
|
const PairCapabilityRequest_js_1 = require("../models/PairCapabilityRequest.js");
|
|
45
47
|
const RightsizingClusterListResponse_js_1 = require("../models/RightsizingClusterListResponse.js");
|
|
48
|
+
const RightsizingClusterResponse_js_1 = require("../models/RightsizingClusterResponse.js");
|
|
46
49
|
const RightsizingCollectRequest_js_1 = require("../models/RightsizingCollectRequest.js");
|
|
47
50
|
const RightsizingReport_js_1 = require("../models/RightsizingReport.js");
|
|
48
51
|
const RightsizingReportListResponse_js_1 = require("../models/RightsizingReportListResponse.js");
|
|
@@ -50,11 +53,15 @@ const RightsizingReportSummary_js_1 = require("../models/RightsizingReportSummar
|
|
|
50
53
|
const StartInspectionRequest_js_1 = require("../models/StartInspectionRequest.js");
|
|
51
54
|
const StopForecasterPair202Response_js_1 = require("../models/StopForecasterPair202Response.js");
|
|
52
55
|
const UpdateGroupRequest_js_1 = require("../models/UpdateGroupRequest.js");
|
|
56
|
+
const UpdateLabelVMsRequest_js_1 = require("../models/UpdateLabelVMsRequest.js");
|
|
57
|
+
const VMFilterOptionsResponse_js_1 = require("../models/VMFilterOptionsResponse.js");
|
|
58
|
+
const VMLabelsResponse_js_1 = require("../models/VMLabelsResponse.js");
|
|
53
59
|
const VcenterCredentials_js_1 = require("../models/VcenterCredentials.js");
|
|
54
60
|
const VddkProperties_js_1 = require("../models/VddkProperties.js");
|
|
55
61
|
const VersionInfo_js_1 = require("../models/VersionInfo.js");
|
|
56
62
|
const VirtualMachineDetail_js_1 = require("../models/VirtualMachineDetail.js");
|
|
57
63
|
const VirtualMachineListResponse_js_1 = require("../models/VirtualMachineListResponse.js");
|
|
64
|
+
const VirtualMachineUpdateRequest_js_1 = require("../models/VirtualMachineUpdateRequest.js");
|
|
58
65
|
const VmInspectionStatus_js_1 = require("../models/VmInspectionStatus.js");
|
|
59
66
|
const VmUtilizationDetails_js_1 = require("../models/VmUtilizationDetails.js");
|
|
60
67
|
/**
|
|
@@ -177,6 +184,45 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
177
184
|
yield this.deleteGroupRaw(requestParameters, initOverrides);
|
|
178
185
|
});
|
|
179
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Creates request options for deleteLabelGlobally without sending the request
|
|
189
|
+
*/
|
|
190
|
+
deleteLabelGloballyRequestOpts(requestParameters) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
if (requestParameters['label'] == null) {
|
|
193
|
+
throw new runtime.RequiredError('label', 'Required parameter "label" was null or undefined when calling deleteLabelGlobally().');
|
|
194
|
+
}
|
|
195
|
+
const queryParameters = {};
|
|
196
|
+
const headerParameters = {};
|
|
197
|
+
let urlPath = `/vms/labels/{label}`;
|
|
198
|
+
urlPath = urlPath.replace('{label}', encodeURIComponent(String(requestParameters['label'])));
|
|
199
|
+
return {
|
|
200
|
+
path: urlPath,
|
|
201
|
+
method: 'DELETE',
|
|
202
|
+
headers: headerParameters,
|
|
203
|
+
query: queryParameters,
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Delete label from all VMs
|
|
209
|
+
*/
|
|
210
|
+
deleteLabelGloballyRaw(requestParameters, initOverrides) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
const requestOptions = yield this.deleteLabelGloballyRequestOpts(requestParameters);
|
|
213
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
214
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, DeleteLabelGloballyResponse_js_1.DeleteLabelGloballyResponseFromJSON)(jsonValue));
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Delete label from all VMs
|
|
219
|
+
*/
|
|
220
|
+
deleteLabelGlobally(requestParameters, initOverrides) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
const response = yield this.deleteLabelGloballyRaw(requestParameters, initOverrides);
|
|
223
|
+
return yield response.value();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
180
226
|
/**
|
|
181
227
|
* Creates request options for getAgentStatus without sending the request
|
|
182
228
|
*/
|
|
@@ -212,6 +258,80 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
212
258
|
return yield response.value();
|
|
213
259
|
});
|
|
214
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Creates request options for getApplications without sending the request
|
|
263
|
+
*/
|
|
264
|
+
getApplicationsRequestOpts() {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
const queryParameters = {};
|
|
267
|
+
const headerParameters = {};
|
|
268
|
+
let urlPath = `/applications`;
|
|
269
|
+
return {
|
|
270
|
+
path: urlPath,
|
|
271
|
+
method: 'GET',
|
|
272
|
+
headers: headerParameters,
|
|
273
|
+
query: queryParameters,
|
|
274
|
+
};
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* List detected applications running on VMs
|
|
279
|
+
*/
|
|
280
|
+
getApplicationsRaw(initOverrides) {
|
|
281
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
+
const requestOptions = yield this.getApplicationsRequestOpts();
|
|
283
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
284
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ApplicationListResponse_js_1.ApplicationListResponseFromJSON)(jsonValue));
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* List detected applications running on VMs
|
|
289
|
+
*/
|
|
290
|
+
getApplications(initOverrides) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const response = yield this.getApplicationsRaw(initOverrides);
|
|
293
|
+
return yield response.value();
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Creates request options for getClusterUtilization without sending the request
|
|
298
|
+
*/
|
|
299
|
+
getClusterUtilizationRequestOpts(requestParameters) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
+
if (requestParameters['clusterId'] == null) {
|
|
302
|
+
throw new runtime.RequiredError('clusterId', 'Required parameter "clusterId" was null or undefined when calling getClusterUtilization().');
|
|
303
|
+
}
|
|
304
|
+
const queryParameters = {};
|
|
305
|
+
const headerParameters = {};
|
|
306
|
+
let urlPath = `/clusters/{cluster_id}/utilization`;
|
|
307
|
+
urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
|
|
308
|
+
return {
|
|
309
|
+
path: urlPath,
|
|
310
|
+
method: 'GET',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Get latest cluster utilization by cluster ID
|
|
318
|
+
*/
|
|
319
|
+
getClusterUtilizationRaw(requestParameters, initOverrides) {
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
const requestOptions = yield this.getClusterUtilizationRequestOpts(requestParameters);
|
|
322
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
323
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingClusterResponse_js_1.RightsizingClusterResponseFromJSON)(jsonValue));
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Get latest cluster utilization by cluster ID
|
|
328
|
+
*/
|
|
329
|
+
getClusterUtilization(requestParameters, initOverrides) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
const response = yield this.getClusterUtilizationRaw(requestParameters, initOverrides);
|
|
332
|
+
return yield response.value();
|
|
333
|
+
});
|
|
334
|
+
}
|
|
215
335
|
/**
|
|
216
336
|
* Creates request options for getCollectorStatus without sending the request
|
|
217
337
|
*/
|
|
@@ -570,6 +690,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
570
690
|
}
|
|
571
691
|
/**
|
|
572
692
|
* Creates request options for getLatestRightsizingClusters without sending the request
|
|
693
|
+
* @deprecated
|
|
573
694
|
*/
|
|
574
695
|
getLatestRightsizingClustersRequestOpts(requestParameters) {
|
|
575
696
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -589,6 +710,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
589
710
|
}
|
|
590
711
|
/**
|
|
591
712
|
* Get cluster-level utilization aggregates for the latest completed report
|
|
713
|
+
* @deprecated
|
|
592
714
|
*/
|
|
593
715
|
getLatestRightsizingClustersRaw(requestParameters, initOverrides) {
|
|
594
716
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -599,6 +721,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
599
721
|
}
|
|
600
722
|
/**
|
|
601
723
|
* Get cluster-level utilization aggregates for the latest completed report
|
|
724
|
+
* @deprecated
|
|
602
725
|
*/
|
|
603
726
|
getLatestRightsizingClusters() {
|
|
604
727
|
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
@@ -611,13 +734,13 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
611
734
|
*/
|
|
612
735
|
getRightsizingReportRequestOpts(requestParameters) {
|
|
613
736
|
return __awaiter(this, void 0, void 0, function* () {
|
|
614
|
-
if (requestParameters['
|
|
615
|
-
throw new runtime.RequiredError('
|
|
737
|
+
if (requestParameters['reportId'] == null) {
|
|
738
|
+
throw new runtime.RequiredError('reportId', 'Required parameter "reportId" was null or undefined when calling getRightsizingReport().');
|
|
616
739
|
}
|
|
617
740
|
const queryParameters = {};
|
|
618
741
|
const headerParameters = {};
|
|
619
|
-
let urlPath = `/rightsizing/{
|
|
620
|
-
urlPath = urlPath.replace('{
|
|
742
|
+
let urlPath = `/rightsizing/{report_id}`;
|
|
743
|
+
urlPath = urlPath.replace('{report_id}', encodeURIComponent(String(requestParameters['reportId'])));
|
|
621
744
|
return {
|
|
622
745
|
path: urlPath,
|
|
623
746
|
method: 'GET',
|
|
@@ -645,8 +768,52 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
645
768
|
return yield response.value();
|
|
646
769
|
});
|
|
647
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* Creates request options for getRightsizingReportCluster without sending the request
|
|
773
|
+
*/
|
|
774
|
+
getRightsizingReportClusterRequestOpts(requestParameters) {
|
|
775
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
776
|
+
if (requestParameters['reportId'] == null) {
|
|
777
|
+
throw new runtime.RequiredError('reportId', 'Required parameter "reportId" was null or undefined when calling getRightsizingReportCluster().');
|
|
778
|
+
}
|
|
779
|
+
if (requestParameters['clusterId'] == null) {
|
|
780
|
+
throw new runtime.RequiredError('clusterId', 'Required parameter "clusterId" was null or undefined when calling getRightsizingReportCluster().');
|
|
781
|
+
}
|
|
782
|
+
const queryParameters = {};
|
|
783
|
+
const headerParameters = {};
|
|
784
|
+
let urlPath = `/rightsizing/{report_id}/clusters/{cluster_id}`;
|
|
785
|
+
urlPath = urlPath.replace('{report_id}', encodeURIComponent(String(requestParameters['reportId'])));
|
|
786
|
+
urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
|
|
787
|
+
return {
|
|
788
|
+
path: urlPath,
|
|
789
|
+
method: 'GET',
|
|
790
|
+
headers: headerParameters,
|
|
791
|
+
query: queryParameters,
|
|
792
|
+
};
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Get utilization for a specific cluster from a specific report
|
|
797
|
+
*/
|
|
798
|
+
getRightsizingReportClusterRaw(requestParameters, initOverrides) {
|
|
799
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
800
|
+
const requestOptions = yield this.getRightsizingReportClusterRequestOpts(requestParameters);
|
|
801
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
802
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingClusterResponse_js_1.RightsizingClusterResponseFromJSON)(jsonValue));
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Get utilization for a specific cluster from a specific report
|
|
807
|
+
*/
|
|
808
|
+
getRightsizingReportCluster(requestParameters, initOverrides) {
|
|
809
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
810
|
+
const response = yield this.getRightsizingReportClusterRaw(requestParameters, initOverrides);
|
|
811
|
+
return yield response.value();
|
|
812
|
+
});
|
|
813
|
+
}
|
|
648
814
|
/**
|
|
649
815
|
* Creates request options for getRightsizingReportClusters without sending the request
|
|
816
|
+
* @deprecated
|
|
650
817
|
*/
|
|
651
818
|
getRightsizingReportClustersRequestOpts(requestParameters) {
|
|
652
819
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -670,6 +837,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
670
837
|
}
|
|
671
838
|
/**
|
|
672
839
|
* Get cluster-level utilization aggregates for a specific report
|
|
840
|
+
* @deprecated
|
|
673
841
|
*/
|
|
674
842
|
getRightsizingReportClustersRaw(requestParameters, initOverrides) {
|
|
675
843
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -680,6 +848,7 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
680
848
|
}
|
|
681
849
|
/**
|
|
682
850
|
* Get cluster-level utilization aggregates for a specific report
|
|
851
|
+
* @deprecated
|
|
683
852
|
*/
|
|
684
853
|
getRightsizingReportClusters(requestParameters, initOverrides) {
|
|
685
854
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -726,6 +895,41 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
726
895
|
return yield response.value();
|
|
727
896
|
});
|
|
728
897
|
}
|
|
898
|
+
/**
|
|
899
|
+
* Creates request options for getVMLabels without sending the request
|
|
900
|
+
*/
|
|
901
|
+
getVMLabelsRequestOpts() {
|
|
902
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
903
|
+
const queryParameters = {};
|
|
904
|
+
const headerParameters = {};
|
|
905
|
+
let urlPath = `/vms/labels`;
|
|
906
|
+
return {
|
|
907
|
+
path: urlPath,
|
|
908
|
+
method: 'GET',
|
|
909
|
+
headers: headerParameters,
|
|
910
|
+
query: queryParameters,
|
|
911
|
+
};
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Get all distinct labels in use across VMs
|
|
916
|
+
*/
|
|
917
|
+
getVMLabelsRaw(initOverrides) {
|
|
918
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
919
|
+
const requestOptions = yield this.getVMLabelsRequestOpts();
|
|
920
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
921
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VMLabelsResponse_js_1.VMLabelsResponseFromJSON)(jsonValue));
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Get all distinct labels in use across VMs
|
|
926
|
+
*/
|
|
927
|
+
getVMLabels(initOverrides) {
|
|
928
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
929
|
+
const response = yield this.getVMLabelsRaw(initOverrides);
|
|
930
|
+
return yield response.value();
|
|
931
|
+
});
|
|
932
|
+
}
|
|
729
933
|
/**
|
|
730
934
|
* Creates request options for getVMUtilization without sending the request
|
|
731
935
|
*/
|
|
@@ -812,6 +1016,41 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
812
1016
|
return yield response.value();
|
|
813
1017
|
});
|
|
814
1018
|
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Creates request options for getVMsFilterOptions without sending the request
|
|
1021
|
+
*/
|
|
1022
|
+
getVMsFilterOptionsRequestOpts() {
|
|
1023
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1024
|
+
const queryParameters = {};
|
|
1025
|
+
const headerParameters = {};
|
|
1026
|
+
let urlPath = `/vms/filter-options`;
|
|
1027
|
+
return {
|
|
1028
|
+
path: urlPath,
|
|
1029
|
+
method: 'GET',
|
|
1030
|
+
headers: headerParameters,
|
|
1031
|
+
query: queryParameters,
|
|
1032
|
+
};
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Get distinct filter option values for VMs
|
|
1037
|
+
*/
|
|
1038
|
+
getVMsFilterOptionsRaw(initOverrides) {
|
|
1039
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1040
|
+
const requestOptions = yield this.getVMsFilterOptionsRequestOpts();
|
|
1041
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1042
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, VMFilterOptionsResponse_js_1.VMFilterOptionsResponseFromJSON)(jsonValue));
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Get distinct filter option values for VMs
|
|
1047
|
+
*/
|
|
1048
|
+
getVMsFilterOptions(initOverrides) {
|
|
1049
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1050
|
+
const response = yield this.getVMsFilterOptionsRaw(initOverrides);
|
|
1051
|
+
return yield response.value();
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
815
1054
|
/**
|
|
816
1055
|
* Creates request options for getVersion without sending the request
|
|
817
1056
|
*/
|
|
@@ -891,6 +1130,48 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
891
1130
|
return yield response.value();
|
|
892
1131
|
});
|
|
893
1132
|
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Creates request options for listRightsizingReportClusters without sending the request
|
|
1135
|
+
*/
|
|
1136
|
+
listRightsizingReportClustersRequestOpts(requestParameters) {
|
|
1137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1138
|
+
if (requestParameters['reportId'] == null) {
|
|
1139
|
+
throw new runtime.RequiredError('reportId', 'Required parameter "reportId" was null or undefined when calling listRightsizingReportClusters().');
|
|
1140
|
+
}
|
|
1141
|
+
const queryParameters = {};
|
|
1142
|
+
if (requestParameters['byExpression'] != null) {
|
|
1143
|
+
queryParameters['byExpression'] = requestParameters['byExpression'];
|
|
1144
|
+
}
|
|
1145
|
+
const headerParameters = {};
|
|
1146
|
+
let urlPath = `/rightsizing/{report_id}/clusters`;
|
|
1147
|
+
urlPath = urlPath.replace('{report_id}', encodeURIComponent(String(requestParameters['reportId'])));
|
|
1148
|
+
return {
|
|
1149
|
+
path: urlPath,
|
|
1150
|
+
method: 'GET',
|
|
1151
|
+
headers: headerParameters,
|
|
1152
|
+
query: queryParameters,
|
|
1153
|
+
};
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Get cluster-level utilization aggregates for a specific report
|
|
1158
|
+
*/
|
|
1159
|
+
listRightsizingReportClustersRaw(requestParameters, initOverrides) {
|
|
1160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1161
|
+
const requestOptions = yield this.listRightsizingReportClustersRequestOpts(requestParameters);
|
|
1162
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1163
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingClusterListResponse_js_1.RightsizingClusterListResponseFromJSON)(jsonValue));
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Get cluster-level utilization aggregates for a specific report
|
|
1168
|
+
*/
|
|
1169
|
+
listRightsizingReportClusters(requestParameters, initOverrides) {
|
|
1170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1171
|
+
const response = yield this.listRightsizingReportClustersRaw(requestParameters, initOverrides);
|
|
1172
|
+
return yield response.value();
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
894
1175
|
/**
|
|
895
1176
|
* Creates request options for listRightsizingReports without sending the request
|
|
896
1177
|
*/
|
|
@@ -1009,45 +1290,6 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1009
1290
|
yield this.putForecasterCredentialsRaw(requestParameters, initOverrides);
|
|
1010
1291
|
});
|
|
1011
1292
|
}
|
|
1012
|
-
/**
|
|
1013
|
-
* Creates request options for putInspectorCredentials without sending the request
|
|
1014
|
-
*/
|
|
1015
|
-
putInspectorCredentialsRequestOpts(requestParameters) {
|
|
1016
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1017
|
-
if (requestParameters['vcenterCredentials'] == null) {
|
|
1018
|
-
throw new runtime.RequiredError('vcenterCredentials', 'Required parameter "vcenterCredentials" was null or undefined when calling putInspectorCredentials().');
|
|
1019
|
-
}
|
|
1020
|
-
const queryParameters = {};
|
|
1021
|
-
const headerParameters = {};
|
|
1022
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1023
|
-
let urlPath = `/inspector/credentials`;
|
|
1024
|
-
return {
|
|
1025
|
-
path: urlPath,
|
|
1026
|
-
method: 'PUT',
|
|
1027
|
-
headers: headerParameters,
|
|
1028
|
-
query: queryParameters,
|
|
1029
|
-
body: (0, VcenterCredentials_js_1.VcenterCredentialsToJSON)(requestParameters['vcenterCredentials']),
|
|
1030
|
-
};
|
|
1031
|
-
});
|
|
1032
|
-
}
|
|
1033
|
-
/**
|
|
1034
|
-
* Set or replace inspector credentials
|
|
1035
|
-
*/
|
|
1036
|
-
putInspectorCredentialsRaw(requestParameters, initOverrides) {
|
|
1037
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1038
|
-
const requestOptions = yield this.putInspectorCredentialsRequestOpts(requestParameters);
|
|
1039
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
1040
|
-
return new runtime.VoidApiResponse(response);
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
/**
|
|
1044
|
-
* Set or replace inspector credentials
|
|
1045
|
-
*/
|
|
1046
|
-
putInspectorCredentials(requestParameters, initOverrides) {
|
|
1047
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1048
|
-
yield this.putInspectorCredentialsRaw(requestParameters, initOverrides);
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
1293
|
/**
|
|
1052
1294
|
* Creates request options for putInspectorVddk without sending the request
|
|
1053
1295
|
*/
|
|
@@ -1537,5 +1779,130 @@ class DefaultApi extends runtime.BaseAPI {
|
|
|
1537
1779
|
return yield response.value();
|
|
1538
1780
|
});
|
|
1539
1781
|
}
|
|
1782
|
+
/**
|
|
1783
|
+
* Creates request options for updateLabelVMs without sending the request
|
|
1784
|
+
*/
|
|
1785
|
+
updateLabelVMsRequestOpts(requestParameters) {
|
|
1786
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1787
|
+
if (requestParameters['label'] == null) {
|
|
1788
|
+
throw new runtime.RequiredError('label', 'Required parameter "label" was null or undefined when calling updateLabelVMs().');
|
|
1789
|
+
}
|
|
1790
|
+
if (requestParameters['updateLabelVMsRequest'] == null) {
|
|
1791
|
+
throw new runtime.RequiredError('updateLabelVMsRequest', 'Required parameter "updateLabelVMsRequest" was null or undefined when calling updateLabelVMs().');
|
|
1792
|
+
}
|
|
1793
|
+
const queryParameters = {};
|
|
1794
|
+
const headerParameters = {};
|
|
1795
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1796
|
+
let urlPath = `/vms/labels/{label}`;
|
|
1797
|
+
urlPath = urlPath.replace('{label}', encodeURIComponent(String(requestParameters['label'])));
|
|
1798
|
+
return {
|
|
1799
|
+
path: urlPath,
|
|
1800
|
+
method: 'PATCH',
|
|
1801
|
+
headers: headerParameters,
|
|
1802
|
+
query: queryParameters,
|
|
1803
|
+
body: (0, UpdateLabelVMsRequest_js_1.UpdateLabelVMsRequestToJSON)(requestParameters['updateLabelVMsRequest']),
|
|
1804
|
+
};
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* Modify label VM membership (add/remove label to/from VMs)
|
|
1809
|
+
*/
|
|
1810
|
+
updateLabelVMsRaw(requestParameters, initOverrides) {
|
|
1811
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1812
|
+
const requestOptions = yield this.updateLabelVMsRequestOpts(requestParameters);
|
|
1813
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1814
|
+
return new runtime.VoidApiResponse(response);
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Modify label VM membership (add/remove label to/from VMs)
|
|
1819
|
+
*/
|
|
1820
|
+
updateLabelVMs(requestParameters, initOverrides) {
|
|
1821
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1822
|
+
yield this.updateLabelVMsRaw(requestParameters, initOverrides);
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* Creates request options for updateVM without sending the request
|
|
1827
|
+
*/
|
|
1828
|
+
updateVMRequestOpts(requestParameters) {
|
|
1829
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1830
|
+
if (requestParameters['id'] == null) {
|
|
1831
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling updateVM().');
|
|
1832
|
+
}
|
|
1833
|
+
if (requestParameters['virtualMachineUpdateRequest'] == null) {
|
|
1834
|
+
throw new runtime.RequiredError('virtualMachineUpdateRequest', 'Required parameter "virtualMachineUpdateRequest" was null or undefined when calling updateVM().');
|
|
1835
|
+
}
|
|
1836
|
+
const queryParameters = {};
|
|
1837
|
+
const headerParameters = {};
|
|
1838
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1839
|
+
let urlPath = `/vms/{id}`;
|
|
1840
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
1841
|
+
return {
|
|
1842
|
+
path: urlPath,
|
|
1843
|
+
method: 'PATCH',
|
|
1844
|
+
headers: headerParameters,
|
|
1845
|
+
query: queryParameters,
|
|
1846
|
+
body: (0, VirtualMachineUpdateRequest_js_1.VirtualMachineUpdateRequestToJSON)(requestParameters['virtualMachineUpdateRequest']),
|
|
1847
|
+
};
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* Update VM properties
|
|
1852
|
+
*/
|
|
1853
|
+
updateVMRaw(requestParameters, initOverrides) {
|
|
1854
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1855
|
+
const requestOptions = yield this.updateVMRequestOpts(requestParameters);
|
|
1856
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1857
|
+
return new runtime.VoidApiResponse(response);
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
/**
|
|
1861
|
+
* Update VM properties
|
|
1862
|
+
*/
|
|
1863
|
+
updateVM(requestParameters, initOverrides) {
|
|
1864
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1865
|
+
yield this.updateVMRaw(requestParameters, initOverrides);
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* Creates request options for validateInspectorCredentials without sending the request
|
|
1870
|
+
*/
|
|
1871
|
+
validateInspectorCredentialsRequestOpts(requestParameters) {
|
|
1872
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1873
|
+
if (requestParameters['vcenterCredentials'] == null) {
|
|
1874
|
+
throw new runtime.RequiredError('vcenterCredentials', 'Required parameter "vcenterCredentials" was null or undefined when calling validateInspectorCredentials().');
|
|
1875
|
+
}
|
|
1876
|
+
const queryParameters = {};
|
|
1877
|
+
const headerParameters = {};
|
|
1878
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1879
|
+
let urlPath = `/inspector/credentials`;
|
|
1880
|
+
return {
|
|
1881
|
+
path: urlPath,
|
|
1882
|
+
method: 'POST',
|
|
1883
|
+
headers: headerParameters,
|
|
1884
|
+
query: queryParameters,
|
|
1885
|
+
body: (0, VcenterCredentials_js_1.VcenterCredentialsToJSON)(requestParameters['vcenterCredentials']),
|
|
1886
|
+
};
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* Validate vCenter credentials for inspector
|
|
1891
|
+
*/
|
|
1892
|
+
validateInspectorCredentialsRaw(requestParameters, initOverrides) {
|
|
1893
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1894
|
+
const requestOptions = yield this.validateInspectorCredentialsRequestOpts(requestParameters);
|
|
1895
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
1896
|
+
return new runtime.VoidApiResponse(response);
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* Validate vCenter credentials for inspector
|
|
1901
|
+
*/
|
|
1902
|
+
validateInspectorCredentials(requestParameters, initOverrides) {
|
|
1903
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1904
|
+
yield this.validateInspectorCredentialsRaw(requestParameters, initOverrides);
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1540
1907
|
}
|
|
1541
1908
|
exports.DefaultApi = DefaultApi;
|