@openshift-migration-advisor/agent-sdk 0.12.0-1f1dc16fb9e5 → 0.12.0-645d2fae3eee
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 +16 -0
- package/README.md +20 -4
- package/dist/apis/DefaultApi.d.ts +346 -41
- package/dist/apis/DefaultApi.js +380 -46
- package/dist/esm/apis/DefaultApi.d.ts +346 -41
- package/dist/esm/apis/DefaultApi.js +380 -46
- package/dist/esm/models/AgentStatus.d.ts +1 -1
- package/dist/esm/models/AgentStatus.js +3 -3
- package/dist/esm/models/ClusterFeatures.d.ts +54 -0
- package/dist/esm/models/ClusterFeatures.js +54 -0
- package/dist/esm/models/DeleteLabelGloballyResponse.d.ts +38 -0
- package/dist/esm/models/DeleteLabelGloballyResponse.js +47 -0
- package/dist/esm/models/InspectorStatus.d.ts +0 -17
- package/dist/esm/models/InspectorStatus.js +1 -10
- package/dist/esm/models/Inventory.d.ts +7 -1
- package/dist/esm/models/Inventory.js +5 -3
- package/dist/esm/models/InventoryData.d.ts +7 -0
- package/dist/esm/models/InventoryData.js +3 -0
- package/dist/esm/models/RightsizingClusterListResponse.d.ts +39 -0
- package/dist/esm/models/RightsizingClusterListResponse.js +48 -0
- package/dist/esm/models/RightsizingClusterResponse.d.ts +39 -0
- package/dist/esm/models/RightsizingClusterResponse.js +48 -0
- package/dist/esm/models/RightsizingClusterUtilization.d.ts +112 -0
- package/dist/esm/models/RightsizingClusterUtilization.js +95 -0
- 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/StartInspectionRequest.d.ts +8 -1
- package/dist/esm/models/StartInspectionRequest.js +5 -0
- package/dist/esm/models/UpdateLabelVMsRequest.d.ts +38 -0
- package/dist/esm/models/UpdateLabelVMsRequest.js +43 -0
- package/dist/esm/models/VMLabelsResponse.d.ts +38 -0
- package/dist/esm/models/VMLabelsResponse.js +47 -0
- package/dist/esm/models/VirtualMachine.d.ts +16 -4
- package/dist/esm/models/VirtualMachine.js +12 -8
- package/dist/esm/models/VirtualMachineDetail.d.ts +19 -0
- package/dist/esm/models/VirtualMachineDetail.js +7 -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 +27 -9
- package/dist/esm/models/VmUtilizationDetails.js +39 -27
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/AgentStatus.d.ts +1 -1
- package/dist/models/AgentStatus.js +3 -3
- package/dist/models/ClusterFeatures.d.ts +54 -0
- package/dist/models/ClusterFeatures.js +62 -0
- package/dist/models/DeleteLabelGloballyResponse.d.ts +38 -0
- package/dist/models/DeleteLabelGloballyResponse.js +54 -0
- package/dist/models/InspectorStatus.d.ts +0 -17
- package/dist/models/InspectorStatus.js +1 -10
- package/dist/models/Inventory.d.ts +7 -1
- package/dist/models/Inventory.js +5 -3
- package/dist/models/InventoryData.d.ts +7 -0
- package/dist/models/InventoryData.js +3 -0
- package/dist/models/RightsizingClusterListResponse.d.ts +39 -0
- package/dist/models/RightsizingClusterListResponse.js +55 -0
- package/dist/models/RightsizingClusterResponse.d.ts +39 -0
- package/dist/models/RightsizingClusterResponse.js +55 -0
- package/dist/models/RightsizingClusterUtilization.d.ts +112 -0
- package/dist/models/RightsizingClusterUtilization.js +102 -0
- 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/StartInspectionRequest.d.ts +8 -1
- package/dist/models/StartInspectionRequest.js +5 -0
- package/dist/models/UpdateLabelVMsRequest.d.ts +38 -0
- package/dist/models/UpdateLabelVMsRequest.js +50 -0
- package/dist/models/VMLabelsResponse.d.ts +38 -0
- package/dist/models/VMLabelsResponse.js +54 -0
- package/dist/models/VirtualMachine.d.ts +16 -4
- package/dist/models/VirtualMachine.js +12 -8
- package/dist/models/VirtualMachineDetail.d.ts +19 -0
- package/dist/models/VirtualMachineDetail.js +7 -0
- package/dist/models/VirtualMachineUpdateRequest.d.ts +38 -0
- package/dist/models/VirtualMachineUpdateRequest.js +50 -0
- package/dist/models/VmUtilizationDetails.d.ts +27 -9
- package/dist/models/VmUtilizationDetails.js +39 -27
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/AgentStatus.md +2 -2
- package/docs/ClusterFeatures.md +38 -0
- package/docs/DefaultApi.md +695 -146
- package/docs/DeleteLabelGloballyResponse.md +36 -0
- package/docs/GetInventory200Response.md +4 -2
- package/docs/InspectorStatus.md +0 -4
- package/docs/Inventory.md +4 -2
- package/docs/InventoryData.md +2 -0
- package/docs/RightsizingClusterListResponse.md +36 -0
- package/docs/RightsizingClusterResponse.md +36 -0
- package/docs/RightsizingClusterUtilization.md +60 -0
- 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/StartInspectionRequest.md +3 -1
- package/docs/UpdateLabelVMsRequest.md +36 -0
- package/docs/VMLabelsResponse.md +36 -0
- package/docs/VirtualMachine.md +12 -8
- package/docs/VirtualMachineDetail.md +6 -0
- package/docs/VirtualMachineUpdateRequest.md +36 -0
- package/docs/VmUtilizationDetails.md +24 -18
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +754 -112
- package/src/models/AgentStatus.ts +4 -4
- package/src/models/ClusterFeatures.ts +94 -0
- package/src/models/DeleteLabelGloballyResponse.ts +75 -0
- package/src/models/InspectorStatus.ts +1 -28
- package/src/models/Inventory.ts +12 -4
- package/src/models/InventoryData.ts +15 -0
- package/src/models/RightsizingClusterListResponse.ts +83 -0
- package/src/models/RightsizingClusterResponse.ts +83 -0
- package/src/models/RightsizingClusterUtilization.ts +185 -0
- 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/StartInspectionRequest.ts +18 -1
- package/src/models/UpdateLabelVMsRequest.ts +73 -0
- package/src/models/VMLabelsResponse.ts +75 -0
- package/src/models/VirtualMachine.ts +28 -12
- package/src/models/VirtualMachineDetail.ts +31 -0
- package/src/models/VirtualMachineUpdateRequest.ts +73 -0
- package/src/models/VmUtilizationDetails.ts +63 -36
- package/src/models/index.ts +8 -0
package/docs/DefaultApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
7
7
|
| [**createGroup**](DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group |
|
|
8
8
|
| [**deleteForecasterRun**](DefaultApi.md#deleteforecasterrun) | **DELETE** /forecaster/runs/{id} | Delete a benchmark run |
|
|
9
9
|
| [**deleteGroup**](DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group |
|
|
10
|
+
| [**deleteLabelGlobally**](DefaultApi.md#deletelabelglobally) | **DELETE** /vms/labels/{label} | Delete label from all VMs |
|
|
10
11
|
| [**getAgentStatus**](DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status |
|
|
11
12
|
| [**getCollectorStatus**](DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status |
|
|
12
13
|
| [**getForecasterDatastores**](DefaultApi.md#getforecasterdatastores) | **POST** /forecaster/datastores | List available datastores |
|
|
@@ -17,16 +18,20 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
17
18
|
| [**getInspectorStatus**](DefaultApi.md#getinspectorstatus) | **GET** /inspector | Get inspector status |
|
|
18
19
|
| [**getInspectorVddkStatus**](DefaultApi.md#getinspectorvddkstatus) | **GET** /inspector/vddk | Get VDDK status |
|
|
19
20
|
| [**getInventory**](DefaultApi.md#getinventory) | **GET** /inventory | Get collected inventory |
|
|
20
|
-
| [**
|
|
21
|
+
| [**getLatestRightsizingClusters**](DefaultApi.md#getlatestrightsizingclusters) | **GET** /cluster_rightsizing | Get cluster-level utilization aggregates for the latest completed report |
|
|
22
|
+
| [**getRightsizingReport**](DefaultApi.md#getrightsizingreport) | **GET** /rightsizing/{report_id} | Get a specific rightsizing report with full VM metrics |
|
|
23
|
+
| [**getRightsizingReportCluster**](DefaultApi.md#getrightsizingreportcluster) | **GET** /rightsizing/{report_id}/clusters/{cluster_id} | Get utilization for a specific cluster from a specific report |
|
|
24
|
+
| [**getRightsizingReportClusters**](DefaultApi.md#getrightsizingreportclusters) | **GET** /cluster_rightsizing/{report_id} | Get cluster-level utilization aggregates for a specific report |
|
|
21
25
|
| [**getVM**](DefaultApi.md#getvm) | **GET** /vms/{id} | Get details about a vm |
|
|
26
|
+
| [**getVMLabels**](DefaultApi.md#getvmlabels) | **GET** /vms/labels | Get all distinct labels in use across VMs |
|
|
22
27
|
| [**getVMUtilization**](DefaultApi.md#getvmutilization) | **GET** /vms/{id}/utilization | Get utilization breakdown for a specific VM |
|
|
23
28
|
| [**getVMs**](DefaultApi.md#getvms) | **GET** /vms | Get list of VMs with filtering and pagination |
|
|
24
29
|
| [**getVersion**](DefaultApi.md#getversion) | **GET** /version | Get agent version information |
|
|
25
30
|
| [**listGroups**](DefaultApi.md#listgroups) | **GET** /groups | List all groups |
|
|
31
|
+
| [**listRightsizingReportClusters**](DefaultApi.md#listrightsizingreportclusters) | **GET** /rightsizing/{report_id}/clusters | Get cluster-level utilization aggregates for a specific report |
|
|
26
32
|
| [**listRightsizingReports**](DefaultApi.md#listrightsizingreports) | **GET** /rightsizing | List all rightsizing reports |
|
|
27
33
|
| [**postForecasterPairCapabilities**](DefaultApi.md#postforecasterpaircapabilities) | **POST** /forecaster/capabilities | Compute pair capabilities |
|
|
28
34
|
| [**putForecasterCredentials**](DefaultApi.md#putforecastercredentials) | **PUT** /forecaster/credentials | Verify vCenter credentials and permissions |
|
|
29
|
-
| [**putInspectorCredentials**](DefaultApi.md#putinspectorcredentials) | **PUT** /inspector/credentials | Set or replace inspector credentials |
|
|
30
35
|
| [**putInspectorVddk**](DefaultApi.md#putinspectorvddk) | **PUT** /inspector/vddk | Upload VDDK tarball |
|
|
31
36
|
| [**removeVMFromInspection**](DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspection | Remove VirtualMachine from inspection queue |
|
|
32
37
|
| [**setAgentMode**](DefaultApi.md#setagentmode) | **POST** /agent | Change agent mode |
|
|
@@ -39,6 +44,9 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
39
44
|
| [**stopInspection**](DefaultApi.md#stopinspection) | **DELETE** /inspector | Stop inspector entirely |
|
|
40
45
|
| [**triggerRightsizingCollection**](DefaultApi.md#triggerrightsizingcollection) | **POST** /rightsizing | Trigger rightsizing metrics collection |
|
|
41
46
|
| [**updateGroup**](DefaultApi.md#updategroupoperation) | **PATCH** /groups/{id} | Update group |
|
|
47
|
+
| [**updateLabelVMs**](DefaultApi.md#updatelabelvmsoperation) | **PATCH** /vms/labels/{label} | Modify label VM membership (add/remove label to/from VMs) |
|
|
48
|
+
| [**updateVM**](DefaultApi.md#updatevm) | **PATCH** /vms/{id} | Update VM properties |
|
|
49
|
+
| [**validateInspectorCredentials**](DefaultApi.md#validateinspectorcredentials) | **POST** /inspector/credentials | Validate vCenter credentials for inspector |
|
|
42
50
|
|
|
43
51
|
|
|
44
52
|
|
|
@@ -243,6 +251,73 @@ No authorization required
|
|
|
243
251
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
244
252
|
|
|
245
253
|
|
|
254
|
+
## deleteLabelGlobally
|
|
255
|
+
|
|
256
|
+
> DeleteLabelGloballyResponse deleteLabelGlobally(label)
|
|
257
|
+
|
|
258
|
+
Delete label from all VMs
|
|
259
|
+
|
|
260
|
+
### Example
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
import {
|
|
264
|
+
Configuration,
|
|
265
|
+
DefaultApi,
|
|
266
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
267
|
+
import type { DeleteLabelGloballyRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
268
|
+
|
|
269
|
+
async function example() {
|
|
270
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
271
|
+
const api = new DefaultApi();
|
|
272
|
+
|
|
273
|
+
const body = {
|
|
274
|
+
// string | The label to remove from all VMs
|
|
275
|
+
label: label_example,
|
|
276
|
+
} satisfies DeleteLabelGloballyRequest;
|
|
277
|
+
|
|
278
|
+
try {
|
|
279
|
+
const data = await api.deleteLabelGlobally(body);
|
|
280
|
+
console.log(data);
|
|
281
|
+
} catch (error) {
|
|
282
|
+
console.error(error);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Run the test
|
|
287
|
+
example().catch(console.error);
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Parameters
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
| Name | Type | Description | Notes |
|
|
294
|
+
|------------- | ------------- | ------------- | -------------|
|
|
295
|
+
| **label** | `string` | The label to remove from all VMs | [Defaults to `undefined`] |
|
|
296
|
+
|
|
297
|
+
### Return type
|
|
298
|
+
|
|
299
|
+
[**DeleteLabelGloballyResponse**](DeleteLabelGloballyResponse.md)
|
|
300
|
+
|
|
301
|
+
### Authorization
|
|
302
|
+
|
|
303
|
+
No authorization required
|
|
304
|
+
|
|
305
|
+
### HTTP request headers
|
|
306
|
+
|
|
307
|
+
- **Content-Type**: Not defined
|
|
308
|
+
- **Accept**: `application/json`
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### HTTP response details
|
|
312
|
+
| Status code | Description | Response headers |
|
|
313
|
+
|-------------|-------------|------------------|
|
|
314
|
+
| **200** | Label removed globally | - |
|
|
315
|
+
| **400** | Invalid label parameter | - |
|
|
316
|
+
| **500** | Internal server error | - |
|
|
317
|
+
|
|
318
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
319
|
+
|
|
320
|
+
|
|
246
321
|
## getAgentStatus
|
|
247
322
|
|
|
248
323
|
> AgentStatus getAgentStatus()
|
|
@@ -701,7 +776,7 @@ No authorization required
|
|
|
701
776
|
|
|
702
777
|
## getInspectorStatus
|
|
703
778
|
|
|
704
|
-
> InspectorStatus getInspectorStatus(includeVddk
|
|
779
|
+
> InspectorStatus getInspectorStatus(includeVddk)
|
|
705
780
|
|
|
706
781
|
Get inspector status
|
|
707
782
|
|
|
@@ -721,8 +796,6 @@ async function example() {
|
|
|
721
796
|
const body = {
|
|
722
797
|
// boolean | If true, include uploaded VDDK metadata (`version`, `md5`) when present. omitted if VDDK was never uploaded. (optional)
|
|
723
798
|
includeVddk: true,
|
|
724
|
-
// boolean | If true, include configured vCenter URL and username (password is never returned). omitted if was never set. (optional)
|
|
725
|
-
includeCredentials: true,
|
|
726
799
|
} satisfies GetInspectorStatusRequest;
|
|
727
800
|
|
|
728
801
|
try {
|
|
@@ -743,7 +816,6 @@ example().catch(console.error);
|
|
|
743
816
|
| Name | Type | Description | Notes |
|
|
744
817
|
|------------- | ------------- | ------------- | -------------|
|
|
745
818
|
| **includeVddk** | `boolean` | If true, include uploaded VDDK metadata (`version`, `md5`) when present. omitted if VDDK was never uploaded. | [Optional] [Defaults to `false`] |
|
|
746
|
-
| **includeCredentials** | `boolean` | If true, include configured vCenter URL and username (password is never returned). omitted if was never set. | [Optional] [Defaults to `false`] |
|
|
747
819
|
|
|
748
820
|
### Return type
|
|
749
821
|
|
|
@@ -897,11 +969,11 @@ No authorization required
|
|
|
897
969
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
898
970
|
|
|
899
971
|
|
|
900
|
-
##
|
|
972
|
+
## getLatestRightsizingClusters
|
|
901
973
|
|
|
902
|
-
>
|
|
974
|
+
> RightsizingClusterListResponse getLatestRightsizingClusters(byExpression)
|
|
903
975
|
|
|
904
|
-
Get
|
|
976
|
+
Get cluster-level utilization aggregates for the latest completed report
|
|
905
977
|
|
|
906
978
|
### Example
|
|
907
979
|
|
|
@@ -910,19 +982,19 @@ import {
|
|
|
910
982
|
Configuration,
|
|
911
983
|
DefaultApi,
|
|
912
984
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
913
|
-
import type {
|
|
985
|
+
import type { GetLatestRightsizingClustersRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
914
986
|
|
|
915
987
|
async function example() {
|
|
916
988
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
917
989
|
const api = new DefaultApi();
|
|
918
990
|
|
|
919
991
|
const body = {
|
|
920
|
-
// string |
|
|
921
|
-
|
|
922
|
-
} satisfies
|
|
992
|
+
// string | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. (optional)
|
|
993
|
+
byExpression: byExpression_example,
|
|
994
|
+
} satisfies GetLatestRightsizingClustersRequest;
|
|
923
995
|
|
|
924
996
|
try {
|
|
925
|
-
const data = await api.
|
|
997
|
+
const data = await api.getLatestRightsizingClusters(body);
|
|
926
998
|
console.log(data);
|
|
927
999
|
} catch (error) {
|
|
928
1000
|
console.error(error);
|
|
@@ -938,11 +1010,11 @@ example().catch(console.error);
|
|
|
938
1010
|
|
|
939
1011
|
| Name | Type | Description | Notes |
|
|
940
1012
|
|------------- | ------------- | ------------- | -------------|
|
|
941
|
-
| **
|
|
1013
|
+
| **byExpression** | `string` | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. | [Optional] [Defaults to `undefined`] |
|
|
942
1014
|
|
|
943
1015
|
### Return type
|
|
944
1016
|
|
|
945
|
-
[**
|
|
1017
|
+
[**RightsizingClusterListResponse**](RightsizingClusterListResponse.md)
|
|
946
1018
|
|
|
947
1019
|
### Authorization
|
|
948
1020
|
|
|
@@ -957,18 +1029,18 @@ No authorization required
|
|
|
957
1029
|
### HTTP response details
|
|
958
1030
|
| Status code | Description | Response headers |
|
|
959
1031
|
|-------------|-------------|------------------|
|
|
960
|
-
| **200** |
|
|
961
|
-
| **404** |
|
|
1032
|
+
| **200** | Cluster utilization aggregates | - |
|
|
1033
|
+
| **404** | No completed rightsizing report found | - |
|
|
962
1034
|
| **500** | Internal server error | - |
|
|
963
1035
|
|
|
964
1036
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
965
1037
|
|
|
966
1038
|
|
|
967
|
-
##
|
|
1039
|
+
## getRightsizingReport
|
|
968
1040
|
|
|
969
|
-
>
|
|
1041
|
+
> RightsizingReport getRightsizingReport(reportId)
|
|
970
1042
|
|
|
971
|
-
Get
|
|
1043
|
+
Get a specific rightsizing report with full VM metrics
|
|
972
1044
|
|
|
973
1045
|
### Example
|
|
974
1046
|
|
|
@@ -977,19 +1049,19 @@ import {
|
|
|
977
1049
|
Configuration,
|
|
978
1050
|
DefaultApi,
|
|
979
1051
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
980
|
-
import type {
|
|
1052
|
+
import type { GetRightsizingReportRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
981
1053
|
|
|
982
1054
|
async function example() {
|
|
983
1055
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
984
1056
|
const api = new DefaultApi();
|
|
985
1057
|
|
|
986
1058
|
const body = {
|
|
987
|
-
// string |
|
|
988
|
-
|
|
989
|
-
} satisfies
|
|
1059
|
+
// string | Report UUID
|
|
1060
|
+
reportId: reportId_example,
|
|
1061
|
+
} satisfies GetRightsizingReportRequest;
|
|
990
1062
|
|
|
991
1063
|
try {
|
|
992
|
-
const data = await api.
|
|
1064
|
+
const data = await api.getRightsizingReport(body);
|
|
993
1065
|
console.log(data);
|
|
994
1066
|
} catch (error) {
|
|
995
1067
|
console.error(error);
|
|
@@ -1005,11 +1077,11 @@ example().catch(console.error);
|
|
|
1005
1077
|
|
|
1006
1078
|
| Name | Type | Description | Notes |
|
|
1007
1079
|
|------------- | ------------- | ------------- | -------------|
|
|
1008
|
-
| **
|
|
1080
|
+
| **reportId** | `string` | Report UUID | [Defaults to `undefined`] |
|
|
1009
1081
|
|
|
1010
1082
|
### Return type
|
|
1011
1083
|
|
|
1012
|
-
[**
|
|
1084
|
+
[**RightsizingReport**](RightsizingReport.md)
|
|
1013
1085
|
|
|
1014
1086
|
### Authorization
|
|
1015
1087
|
|
|
@@ -1024,18 +1096,18 @@ No authorization required
|
|
|
1024
1096
|
### HTTP response details
|
|
1025
1097
|
| Status code | Description | Response headers |
|
|
1026
1098
|
|-------------|-------------|------------------|
|
|
1027
|
-
| **200** |
|
|
1028
|
-
| **404** |
|
|
1099
|
+
| **200** | Rightsizing report | - |
|
|
1100
|
+
| **404** | Report not found | - |
|
|
1029
1101
|
| **500** | Internal server error | - |
|
|
1030
1102
|
|
|
1031
1103
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1032
1104
|
|
|
1033
1105
|
|
|
1034
|
-
##
|
|
1106
|
+
## getRightsizingReportCluster
|
|
1035
1107
|
|
|
1036
|
-
>
|
|
1108
|
+
> RightsizingClusterResponse getRightsizingReportCluster(reportId, clusterId)
|
|
1037
1109
|
|
|
1038
|
-
Get utilization
|
|
1110
|
+
Get utilization for a specific cluster from a specific report
|
|
1039
1111
|
|
|
1040
1112
|
### Example
|
|
1041
1113
|
|
|
@@ -1044,19 +1116,21 @@ import {
|
|
|
1044
1116
|
Configuration,
|
|
1045
1117
|
DefaultApi,
|
|
1046
1118
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1047
|
-
import type {
|
|
1119
|
+
import type { GetRightsizingReportClusterRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1048
1120
|
|
|
1049
1121
|
async function example() {
|
|
1050
1122
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1051
1123
|
const api = new DefaultApi();
|
|
1052
1124
|
|
|
1053
1125
|
const body = {
|
|
1054
|
-
// string |
|
|
1055
|
-
|
|
1056
|
-
|
|
1126
|
+
// string | Rightsizing report UUID
|
|
1127
|
+
reportId: reportId_example,
|
|
1128
|
+
// string | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\")
|
|
1129
|
+
clusterId: clusterId_example,
|
|
1130
|
+
} satisfies GetRightsizingReportClusterRequest;
|
|
1057
1131
|
|
|
1058
1132
|
try {
|
|
1059
|
-
const data = await api.
|
|
1133
|
+
const data = await api.getRightsizingReportCluster(body);
|
|
1060
1134
|
console.log(data);
|
|
1061
1135
|
} catch (error) {
|
|
1062
1136
|
console.error(error);
|
|
@@ -1072,11 +1146,12 @@ example().catch(console.error);
|
|
|
1072
1146
|
|
|
1073
1147
|
| Name | Type | Description | Notes |
|
|
1074
1148
|
|------------- | ------------- | ------------- | -------------|
|
|
1075
|
-
| **
|
|
1149
|
+
| **reportId** | `string` | Rightsizing report UUID | [Defaults to `undefined`] |
|
|
1150
|
+
| **clusterId** | `string` | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\") | [Defaults to `undefined`] |
|
|
1076
1151
|
|
|
1077
1152
|
### Return type
|
|
1078
1153
|
|
|
1079
|
-
[**
|
|
1154
|
+
[**RightsizingClusterResponse**](RightsizingClusterResponse.md)
|
|
1080
1155
|
|
|
1081
1156
|
### Authorization
|
|
1082
1157
|
|
|
@@ -1091,18 +1166,18 @@ No authorization required
|
|
|
1091
1166
|
### HTTP response details
|
|
1092
1167
|
| Status code | Description | Response headers |
|
|
1093
1168
|
|-------------|-------------|------------------|
|
|
1094
|
-
| **200** |
|
|
1095
|
-
| **404** |
|
|
1169
|
+
| **200** | Cluster utilization data | - |
|
|
1170
|
+
| **404** | Report not found, or cluster not found in report | - |
|
|
1096
1171
|
| **500** | Internal server error | - |
|
|
1097
1172
|
|
|
1098
1173
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1099
1174
|
|
|
1100
1175
|
|
|
1101
|
-
##
|
|
1176
|
+
## getRightsizingReportClusters
|
|
1102
1177
|
|
|
1103
|
-
>
|
|
1178
|
+
> RightsizingClusterListResponse getRightsizingReportClusters(reportId, byExpression)
|
|
1104
1179
|
|
|
1105
|
-
Get
|
|
1180
|
+
Get cluster-level utilization aggregates for a specific report
|
|
1106
1181
|
|
|
1107
1182
|
### Example
|
|
1108
1183
|
|
|
@@ -1111,25 +1186,21 @@ import {
|
|
|
1111
1186
|
Configuration,
|
|
1112
1187
|
DefaultApi,
|
|
1113
1188
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1114
|
-
import type {
|
|
1189
|
+
import type { GetRightsizingReportClustersRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1115
1190
|
|
|
1116
1191
|
async function example() {
|
|
1117
1192
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1118
1193
|
const api = new DefaultApi();
|
|
1119
1194
|
|
|
1120
1195
|
const body = {
|
|
1121
|
-
// string |
|
|
1122
|
-
|
|
1123
|
-
//
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
page: 56,
|
|
1127
|
-
// number | Number of items per page (optional)
|
|
1128
|
-
pageSize: 56,
|
|
1129
|
-
} satisfies GetVMsRequest;
|
|
1196
|
+
// string | Rightsizing report UUID
|
|
1197
|
+
reportId: reportId_example,
|
|
1198
|
+
// string | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. (optional)
|
|
1199
|
+
byExpression: byExpression_example,
|
|
1200
|
+
} satisfies GetRightsizingReportClustersRequest;
|
|
1130
1201
|
|
|
1131
1202
|
try {
|
|
1132
|
-
const data = await api.
|
|
1203
|
+
const data = await api.getRightsizingReportClusters(body);
|
|
1133
1204
|
console.log(data);
|
|
1134
1205
|
} catch (error) {
|
|
1135
1206
|
console.error(error);
|
|
@@ -1145,14 +1216,12 @@ example().catch(console.error);
|
|
|
1145
1216
|
|
|
1146
1217
|
| Name | Type | Description | Notes |
|
|
1147
1218
|
|------------- | ------------- | ------------- | -------------|
|
|
1148
|
-
| **
|
|
1149
|
-
| **
|
|
1150
|
-
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
1151
|
-
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
1219
|
+
| **reportId** | `string` | Rightsizing report UUID | [Defaults to `undefined`] |
|
|
1220
|
+
| **byExpression** | `string` | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. | [Optional] [Defaults to `undefined`] |
|
|
1152
1221
|
|
|
1153
1222
|
### Return type
|
|
1154
1223
|
|
|
1155
|
-
[**
|
|
1224
|
+
[**RightsizingClusterListResponse**](RightsizingClusterListResponse.md)
|
|
1156
1225
|
|
|
1157
1226
|
### Authorization
|
|
1158
1227
|
|
|
@@ -1167,18 +1236,18 @@ No authorization required
|
|
|
1167
1236
|
### HTTP response details
|
|
1168
1237
|
| Status code | Description | Response headers |
|
|
1169
1238
|
|-------------|-------------|------------------|
|
|
1170
|
-
| **200** |
|
|
1171
|
-
| **
|
|
1239
|
+
| **200** | Cluster utilization aggregates | - |
|
|
1240
|
+
| **404** | Report not found | - |
|
|
1172
1241
|
| **500** | Internal server error | - |
|
|
1173
1242
|
|
|
1174
1243
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1175
1244
|
|
|
1176
1245
|
|
|
1177
|
-
##
|
|
1246
|
+
## getVM
|
|
1178
1247
|
|
|
1179
|
-
>
|
|
1248
|
+
> VirtualMachineDetail getVM(id)
|
|
1180
1249
|
|
|
1181
|
-
Get
|
|
1250
|
+
Get details about a vm
|
|
1182
1251
|
|
|
1183
1252
|
### Example
|
|
1184
1253
|
|
|
@@ -1187,14 +1256,19 @@ import {
|
|
|
1187
1256
|
Configuration,
|
|
1188
1257
|
DefaultApi,
|
|
1189
1258
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1190
|
-
import type {
|
|
1259
|
+
import type { GetVMRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1191
1260
|
|
|
1192
1261
|
async function example() {
|
|
1193
1262
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1194
1263
|
const api = new DefaultApi();
|
|
1195
1264
|
|
|
1265
|
+
const body = {
|
|
1266
|
+
// string | VirtualMachine id
|
|
1267
|
+
id: id_example,
|
|
1268
|
+
} satisfies GetVMRequest;
|
|
1269
|
+
|
|
1196
1270
|
try {
|
|
1197
|
-
const data = await api.
|
|
1271
|
+
const data = await api.getVM(body);
|
|
1198
1272
|
console.log(data);
|
|
1199
1273
|
} catch (error) {
|
|
1200
1274
|
console.error(error);
|
|
@@ -1207,11 +1281,14 @@ example().catch(console.error);
|
|
|
1207
1281
|
|
|
1208
1282
|
### Parameters
|
|
1209
1283
|
|
|
1210
|
-
|
|
1284
|
+
|
|
1285
|
+
| Name | Type | Description | Notes |
|
|
1286
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1287
|
+
| **id** | `string` | VirtualMachine id | [Defaults to `undefined`] |
|
|
1211
1288
|
|
|
1212
1289
|
### Return type
|
|
1213
1290
|
|
|
1214
|
-
[**
|
|
1291
|
+
[**VirtualMachineDetail**](VirtualMachineDetail.md)
|
|
1215
1292
|
|
|
1216
1293
|
### Authorization
|
|
1217
1294
|
|
|
@@ -1226,16 +1303,18 @@ No authorization required
|
|
|
1226
1303
|
### HTTP response details
|
|
1227
1304
|
| Status code | Description | Response headers |
|
|
1228
1305
|
|-------------|-------------|------------------|
|
|
1229
|
-
| **200** |
|
|
1306
|
+
| **200** | VirtualMachine details | - |
|
|
1307
|
+
| **404** | VirtualMachine not found | - |
|
|
1308
|
+
| **500** | Internal server error | - |
|
|
1230
1309
|
|
|
1231
1310
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1232
1311
|
|
|
1233
1312
|
|
|
1234
|
-
##
|
|
1313
|
+
## getVMLabels
|
|
1235
1314
|
|
|
1236
|
-
>
|
|
1315
|
+
> VMLabelsResponse getVMLabels()
|
|
1237
1316
|
|
|
1238
|
-
|
|
1317
|
+
Get all distinct labels in use across VMs
|
|
1239
1318
|
|
|
1240
1319
|
### Example
|
|
1241
1320
|
|
|
@@ -1244,23 +1323,14 @@ import {
|
|
|
1244
1323
|
Configuration,
|
|
1245
1324
|
DefaultApi,
|
|
1246
1325
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1247
|
-
import type {
|
|
1326
|
+
import type { GetVMLabelsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1248
1327
|
|
|
1249
1328
|
async function example() {
|
|
1250
1329
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1251
1330
|
const api = new DefaultApi();
|
|
1252
1331
|
|
|
1253
|
-
const body = {
|
|
1254
|
-
// string | Filter groups by name (case-insensitive substring match) (optional)
|
|
1255
|
-
byName: byName_example,
|
|
1256
|
-
// number | Page number (1-indexed) (optional)
|
|
1257
|
-
page: 56,
|
|
1258
|
-
// number | Number of groups per page (optional)
|
|
1259
|
-
pageSize: 56,
|
|
1260
|
-
} satisfies ListGroupsRequest;
|
|
1261
|
-
|
|
1262
1332
|
try {
|
|
1263
|
-
const data = await api.
|
|
1333
|
+
const data = await api.getVMLabels();
|
|
1264
1334
|
console.log(data);
|
|
1265
1335
|
} catch (error) {
|
|
1266
1336
|
console.error(error);
|
|
@@ -1273,16 +1343,11 @@ example().catch(console.error);
|
|
|
1273
1343
|
|
|
1274
1344
|
### Parameters
|
|
1275
1345
|
|
|
1276
|
-
|
|
1277
|
-
| Name | Type | Description | Notes |
|
|
1278
|
-
|------------- | ------------- | ------------- | -------------|
|
|
1279
|
-
| **byName** | `string` | Filter groups by name (case-insensitive substring match) | [Optional] [Defaults to `undefined`] |
|
|
1280
|
-
| **page** | `number` | Page number (1-indexed) | [Optional] [Defaults to `1`] |
|
|
1281
|
-
| **pageSize** | `number` | Number of groups per page | [Optional] [Defaults to `20`] |
|
|
1346
|
+
This endpoint does not need any parameter.
|
|
1282
1347
|
|
|
1283
1348
|
### Return type
|
|
1284
1349
|
|
|
1285
|
-
[**
|
|
1350
|
+
[**VMLabelsResponse**](VMLabelsResponse.md)
|
|
1286
1351
|
|
|
1287
1352
|
### Authorization
|
|
1288
1353
|
|
|
@@ -1297,18 +1362,17 @@ No authorization required
|
|
|
1297
1362
|
### HTTP response details
|
|
1298
1363
|
| Status code | Description | Response headers |
|
|
1299
1364
|
|-------------|-------------|------------------|
|
|
1300
|
-
| **200** | List of
|
|
1301
|
-
| **400** | Invalid filter expression | - |
|
|
1365
|
+
| **200** | List of distinct labels | - |
|
|
1302
1366
|
| **500** | Internal server error | - |
|
|
1303
1367
|
|
|
1304
1368
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1305
1369
|
|
|
1306
1370
|
|
|
1307
|
-
##
|
|
1371
|
+
## getVMUtilization
|
|
1308
1372
|
|
|
1309
|
-
>
|
|
1373
|
+
> VmUtilizationDetails getVMUtilization(id)
|
|
1310
1374
|
|
|
1311
|
-
|
|
1375
|
+
Get utilization breakdown for a specific VM
|
|
1312
1376
|
|
|
1313
1377
|
### Example
|
|
1314
1378
|
|
|
@@ -1317,14 +1381,19 @@ import {
|
|
|
1317
1381
|
Configuration,
|
|
1318
1382
|
DefaultApi,
|
|
1319
1383
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1320
|
-
import type {
|
|
1384
|
+
import type { GetVMUtilizationRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1321
1385
|
|
|
1322
1386
|
async function example() {
|
|
1323
1387
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1324
1388
|
const api = new DefaultApi();
|
|
1325
1389
|
|
|
1390
|
+
const body = {
|
|
1391
|
+
// string | VirtualMachine MoRef ID
|
|
1392
|
+
id: id_example,
|
|
1393
|
+
} satisfies GetVMUtilizationRequest;
|
|
1394
|
+
|
|
1326
1395
|
try {
|
|
1327
|
-
const data = await api.
|
|
1396
|
+
const data = await api.getVMUtilization(body);
|
|
1328
1397
|
console.log(data);
|
|
1329
1398
|
} catch (error) {
|
|
1330
1399
|
console.error(error);
|
|
@@ -1337,11 +1406,14 @@ example().catch(console.error);
|
|
|
1337
1406
|
|
|
1338
1407
|
### Parameters
|
|
1339
1408
|
|
|
1340
|
-
|
|
1409
|
+
|
|
1410
|
+
| Name | Type | Description | Notes |
|
|
1411
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1412
|
+
| **id** | `string` | VirtualMachine MoRef ID | [Defaults to `undefined`] |
|
|
1341
1413
|
|
|
1342
1414
|
### Return type
|
|
1343
1415
|
|
|
1344
|
-
[**
|
|
1416
|
+
[**VmUtilizationDetails**](VmUtilizationDetails.md)
|
|
1345
1417
|
|
|
1346
1418
|
### Authorization
|
|
1347
1419
|
|
|
@@ -1356,19 +1428,18 @@ No authorization required
|
|
|
1356
1428
|
### HTTP response details
|
|
1357
1429
|
| Status code | Description | Response headers |
|
|
1358
1430
|
|-------------|-------------|------------------|
|
|
1359
|
-
| **200** |
|
|
1431
|
+
| **200** | VM utilization details | - |
|
|
1432
|
+
| **404** | No utilization data found for this VM | - |
|
|
1360
1433
|
| **500** | Internal server error | - |
|
|
1361
1434
|
|
|
1362
1435
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1363
1436
|
|
|
1364
1437
|
|
|
1365
|
-
##
|
|
1366
|
-
|
|
1367
|
-
> Array<PairCapability> postForecasterPairCapabilities(pairCapabilityRequest)
|
|
1438
|
+
## getVMs
|
|
1368
1439
|
|
|
1369
|
-
|
|
1440
|
+
> VirtualMachineListResponse getVMs(byExpression, sort, page, pageSize)
|
|
1370
1441
|
|
|
1371
|
-
|
|
1442
|
+
Get list of VMs with filtering and pagination
|
|
1372
1443
|
|
|
1373
1444
|
### Example
|
|
1374
1445
|
|
|
@@ -1377,19 +1448,25 @@ import {
|
|
|
1377
1448
|
Configuration,
|
|
1378
1449
|
DefaultApi,
|
|
1379
1450
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1380
|
-
import type {
|
|
1451
|
+
import type { GetVMsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1381
1452
|
|
|
1382
1453
|
async function example() {
|
|
1383
1454
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1384
1455
|
const api = new DefaultApi();
|
|
1385
1456
|
|
|
1386
1457
|
const body = {
|
|
1387
|
-
//
|
|
1388
|
-
|
|
1389
|
-
|
|
1458
|
+
// string | Filter by expression (matches VMs with the provided expression) (optional)
|
|
1459
|
+
byExpression: exp1,
|
|
1460
|
+
// Array<string> | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. (optional)
|
|
1461
|
+
sort: ["cluster:asc","name:desc"],
|
|
1462
|
+
// number | Page number for pagination (optional)
|
|
1463
|
+
page: 56,
|
|
1464
|
+
// number | Number of items per page (optional)
|
|
1465
|
+
pageSize: 56,
|
|
1466
|
+
} satisfies GetVMsRequest;
|
|
1390
1467
|
|
|
1391
1468
|
try {
|
|
1392
|
-
const data = await api.
|
|
1469
|
+
const data = await api.getVMs(body);
|
|
1393
1470
|
console.log(data);
|
|
1394
1471
|
} catch (error) {
|
|
1395
1472
|
console.error(error);
|
|
@@ -1405,11 +1482,14 @@ example().catch(console.error);
|
|
|
1405
1482
|
|
|
1406
1483
|
| Name | Type | Description | Notes |
|
|
1407
1484
|
|------------- | ------------- | ------------- | -------------|
|
|
1408
|
-
| **
|
|
1485
|
+
| **byExpression** | `string` | Filter by expression (matches VMs with the provided expression) | [Optional] [Defaults to `undefined`] |
|
|
1486
|
+
| **sort** | `Array<string>` | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. | [Optional] |
|
|
1487
|
+
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
1488
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
1409
1489
|
|
|
1410
1490
|
### Return type
|
|
1411
1491
|
|
|
1412
|
-
[**
|
|
1492
|
+
[**VirtualMachineListResponse**](VirtualMachineListResponse.md)
|
|
1413
1493
|
|
|
1414
1494
|
### Authorization
|
|
1415
1495
|
|
|
@@ -1417,27 +1497,25 @@ No authorization required
|
|
|
1417
1497
|
|
|
1418
1498
|
### HTTP request headers
|
|
1419
1499
|
|
|
1420
|
-
- **Content-Type**:
|
|
1500
|
+
- **Content-Type**: Not defined
|
|
1421
1501
|
- **Accept**: `application/json`
|
|
1422
1502
|
|
|
1423
1503
|
|
|
1424
1504
|
### HTTP response details
|
|
1425
1505
|
| Status code | Description | Response headers |
|
|
1426
1506
|
|-------------|-------------|------------------|
|
|
1427
|
-
| **200** |
|
|
1428
|
-
| **400** |
|
|
1507
|
+
| **200** | List of VMs | - |
|
|
1508
|
+
| **400** | Invalid request parameters | - |
|
|
1429
1509
|
| **500** | Internal server error | - |
|
|
1430
1510
|
|
|
1431
1511
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1432
1512
|
|
|
1433
1513
|
|
|
1434
|
-
##
|
|
1435
|
-
|
|
1436
|
-
> putForecasterCredentials(vcenterCredentials)
|
|
1514
|
+
## getVersion
|
|
1437
1515
|
|
|
1438
|
-
|
|
1516
|
+
> VersionInfo getVersion()
|
|
1439
1517
|
|
|
1440
|
-
|
|
1518
|
+
Get agent version information
|
|
1441
1519
|
|
|
1442
1520
|
### Example
|
|
1443
1521
|
|
|
@@ -1446,19 +1524,14 @@ import {
|
|
|
1446
1524
|
Configuration,
|
|
1447
1525
|
DefaultApi,
|
|
1448
1526
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1449
|
-
import type {
|
|
1527
|
+
import type { GetVersionRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1450
1528
|
|
|
1451
1529
|
async function example() {
|
|
1452
1530
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1453
1531
|
const api = new DefaultApi();
|
|
1454
1532
|
|
|
1455
|
-
const body = {
|
|
1456
|
-
// VcenterCredentials
|
|
1457
|
-
vcenterCredentials: ...,
|
|
1458
|
-
} satisfies PutForecasterCredentialsRequest;
|
|
1459
|
-
|
|
1460
1533
|
try {
|
|
1461
|
-
const data = await api.
|
|
1534
|
+
const data = await api.getVersion();
|
|
1462
1535
|
console.log(data);
|
|
1463
1536
|
} catch (error) {
|
|
1464
1537
|
console.error(error);
|
|
@@ -1471,14 +1544,279 @@ example().catch(console.error);
|
|
|
1471
1544
|
|
|
1472
1545
|
### Parameters
|
|
1473
1546
|
|
|
1474
|
-
|
|
1475
|
-
| Name | Type | Description | Notes |
|
|
1476
|
-
|------------- | ------------- | ------------- | -------------|
|
|
1477
|
-
| **vcenterCredentials** | [VcenterCredentials](VcenterCredentials.md) | | |
|
|
1547
|
+
This endpoint does not need any parameter.
|
|
1478
1548
|
|
|
1479
1549
|
### Return type
|
|
1480
1550
|
|
|
1481
|
-
|
|
1551
|
+
[**VersionInfo**](VersionInfo.md)
|
|
1552
|
+
|
|
1553
|
+
### Authorization
|
|
1554
|
+
|
|
1555
|
+
No authorization required
|
|
1556
|
+
|
|
1557
|
+
### HTTP request headers
|
|
1558
|
+
|
|
1559
|
+
- **Content-Type**: Not defined
|
|
1560
|
+
- **Accept**: `application/json`
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
### HTTP response details
|
|
1564
|
+
| Status code | Description | Response headers |
|
|
1565
|
+
|-------------|-------------|------------------|
|
|
1566
|
+
| **200** | Version information | - |
|
|
1567
|
+
|
|
1568
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
## listGroups
|
|
1572
|
+
|
|
1573
|
+
> GroupListResponse listGroups(byName, page, pageSize)
|
|
1574
|
+
|
|
1575
|
+
List all groups
|
|
1576
|
+
|
|
1577
|
+
### Example
|
|
1578
|
+
|
|
1579
|
+
```ts
|
|
1580
|
+
import {
|
|
1581
|
+
Configuration,
|
|
1582
|
+
DefaultApi,
|
|
1583
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1584
|
+
import type { ListGroupsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1585
|
+
|
|
1586
|
+
async function example() {
|
|
1587
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1588
|
+
const api = new DefaultApi();
|
|
1589
|
+
|
|
1590
|
+
const body = {
|
|
1591
|
+
// string | Filter groups by name (case-insensitive substring match) (optional)
|
|
1592
|
+
byName: byName_example,
|
|
1593
|
+
// number | Page number (1-indexed) (optional)
|
|
1594
|
+
page: 56,
|
|
1595
|
+
// number | Number of groups per page (optional)
|
|
1596
|
+
pageSize: 56,
|
|
1597
|
+
} satisfies ListGroupsRequest;
|
|
1598
|
+
|
|
1599
|
+
try {
|
|
1600
|
+
const data = await api.listGroups(body);
|
|
1601
|
+
console.log(data);
|
|
1602
|
+
} catch (error) {
|
|
1603
|
+
console.error(error);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
// Run the test
|
|
1608
|
+
example().catch(console.error);
|
|
1609
|
+
```
|
|
1610
|
+
|
|
1611
|
+
### Parameters
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
| Name | Type | Description | Notes |
|
|
1615
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1616
|
+
| **byName** | `string` | Filter groups by name (case-insensitive substring match) | [Optional] [Defaults to `undefined`] |
|
|
1617
|
+
| **page** | `number` | Page number (1-indexed) | [Optional] [Defaults to `1`] |
|
|
1618
|
+
| **pageSize** | `number` | Number of groups per page | [Optional] [Defaults to `20`] |
|
|
1619
|
+
|
|
1620
|
+
### Return type
|
|
1621
|
+
|
|
1622
|
+
[**GroupListResponse**](GroupListResponse.md)
|
|
1623
|
+
|
|
1624
|
+
### Authorization
|
|
1625
|
+
|
|
1626
|
+
No authorization required
|
|
1627
|
+
|
|
1628
|
+
### HTTP request headers
|
|
1629
|
+
|
|
1630
|
+
- **Content-Type**: Not defined
|
|
1631
|
+
- **Accept**: `application/json`
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
### HTTP response details
|
|
1635
|
+
| Status code | Description | Response headers |
|
|
1636
|
+
|-------------|-------------|------------------|
|
|
1637
|
+
| **200** | List of groups | - |
|
|
1638
|
+
| **400** | Invalid filter expression | - |
|
|
1639
|
+
| **500** | Internal server error | - |
|
|
1640
|
+
|
|
1641
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
## listRightsizingReportClusters
|
|
1645
|
+
|
|
1646
|
+
> RightsizingClusterListResponse listRightsizingReportClusters(reportId, byExpression)
|
|
1647
|
+
|
|
1648
|
+
Get cluster-level utilization aggregates for a specific report
|
|
1649
|
+
|
|
1650
|
+
### Example
|
|
1651
|
+
|
|
1652
|
+
```ts
|
|
1653
|
+
import {
|
|
1654
|
+
Configuration,
|
|
1655
|
+
DefaultApi,
|
|
1656
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1657
|
+
import type { ListRightsizingReportClustersRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1658
|
+
|
|
1659
|
+
async function example() {
|
|
1660
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1661
|
+
const api = new DefaultApi();
|
|
1662
|
+
|
|
1663
|
+
const body = {
|
|
1664
|
+
// string | Rightsizing report UUID
|
|
1665
|
+
reportId: reportId_example,
|
|
1666
|
+
// string | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. (optional)
|
|
1667
|
+
byExpression: byExpression_example,
|
|
1668
|
+
} satisfies ListRightsizingReportClustersRequest;
|
|
1669
|
+
|
|
1670
|
+
try {
|
|
1671
|
+
const data = await api.listRightsizingReportClusters(body);
|
|
1672
|
+
console.log(data);
|
|
1673
|
+
} catch (error) {
|
|
1674
|
+
console.error(error);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
// Run the test
|
|
1679
|
+
example().catch(console.error);
|
|
1680
|
+
```
|
|
1681
|
+
|
|
1682
|
+
### Parameters
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
| Name | Type | Description | Notes |
|
|
1686
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1687
|
+
| **reportId** | `string` | Rightsizing report UUID | [Defaults to `undefined`] |
|
|
1688
|
+
| **byExpression** | `string` | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. | [Optional] [Defaults to `undefined`] |
|
|
1689
|
+
|
|
1690
|
+
### Return type
|
|
1691
|
+
|
|
1692
|
+
[**RightsizingClusterListResponse**](RightsizingClusterListResponse.md)
|
|
1693
|
+
|
|
1694
|
+
### Authorization
|
|
1695
|
+
|
|
1696
|
+
No authorization required
|
|
1697
|
+
|
|
1698
|
+
### HTTP request headers
|
|
1699
|
+
|
|
1700
|
+
- **Content-Type**: Not defined
|
|
1701
|
+
- **Accept**: `application/json`
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
### HTTP response details
|
|
1705
|
+
| Status code | Description | Response headers |
|
|
1706
|
+
|-------------|-------------|------------------|
|
|
1707
|
+
| **200** | Cluster utilization aggregates | - |
|
|
1708
|
+
| **404** | Report not found | - |
|
|
1709
|
+
| **500** | Internal server error | - |
|
|
1710
|
+
|
|
1711
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
## listRightsizingReports
|
|
1715
|
+
|
|
1716
|
+
> RightsizingReportListResponse listRightsizingReports()
|
|
1717
|
+
|
|
1718
|
+
List all rightsizing reports
|
|
1719
|
+
|
|
1720
|
+
### Example
|
|
1721
|
+
|
|
1722
|
+
```ts
|
|
1723
|
+
import {
|
|
1724
|
+
Configuration,
|
|
1725
|
+
DefaultApi,
|
|
1726
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1727
|
+
import type { ListRightsizingReportsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1728
|
+
|
|
1729
|
+
async function example() {
|
|
1730
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1731
|
+
const api = new DefaultApi();
|
|
1732
|
+
|
|
1733
|
+
try {
|
|
1734
|
+
const data = await api.listRightsizingReports();
|
|
1735
|
+
console.log(data);
|
|
1736
|
+
} catch (error) {
|
|
1737
|
+
console.error(error);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// Run the test
|
|
1742
|
+
example().catch(console.error);
|
|
1743
|
+
```
|
|
1744
|
+
|
|
1745
|
+
### Parameters
|
|
1746
|
+
|
|
1747
|
+
This endpoint does not need any parameter.
|
|
1748
|
+
|
|
1749
|
+
### Return type
|
|
1750
|
+
|
|
1751
|
+
[**RightsizingReportListResponse**](RightsizingReportListResponse.md)
|
|
1752
|
+
|
|
1753
|
+
### Authorization
|
|
1754
|
+
|
|
1755
|
+
No authorization required
|
|
1756
|
+
|
|
1757
|
+
### HTTP request headers
|
|
1758
|
+
|
|
1759
|
+
- **Content-Type**: Not defined
|
|
1760
|
+
- **Accept**: `application/json`
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
### HTTP response details
|
|
1764
|
+
| Status code | Description | Response headers |
|
|
1765
|
+
|-------------|-------------|------------------|
|
|
1766
|
+
| **200** | List of rightsizing reports | - |
|
|
1767
|
+
| **500** | Internal server error | - |
|
|
1768
|
+
|
|
1769
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
## postForecasterPairCapabilities
|
|
1773
|
+
|
|
1774
|
+
> Array<PairCapability> postForecasterPairCapabilities(pairCapabilityRequest)
|
|
1775
|
+
|
|
1776
|
+
Compute pair capabilities
|
|
1777
|
+
|
|
1778
|
+
Computes which offload methods are feasible for specific source-target datastore pairs based on vendor support and storage array topology derived from the forklift-collected inventory. No vSphere credentials are required.
|
|
1779
|
+
|
|
1780
|
+
### Example
|
|
1781
|
+
|
|
1782
|
+
```ts
|
|
1783
|
+
import {
|
|
1784
|
+
Configuration,
|
|
1785
|
+
DefaultApi,
|
|
1786
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1787
|
+
import type { PostForecasterPairCapabilitiesRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1788
|
+
|
|
1789
|
+
async function example() {
|
|
1790
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1791
|
+
const api = new DefaultApi();
|
|
1792
|
+
|
|
1793
|
+
const body = {
|
|
1794
|
+
// PairCapabilityRequest
|
|
1795
|
+
pairCapabilityRequest: ...,
|
|
1796
|
+
} satisfies PostForecasterPairCapabilitiesRequest;
|
|
1797
|
+
|
|
1798
|
+
try {
|
|
1799
|
+
const data = await api.postForecasterPairCapabilities(body);
|
|
1800
|
+
console.log(data);
|
|
1801
|
+
} catch (error) {
|
|
1802
|
+
console.error(error);
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
// Run the test
|
|
1807
|
+
example().catch(console.error);
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
### Parameters
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
| Name | Type | Description | Notes |
|
|
1814
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1815
|
+
| **pairCapabilityRequest** | [PairCapabilityRequest](PairCapabilityRequest.md) | | |
|
|
1816
|
+
|
|
1817
|
+
### Return type
|
|
1818
|
+
|
|
1819
|
+
[**Array<PairCapability>**](PairCapability.md)
|
|
1482
1820
|
|
|
1483
1821
|
### Authorization
|
|
1484
1822
|
|
|
@@ -1493,19 +1831,20 @@ No authorization required
|
|
|
1493
1831
|
### HTTP response details
|
|
1494
1832
|
| Status code | Description | Response headers |
|
|
1495
1833
|
|-------------|-------------|------------------|
|
|
1496
|
-
| **200** |
|
|
1497
|
-
| **400** |
|
|
1498
|
-
| **403** | Authentication succeeded but user lacks required privileges | - |
|
|
1834
|
+
| **200** | Capabilities per pair | - |
|
|
1835
|
+
| **400** | Datastore not found | - |
|
|
1499
1836
|
| **500** | Internal server error | - |
|
|
1500
1837
|
|
|
1501
1838
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1502
1839
|
|
|
1503
1840
|
|
|
1504
|
-
##
|
|
1841
|
+
## putForecasterCredentials
|
|
1842
|
+
|
|
1843
|
+
> putForecasterCredentials(vcenterCredentials)
|
|
1505
1844
|
|
|
1506
|
-
|
|
1845
|
+
Verify vCenter credentials and permissions
|
|
1507
1846
|
|
|
1508
|
-
|
|
1847
|
+
Validates vCenter connectivity and verifies the user has the required vSphere privileges for forecaster operations (datastore file management, VM provisioning, disk cloning). Verification only — credentials are not saved.
|
|
1509
1848
|
|
|
1510
1849
|
### Example
|
|
1511
1850
|
|
|
@@ -1514,7 +1853,7 @@ import {
|
|
|
1514
1853
|
Configuration,
|
|
1515
1854
|
DefaultApi,
|
|
1516
1855
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1517
|
-
import type {
|
|
1856
|
+
import type { PutForecasterCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1518
1857
|
|
|
1519
1858
|
async function example() {
|
|
1520
1859
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
@@ -1523,10 +1862,10 @@ async function example() {
|
|
|
1523
1862
|
const body = {
|
|
1524
1863
|
// VcenterCredentials
|
|
1525
1864
|
vcenterCredentials: ...,
|
|
1526
|
-
} satisfies
|
|
1865
|
+
} satisfies PutForecasterCredentialsRequest;
|
|
1527
1866
|
|
|
1528
1867
|
try {
|
|
1529
|
-
const data = await api.
|
|
1868
|
+
const data = await api.putForecasterCredentials(body);
|
|
1530
1869
|
console.log(data);
|
|
1531
1870
|
} catch (error) {
|
|
1532
1871
|
console.error(error);
|
|
@@ -1555,14 +1894,15 @@ No authorization required
|
|
|
1555
1894
|
### HTTP request headers
|
|
1556
1895
|
|
|
1557
1896
|
- **Content-Type**: `application/json`
|
|
1558
|
-
- **Accept**:
|
|
1897
|
+
- **Accept**: `application/json`
|
|
1559
1898
|
|
|
1560
1899
|
|
|
1561
1900
|
### HTTP response details
|
|
1562
1901
|
| Status code | Description | Response headers |
|
|
1563
1902
|
|-------------|-------------|------------------|
|
|
1564
|
-
| **200** | Credentials
|
|
1565
|
-
| **400** |
|
|
1903
|
+
| **200** | Credentials valid and all required privileges are granted | - |
|
|
1904
|
+
| **400** | Invalid credentials or unreachable vCenter | - |
|
|
1905
|
+
| **403** | Authentication succeeded but user lacks required privileges | - |
|
|
1566
1906
|
| **500** | Internal server error | - |
|
|
1567
1907
|
|
|
1568
1908
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -2364,3 +2704,212 @@ No authorization required
|
|
|
2364
2704
|
|
|
2365
2705
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2366
2706
|
|
|
2707
|
+
|
|
2708
|
+
## updateLabelVMs
|
|
2709
|
+
|
|
2710
|
+
> updateLabelVMs(label, updateLabelVMsRequest)
|
|
2711
|
+
|
|
2712
|
+
Modify label VM membership (add/remove label to/from VMs)
|
|
2713
|
+
|
|
2714
|
+
### Example
|
|
2715
|
+
|
|
2716
|
+
```ts
|
|
2717
|
+
import {
|
|
2718
|
+
Configuration,
|
|
2719
|
+
DefaultApi,
|
|
2720
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
2721
|
+
import type { UpdateLabelVMsOperationRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
2722
|
+
|
|
2723
|
+
async function example() {
|
|
2724
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
2725
|
+
const api = new DefaultApi();
|
|
2726
|
+
|
|
2727
|
+
const body = {
|
|
2728
|
+
// string | The label to modify
|
|
2729
|
+
label: label_example,
|
|
2730
|
+
// UpdateLabelVMsRequest
|
|
2731
|
+
updateLabelVMsRequest: ...,
|
|
2732
|
+
} satisfies UpdateLabelVMsOperationRequest;
|
|
2733
|
+
|
|
2734
|
+
try {
|
|
2735
|
+
const data = await api.updateLabelVMs(body);
|
|
2736
|
+
console.log(data);
|
|
2737
|
+
} catch (error) {
|
|
2738
|
+
console.error(error);
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
// Run the test
|
|
2743
|
+
example().catch(console.error);
|
|
2744
|
+
```
|
|
2745
|
+
|
|
2746
|
+
### Parameters
|
|
2747
|
+
|
|
2748
|
+
|
|
2749
|
+
| Name | Type | Description | Notes |
|
|
2750
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2751
|
+
| **label** | `string` | The label to modify | [Defaults to `undefined`] |
|
|
2752
|
+
| **updateLabelVMsRequest** | [UpdateLabelVMsRequest](UpdateLabelVMsRequest.md) | | |
|
|
2753
|
+
|
|
2754
|
+
### Return type
|
|
2755
|
+
|
|
2756
|
+
`void` (Empty response body)
|
|
2757
|
+
|
|
2758
|
+
### Authorization
|
|
2759
|
+
|
|
2760
|
+
No authorization required
|
|
2761
|
+
|
|
2762
|
+
### HTTP request headers
|
|
2763
|
+
|
|
2764
|
+
- **Content-Type**: `application/json`
|
|
2765
|
+
- **Accept**: Not defined
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
### HTTP response details
|
|
2769
|
+
| Status code | Description | Response headers |
|
|
2770
|
+
|-------------|-------------|------------------|
|
|
2771
|
+
| **200** | Label operation completed successfully (all VMs updated atomically) | - |
|
|
2772
|
+
| **400** | Invalid request | - |
|
|
2773
|
+
| **404** | One or more VMs not found (no changes made) | - |
|
|
2774
|
+
| **500** | Internal server error | - |
|
|
2775
|
+
|
|
2776
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2777
|
+
|
|
2778
|
+
|
|
2779
|
+
## updateVM
|
|
2780
|
+
|
|
2781
|
+
> updateVM(id, virtualMachineUpdateRequest)
|
|
2782
|
+
|
|
2783
|
+
Update VM properties
|
|
2784
|
+
|
|
2785
|
+
### Example
|
|
2786
|
+
|
|
2787
|
+
```ts
|
|
2788
|
+
import {
|
|
2789
|
+
Configuration,
|
|
2790
|
+
DefaultApi,
|
|
2791
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
2792
|
+
import type { UpdateVMRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
2793
|
+
|
|
2794
|
+
async function example() {
|
|
2795
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
2796
|
+
const api = new DefaultApi();
|
|
2797
|
+
|
|
2798
|
+
const body = {
|
|
2799
|
+
// string | VirtualMachine id
|
|
2800
|
+
id: id_example,
|
|
2801
|
+
// VirtualMachineUpdateRequest
|
|
2802
|
+
virtualMachineUpdateRequest: ...,
|
|
2803
|
+
} satisfies UpdateVMRequest;
|
|
2804
|
+
|
|
2805
|
+
try {
|
|
2806
|
+
const data = await api.updateVM(body);
|
|
2807
|
+
console.log(data);
|
|
2808
|
+
} catch (error) {
|
|
2809
|
+
console.error(error);
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
// Run the test
|
|
2814
|
+
example().catch(console.error);
|
|
2815
|
+
```
|
|
2816
|
+
|
|
2817
|
+
### Parameters
|
|
2818
|
+
|
|
2819
|
+
|
|
2820
|
+
| Name | Type | Description | Notes |
|
|
2821
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2822
|
+
| **id** | `string` | VirtualMachine id | [Defaults to `undefined`] |
|
|
2823
|
+
| **virtualMachineUpdateRequest** | [VirtualMachineUpdateRequest](VirtualMachineUpdateRequest.md) | | |
|
|
2824
|
+
|
|
2825
|
+
### Return type
|
|
2826
|
+
|
|
2827
|
+
`void` (Empty response body)
|
|
2828
|
+
|
|
2829
|
+
### Authorization
|
|
2830
|
+
|
|
2831
|
+
No authorization required
|
|
2832
|
+
|
|
2833
|
+
### HTTP request headers
|
|
2834
|
+
|
|
2835
|
+
- **Content-Type**: `application/json`
|
|
2836
|
+
- **Accept**: Not defined
|
|
2837
|
+
|
|
2838
|
+
|
|
2839
|
+
### HTTP response details
|
|
2840
|
+
| Status code | Description | Response headers |
|
|
2841
|
+
|-------------|-------------|------------------|
|
|
2842
|
+
| **200** | VM updated successfully | - |
|
|
2843
|
+
| **400** | Invalid request | - |
|
|
2844
|
+
| **404** | VM not found | - |
|
|
2845
|
+
| **500** | Internal server error | - |
|
|
2846
|
+
|
|
2847
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
## validateInspectorCredentials
|
|
2851
|
+
|
|
2852
|
+
> validateInspectorCredentials(vcenterCredentials)
|
|
2853
|
+
|
|
2854
|
+
Validate vCenter credentials for inspector
|
|
2855
|
+
|
|
2856
|
+
### Example
|
|
2857
|
+
|
|
2858
|
+
```ts
|
|
2859
|
+
import {
|
|
2860
|
+
Configuration,
|
|
2861
|
+
DefaultApi,
|
|
2862
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
2863
|
+
import type { ValidateInspectorCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
2864
|
+
|
|
2865
|
+
async function example() {
|
|
2866
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
2867
|
+
const api = new DefaultApi();
|
|
2868
|
+
|
|
2869
|
+
const body = {
|
|
2870
|
+
// VcenterCredentials
|
|
2871
|
+
vcenterCredentials: ...,
|
|
2872
|
+
} satisfies ValidateInspectorCredentialsRequest;
|
|
2873
|
+
|
|
2874
|
+
try {
|
|
2875
|
+
const data = await api.validateInspectorCredentials(body);
|
|
2876
|
+
console.log(data);
|
|
2877
|
+
} catch (error) {
|
|
2878
|
+
console.error(error);
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// Run the test
|
|
2883
|
+
example().catch(console.error);
|
|
2884
|
+
```
|
|
2885
|
+
|
|
2886
|
+
### Parameters
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
| Name | Type | Description | Notes |
|
|
2890
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2891
|
+
| **vcenterCredentials** | [VcenterCredentials](VcenterCredentials.md) | | |
|
|
2892
|
+
|
|
2893
|
+
### Return type
|
|
2894
|
+
|
|
2895
|
+
`void` (Empty response body)
|
|
2896
|
+
|
|
2897
|
+
### Authorization
|
|
2898
|
+
|
|
2899
|
+
No authorization required
|
|
2900
|
+
|
|
2901
|
+
### HTTP request headers
|
|
2902
|
+
|
|
2903
|
+
- **Content-Type**: `application/json`
|
|
2904
|
+
- **Accept**: Not defined
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
### HTTP response details
|
|
2908
|
+
| Status code | Description | Response headers |
|
|
2909
|
+
|-------------|-------------|------------------|
|
|
2910
|
+
| **200** | Credentials updated successfully | - |
|
|
2911
|
+
| **400** | Bad Credentials | - |
|
|
2912
|
+
| **500** | Internal server error | - |
|
|
2913
|
+
|
|
2914
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2915
|
+
|