@openshift-migration-advisor/agent-sdk 0.12.0-1f1dc16fb9e5 → 0.12.0-4e95135f8529
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 +28 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +33 -5
- package/dist/apis/DefaultApi.d.ts +546 -39
- package/dist/apis/DefaultApi.js +591 -30
- package/dist/esm/apis/DefaultApi.d.ts +546 -39
- package/dist/esm/apis/DefaultApi.js +591 -30
- 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/CollectorStartRequest.d.ts +12 -0
- package/dist/esm/models/CollectorStartRequest.js +4 -0
- package/dist/esm/models/CreateGroupRequest.d.ts +0 -6
- package/dist/esm/models/CreateGroupRequest.js +0 -2
- package/dist/esm/models/CredentialStatus.d.ts +38 -0
- package/dist/esm/models/CredentialStatus.js +47 -0
- 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/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 +14 -0
- package/dist/esm/models/InventoryData.js +6 -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/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/VcenterCredentials.d.ts +12 -0
- package/dist/esm/models/VcenterCredentials.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 +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 +14 -0
- package/dist/esm/models/index.js +14 -0
- package/dist/esm/runtime.js +2 -1
- 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/CollectorStartRequest.d.ts +12 -0
- package/dist/models/CollectorStartRequest.js +4 -0
- package/dist/models/CreateGroupRequest.d.ts +0 -6
- package/dist/models/CreateGroupRequest.js +0 -2
- package/dist/models/CredentialStatus.d.ts +38 -0
- package/dist/models/CredentialStatus.js +54 -0
- 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/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 +14 -0
- package/dist/models/InventoryData.js +6 -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/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/VcenterCredentials.d.ts +12 -0
- package/dist/models/VcenterCredentials.js +4 -0
- package/dist/models/VirtualMachine.d.ts +30 -6
- package/dist/models/VirtualMachine.js +18 -10
- 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 +14 -0
- package/dist/models/index.js +14 -0
- package/dist/runtime.js +2 -1
- 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/CollectorStartRequest.md +4 -0
- package/docs/CreateGroupRequest.md +0 -2
- package/docs/CredentialStatus.md +36 -0
- package/docs/DefaultApi.md +1127 -197
- 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/InspectorStatus.md +0 -4
- package/docs/Inventory.md +4 -2
- package/docs/InventoryData.md +4 -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/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/VcenterCredentials.md +4 -0
- package/docs/VirtualMachine.md +18 -10
- 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 +1136 -93
- 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/CollectorStartRequest.ts +16 -0
- package/src/models/CreateGroupRequest.ts +0 -8
- package/src/models/CredentialStatus.ts +75 -0
- package/src/models/DeleteLabelGloballyResponse.ts +75 -0
- package/src/models/Group.ts +0 -8
- package/src/models/GroupResponse.ts +15 -0
- package/src/models/InspectorStatus.ts +1 -28
- package/src/models/Inventory.ts +12 -4
- package/src/models/InventoryData.ts +30 -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/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/VcenterCredentials.ts +16 -0
- package/src/models/VirtualMachine.ts +48 -16
- 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 +14 -0
- package/src/runtime.ts +1 -1
package/docs/DefaultApi.md
CHANGED
|
@@ -5,10 +5,15 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**createGroup**](DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group |
|
|
8
|
+
| [**deleteCredentials**](DefaultApi.md#deletecredentials) | **DELETE** /credentials | Delete stored credentials |
|
|
8
9
|
| [**deleteForecasterRun**](DefaultApi.md#deleteforecasterrun) | **DELETE** /forecaster/runs/{id} | Delete a benchmark run |
|
|
9
10
|
| [**deleteGroup**](DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group |
|
|
11
|
+
| [**deleteLabelGlobally**](DefaultApi.md#deletelabelglobally) | **DELETE** /vms/labels/{label} | Delete label from all VMs |
|
|
10
12
|
| [**getAgentStatus**](DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status |
|
|
13
|
+
| [**getApplications**](DefaultApi.md#getapplications) | **GET** /applications | List detected applications running on VMs |
|
|
14
|
+
| [**getClusterUtilization**](DefaultApi.md#getclusterutilization) | **GET** /clusters/{cluster_id}/utilization | Get latest cluster utilization by cluster ID |
|
|
11
15
|
| [**getCollectorStatus**](DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status |
|
|
16
|
+
| [**getCredentials**](DefaultApi.md#getcredentials) | **GET** /credentials | Get stored credential status |
|
|
12
17
|
| [**getForecasterDatastores**](DefaultApi.md#getforecasterdatastores) | **POST** /forecaster/datastores | List available datastores |
|
|
13
18
|
| [**getForecasterRuns**](DefaultApi.md#getforecasterruns) | **GET** /forecaster/runs | List benchmark runs |
|
|
14
19
|
| [**getForecasterStats**](DefaultApi.md#getforecasterstats) | **GET** /forecaster/stats | Get throughput statistics |
|
|
@@ -17,16 +22,22 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
17
22
|
| [**getInspectorStatus**](DefaultApi.md#getinspectorstatus) | **GET** /inspector | Get inspector status |
|
|
18
23
|
| [**getInspectorVddkStatus**](DefaultApi.md#getinspectorvddkstatus) | **GET** /inspector/vddk | Get VDDK status |
|
|
19
24
|
| [**getInventory**](DefaultApi.md#getinventory) | **GET** /inventory | Get collected inventory |
|
|
20
|
-
| [**
|
|
25
|
+
| [**getLatestRightsizingClusters**](DefaultApi.md#getlatestrightsizingclusters) | **GET** /cluster_rightsizing | Get cluster-level utilization aggregates for the latest completed report |
|
|
26
|
+
| [**getRightsizingReport**](DefaultApi.md#getrightsizingreport) | **GET** /rightsizing/{report_id} | Get a specific rightsizing report with full VM metrics |
|
|
27
|
+
| [**getRightsizingReportCluster**](DefaultApi.md#getrightsizingreportcluster) | **GET** /rightsizing/{report_id}/clusters/{cluster_id} | Get utilization for a specific cluster from a specific report |
|
|
28
|
+
| [**getRightsizingReportClusters**](DefaultApi.md#getrightsizingreportclusters) | **GET** /cluster_rightsizing/{report_id} | Get cluster-level utilization aggregates for a specific report |
|
|
21
29
|
| [**getVM**](DefaultApi.md#getvm) | **GET** /vms/{id} | Get details about a vm |
|
|
30
|
+
| [**getVMLabels**](DefaultApi.md#getvmlabels) | **GET** /vms/labels | Get all distinct labels in use across VMs |
|
|
22
31
|
| [**getVMUtilization**](DefaultApi.md#getvmutilization) | **GET** /vms/{id}/utilization | Get utilization breakdown for a specific VM |
|
|
23
32
|
| [**getVMs**](DefaultApi.md#getvms) | **GET** /vms | Get list of VMs with filtering and pagination |
|
|
33
|
+
| [**getVMsFilterOptions**](DefaultApi.md#getvmsfilteroptions) | **GET** /vms/filter-options | Get distinct filter option values for VMs |
|
|
24
34
|
| [**getVersion**](DefaultApi.md#getversion) | **GET** /version | Get agent version information |
|
|
25
35
|
| [**listGroups**](DefaultApi.md#listgroups) | **GET** /groups | List all groups |
|
|
36
|
+
| [**listRightsizingReportClusters**](DefaultApi.md#listrightsizingreportclusters) | **GET** /rightsizing/{report_id}/clusters | Get cluster-level utilization aggregates for a specific report |
|
|
26
37
|
| [**listRightsizingReports**](DefaultApi.md#listrightsizingreports) | **GET** /rightsizing | List all rightsizing reports |
|
|
27
38
|
| [**postForecasterPairCapabilities**](DefaultApi.md#postforecasterpaircapabilities) | **POST** /forecaster/capabilities | Compute pair capabilities |
|
|
39
|
+
| [**putCredentials**](DefaultApi.md#putcredentials) | **PUT** /credentials | Store vCenter credentials |
|
|
28
40
|
| [**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
41
|
| [**putInspectorVddk**](DefaultApi.md#putinspectorvddk) | **PUT** /inspector/vddk | Upload VDDK tarball |
|
|
31
42
|
| [**removeVMFromInspection**](DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspection | Remove VirtualMachine from inspection queue |
|
|
32
43
|
| [**setAgentMode**](DefaultApi.md#setagentmode) | **POST** /agent | Change agent mode |
|
|
@@ -39,6 +50,9 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
39
50
|
| [**stopInspection**](DefaultApi.md#stopinspection) | **DELETE** /inspector | Stop inspector entirely |
|
|
40
51
|
| [**triggerRightsizingCollection**](DefaultApi.md#triggerrightsizingcollection) | **POST** /rightsizing | Trigger rightsizing metrics collection |
|
|
41
52
|
| [**updateGroup**](DefaultApi.md#updategroupoperation) | **PATCH** /groups/{id} | Update group |
|
|
53
|
+
| [**updateLabelVMs**](DefaultApi.md#updatelabelvmsoperation) | **PATCH** /vms/labels/{label} | Modify label VM membership (add/remove label to/from VMs) |
|
|
54
|
+
| [**updateVM**](DefaultApi.md#updatevm) | **PATCH** /vms/{id} | Update VM properties |
|
|
55
|
+
| [**validateInspectorCredentials**](DefaultApi.md#validateinspectorcredentials) | **POST** /inspector/credentials | Validate vCenter credentials for inspector |
|
|
42
56
|
|
|
43
57
|
|
|
44
58
|
|
|
@@ -109,6 +123,66 @@ No authorization required
|
|
|
109
123
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
110
124
|
|
|
111
125
|
|
|
126
|
+
## deleteCredentials
|
|
127
|
+
|
|
128
|
+
> deleteCredentials()
|
|
129
|
+
|
|
130
|
+
Delete stored credentials
|
|
131
|
+
|
|
132
|
+
Removes all stored vCenter credentials from the database.
|
|
133
|
+
|
|
134
|
+
### Example
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
import {
|
|
138
|
+
Configuration,
|
|
139
|
+
DefaultApi,
|
|
140
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
141
|
+
import type { DeleteCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
142
|
+
|
|
143
|
+
async function example() {
|
|
144
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
145
|
+
const api = new DefaultApi();
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
const data = await api.deleteCredentials();
|
|
149
|
+
console.log(data);
|
|
150
|
+
} catch (error) {
|
|
151
|
+
console.error(error);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Run the test
|
|
156
|
+
example().catch(console.error);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Parameters
|
|
160
|
+
|
|
161
|
+
This endpoint does not need any parameter.
|
|
162
|
+
|
|
163
|
+
### Return type
|
|
164
|
+
|
|
165
|
+
`void` (Empty response body)
|
|
166
|
+
|
|
167
|
+
### Authorization
|
|
168
|
+
|
|
169
|
+
No authorization required
|
|
170
|
+
|
|
171
|
+
### HTTP request headers
|
|
172
|
+
|
|
173
|
+
- **Content-Type**: Not defined
|
|
174
|
+
- **Accept**: Not defined
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### HTTP response details
|
|
178
|
+
| Status code | Description | Response headers |
|
|
179
|
+
|-------------|-------------|------------------|
|
|
180
|
+
| **204** | Credentials deleted | - |
|
|
181
|
+
| **500** | Internal server error | - |
|
|
182
|
+
|
|
183
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
184
|
+
|
|
185
|
+
|
|
112
186
|
## deleteForecasterRun
|
|
113
187
|
|
|
114
188
|
> deleteForecasterRun(id)
|
|
@@ -243,11 +317,11 @@ No authorization required
|
|
|
243
317
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
244
318
|
|
|
245
319
|
|
|
246
|
-
##
|
|
320
|
+
## deleteLabelGlobally
|
|
247
321
|
|
|
248
|
-
>
|
|
322
|
+
> DeleteLabelGloballyResponse deleteLabelGlobally(label)
|
|
249
323
|
|
|
250
|
-
|
|
324
|
+
Delete label from all VMs
|
|
251
325
|
|
|
252
326
|
### Example
|
|
253
327
|
|
|
@@ -256,14 +330,19 @@ import {
|
|
|
256
330
|
Configuration,
|
|
257
331
|
DefaultApi,
|
|
258
332
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
259
|
-
import type {
|
|
333
|
+
import type { DeleteLabelGloballyRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
260
334
|
|
|
261
335
|
async function example() {
|
|
262
336
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
263
337
|
const api = new DefaultApi();
|
|
264
338
|
|
|
339
|
+
const body = {
|
|
340
|
+
// string | The label to remove from all VMs
|
|
341
|
+
label: label_example,
|
|
342
|
+
} satisfies DeleteLabelGloballyRequest;
|
|
343
|
+
|
|
265
344
|
try {
|
|
266
|
-
const data = await api.
|
|
345
|
+
const data = await api.deleteLabelGlobally(body);
|
|
267
346
|
console.log(data);
|
|
268
347
|
} catch (error) {
|
|
269
348
|
console.error(error);
|
|
@@ -276,11 +355,14 @@ example().catch(console.error);
|
|
|
276
355
|
|
|
277
356
|
### Parameters
|
|
278
357
|
|
|
279
|
-
|
|
358
|
+
|
|
359
|
+
| Name | Type | Description | Notes |
|
|
360
|
+
|------------- | ------------- | ------------- | -------------|
|
|
361
|
+
| **label** | `string` | The label to remove from all VMs | [Defaults to `undefined`] |
|
|
280
362
|
|
|
281
363
|
### Return type
|
|
282
364
|
|
|
283
|
-
[**
|
|
365
|
+
[**DeleteLabelGloballyResponse**](DeleteLabelGloballyResponse.md)
|
|
284
366
|
|
|
285
367
|
### Authorization
|
|
286
368
|
|
|
@@ -295,17 +377,18 @@ No authorization required
|
|
|
295
377
|
### HTTP response details
|
|
296
378
|
| Status code | Description | Response headers |
|
|
297
379
|
|-------------|-------------|------------------|
|
|
298
|
-
| **200** |
|
|
380
|
+
| **200** | Label removed globally | - |
|
|
381
|
+
| **400** | Invalid label parameter | - |
|
|
299
382
|
| **500** | Internal server error | - |
|
|
300
383
|
|
|
301
384
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
302
385
|
|
|
303
386
|
|
|
304
|
-
##
|
|
387
|
+
## getAgentStatus
|
|
305
388
|
|
|
306
|
-
>
|
|
389
|
+
> AgentStatus getAgentStatus()
|
|
307
390
|
|
|
308
|
-
Get
|
|
391
|
+
Get agent status
|
|
309
392
|
|
|
310
393
|
### Example
|
|
311
394
|
|
|
@@ -314,14 +397,14 @@ import {
|
|
|
314
397
|
Configuration,
|
|
315
398
|
DefaultApi,
|
|
316
399
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
317
|
-
import type {
|
|
400
|
+
import type { GetAgentStatusRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
318
401
|
|
|
319
402
|
async function example() {
|
|
320
403
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
321
404
|
const api = new DefaultApi();
|
|
322
405
|
|
|
323
406
|
try {
|
|
324
|
-
const data = await api.
|
|
407
|
+
const data = await api.getAgentStatus();
|
|
325
408
|
console.log(data);
|
|
326
409
|
} catch (error) {
|
|
327
410
|
console.error(error);
|
|
@@ -338,7 +421,7 @@ This endpoint does not need any parameter.
|
|
|
338
421
|
|
|
339
422
|
### Return type
|
|
340
423
|
|
|
341
|
-
[**
|
|
424
|
+
[**AgentStatus**](AgentStatus.md)
|
|
342
425
|
|
|
343
426
|
### Authorization
|
|
344
427
|
|
|
@@ -353,19 +436,17 @@ No authorization required
|
|
|
353
436
|
### HTTP response details
|
|
354
437
|
| Status code | Description | Response headers |
|
|
355
438
|
|-------------|-------------|------------------|
|
|
356
|
-
| **200** |
|
|
439
|
+
| **200** | Agent status | - |
|
|
357
440
|
| **500** | Internal server error | - |
|
|
358
441
|
|
|
359
442
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
360
443
|
|
|
361
444
|
|
|
362
|
-
##
|
|
363
|
-
|
|
364
|
-
> Array<DatastoreDetail> getForecasterDatastores(forecasterDatastoresRequest)
|
|
445
|
+
## getApplications
|
|
365
446
|
|
|
366
|
-
|
|
447
|
+
> ApplicationListResponse getApplications()
|
|
367
448
|
|
|
368
|
-
|
|
449
|
+
List detected applications running on VMs
|
|
369
450
|
|
|
370
451
|
### Example
|
|
371
452
|
|
|
@@ -374,19 +455,14 @@ import {
|
|
|
374
455
|
Configuration,
|
|
375
456
|
DefaultApi,
|
|
376
457
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
377
|
-
import type {
|
|
458
|
+
import type { GetApplicationsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
378
459
|
|
|
379
460
|
async function example() {
|
|
380
461
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
381
462
|
const api = new DefaultApi();
|
|
382
463
|
|
|
383
|
-
const body = {
|
|
384
|
-
// ForecasterDatastoresRequest (optional)
|
|
385
|
-
forecasterDatastoresRequest: ...,
|
|
386
|
-
} satisfies GetForecasterDatastoresRequest;
|
|
387
|
-
|
|
388
464
|
try {
|
|
389
|
-
const data = await api.
|
|
465
|
+
const data = await api.getApplications();
|
|
390
466
|
console.log(data);
|
|
391
467
|
} catch (error) {
|
|
392
468
|
console.error(error);
|
|
@@ -399,14 +475,11 @@ example().catch(console.error);
|
|
|
399
475
|
|
|
400
476
|
### Parameters
|
|
401
477
|
|
|
402
|
-
|
|
403
|
-
| Name | Type | Description | Notes |
|
|
404
|
-
|------------- | ------------- | ------------- | -------------|
|
|
405
|
-
| **forecasterDatastoresRequest** | [ForecasterDatastoresRequest](ForecasterDatastoresRequest.md) | | [Optional] |
|
|
478
|
+
This endpoint does not need any parameter.
|
|
406
479
|
|
|
407
480
|
### Return type
|
|
408
481
|
|
|
409
|
-
[**
|
|
482
|
+
[**ApplicationListResponse**](ApplicationListResponse.md)
|
|
410
483
|
|
|
411
484
|
### Authorization
|
|
412
485
|
|
|
@@ -414,26 +487,24 @@ No authorization required
|
|
|
414
487
|
|
|
415
488
|
### HTTP request headers
|
|
416
489
|
|
|
417
|
-
- **Content-Type**:
|
|
490
|
+
- **Content-Type**: Not defined
|
|
418
491
|
- **Accept**: `application/json`
|
|
419
492
|
|
|
420
493
|
|
|
421
494
|
### HTTP response details
|
|
422
495
|
| Status code | Description | Response headers |
|
|
423
496
|
|-------------|-------------|------------------|
|
|
424
|
-
| **200** | List of
|
|
497
|
+
| **200** | List of applications with matching VMs | - |
|
|
425
498
|
| **500** | Internal server error | - |
|
|
426
499
|
|
|
427
500
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
428
501
|
|
|
429
502
|
|
|
430
|
-
##
|
|
431
|
-
|
|
432
|
-
> Array<BenchmarkRun> getForecasterRuns(pairName)
|
|
503
|
+
## getClusterUtilization
|
|
433
504
|
|
|
434
|
-
|
|
505
|
+
> RightsizingClusterResponse getClusterUtilization(clusterId)
|
|
435
506
|
|
|
436
|
-
|
|
507
|
+
Get latest cluster utilization by cluster ID
|
|
437
508
|
|
|
438
509
|
### Example
|
|
439
510
|
|
|
@@ -442,19 +513,19 @@ import {
|
|
|
442
513
|
Configuration,
|
|
443
514
|
DefaultApi,
|
|
444
515
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
445
|
-
import type {
|
|
516
|
+
import type { GetClusterUtilizationRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
446
517
|
|
|
447
518
|
async function example() {
|
|
448
519
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
449
520
|
const api = new DefaultApi();
|
|
450
521
|
|
|
451
522
|
const body = {
|
|
452
|
-
// string |
|
|
453
|
-
|
|
454
|
-
} satisfies
|
|
523
|
+
// string | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\")
|
|
524
|
+
clusterId: clusterId_example,
|
|
525
|
+
} satisfies GetClusterUtilizationRequest;
|
|
455
526
|
|
|
456
527
|
try {
|
|
457
|
-
const data = await api.
|
|
528
|
+
const data = await api.getClusterUtilization(body);
|
|
458
529
|
console.log(data);
|
|
459
530
|
} catch (error) {
|
|
460
531
|
console.error(error);
|
|
@@ -470,11 +541,11 @@ example().catch(console.error);
|
|
|
470
541
|
|
|
471
542
|
| Name | Type | Description | Notes |
|
|
472
543
|
|------------- | ------------- | ------------- | -------------|
|
|
473
|
-
| **
|
|
544
|
+
| **clusterId** | `string` | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\") | [Defaults to `undefined`] |
|
|
474
545
|
|
|
475
546
|
### Return type
|
|
476
547
|
|
|
477
|
-
[**
|
|
548
|
+
[**RightsizingClusterResponse**](RightsizingClusterResponse.md)
|
|
478
549
|
|
|
479
550
|
### Authorization
|
|
480
551
|
|
|
@@ -489,19 +560,19 @@ No authorization required
|
|
|
489
560
|
### HTTP response details
|
|
490
561
|
| Status code | Description | Response headers |
|
|
491
562
|
|-------------|-------------|------------------|
|
|
492
|
-
| **200** |
|
|
563
|
+
| **200** | Cluster utilization data from the latest completed rightsizing report | - |
|
|
564
|
+
| **400** | Invalid cluster_id format | - |
|
|
565
|
+
| **404** | No completed rightsizing report found, or cluster not found in report | - |
|
|
493
566
|
| **500** | Internal server error | - |
|
|
494
567
|
|
|
495
568
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
496
569
|
|
|
497
570
|
|
|
498
|
-
##
|
|
499
|
-
|
|
500
|
-
> ForecastStats getForecasterStats(pairName)
|
|
571
|
+
## getCollectorStatus
|
|
501
572
|
|
|
502
|
-
|
|
573
|
+
> CollectorStatus getCollectorStatus()
|
|
503
574
|
|
|
504
|
-
|
|
575
|
+
Get collector status
|
|
505
576
|
|
|
506
577
|
### Example
|
|
507
578
|
|
|
@@ -510,19 +581,14 @@ import {
|
|
|
510
581
|
Configuration,
|
|
511
582
|
DefaultApi,
|
|
512
583
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
513
|
-
import type {
|
|
584
|
+
import type { GetCollectorStatusRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
514
585
|
|
|
515
586
|
async function example() {
|
|
516
587
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
517
588
|
const api = new DefaultApi();
|
|
518
589
|
|
|
519
|
-
const body = {
|
|
520
|
-
// string | Pair name to get statistics for
|
|
521
|
-
pairName: pairName_example,
|
|
522
|
-
} satisfies GetForecasterStatsRequest;
|
|
523
|
-
|
|
524
590
|
try {
|
|
525
|
-
const data = await api.
|
|
591
|
+
const data = await api.getCollectorStatus();
|
|
526
592
|
console.log(data);
|
|
527
593
|
} catch (error) {
|
|
528
594
|
console.error(error);
|
|
@@ -535,14 +601,11 @@ example().catch(console.error);
|
|
|
535
601
|
|
|
536
602
|
### Parameters
|
|
537
603
|
|
|
538
|
-
|
|
539
|
-
| Name | Type | Description | Notes |
|
|
540
|
-
|------------- | ------------- | ------------- | -------------|
|
|
541
|
-
| **pairName** | `string` | Pair name to get statistics for | [Defaults to `undefined`] |
|
|
604
|
+
This endpoint does not need any parameter.
|
|
542
605
|
|
|
543
606
|
### Return type
|
|
544
607
|
|
|
545
|
-
[**
|
|
608
|
+
[**CollectorStatus**](CollectorStatus.md)
|
|
546
609
|
|
|
547
610
|
### Authorization
|
|
548
611
|
|
|
@@ -557,20 +620,19 @@ No authorization required
|
|
|
557
620
|
### HTTP response details
|
|
558
621
|
| Status code | Description | Response headers |
|
|
559
622
|
|-------------|-------------|------------------|
|
|
560
|
-
| **200** |
|
|
561
|
-
| **400** | Missing pairName parameter | - |
|
|
623
|
+
| **200** | Collector status | - |
|
|
562
624
|
| **500** | Internal server error | - |
|
|
563
625
|
|
|
564
626
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
565
627
|
|
|
566
628
|
|
|
567
|
-
##
|
|
629
|
+
## getCredentials
|
|
568
630
|
|
|
569
|
-
>
|
|
631
|
+
> CredentialStatus getCredentials()
|
|
570
632
|
|
|
571
|
-
|
|
633
|
+
Get stored credential status
|
|
572
634
|
|
|
573
|
-
Returns
|
|
635
|
+
Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
|
|
574
636
|
|
|
575
637
|
### Example
|
|
576
638
|
|
|
@@ -579,14 +641,14 @@ import {
|
|
|
579
641
|
Configuration,
|
|
580
642
|
DefaultApi,
|
|
581
643
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
582
|
-
import type {
|
|
644
|
+
import type { GetCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
583
645
|
|
|
584
646
|
async function example() {
|
|
585
647
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
586
648
|
const api = new DefaultApi();
|
|
587
649
|
|
|
588
650
|
try {
|
|
589
|
-
const data = await api.
|
|
651
|
+
const data = await api.getCredentials();
|
|
590
652
|
console.log(data);
|
|
591
653
|
} catch (error) {
|
|
592
654
|
console.error(error);
|
|
@@ -603,7 +665,7 @@ This endpoint does not need any parameter.
|
|
|
603
665
|
|
|
604
666
|
### Return type
|
|
605
667
|
|
|
606
|
-
[**
|
|
668
|
+
[**CredentialStatus**](CredentialStatus.md)
|
|
607
669
|
|
|
608
670
|
### Authorization
|
|
609
671
|
|
|
@@ -618,16 +680,20 @@ No authorization required
|
|
|
618
680
|
### HTTP response details
|
|
619
681
|
| Status code | Description | Response headers |
|
|
620
682
|
|-------------|-------------|------------------|
|
|
621
|
-
| **200** |
|
|
683
|
+
| **200** | Credential status | - |
|
|
684
|
+
| **404** | No credentials stored | - |
|
|
685
|
+
| **500** | Internal server error | - |
|
|
622
686
|
|
|
623
687
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
624
688
|
|
|
625
689
|
|
|
626
|
-
##
|
|
690
|
+
## getForecasterDatastores
|
|
627
691
|
|
|
628
|
-
>
|
|
692
|
+
> Array<DatastoreDetail> getForecasterDatastores(forecasterDatastoresRequest)
|
|
629
693
|
|
|
630
|
-
|
|
694
|
+
List available datastores
|
|
695
|
+
|
|
696
|
+
Returns datastores from the forklift-collected inventory with storage vendor and capability information derived from NAA device identifiers. No vSphere credentials are required.
|
|
631
697
|
|
|
632
698
|
### Example
|
|
633
699
|
|
|
@@ -636,25 +702,19 @@ import {
|
|
|
636
702
|
Configuration,
|
|
637
703
|
DefaultApi,
|
|
638
704
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
639
|
-
import type {
|
|
705
|
+
import type { GetForecasterDatastoresRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
640
706
|
|
|
641
707
|
async function example() {
|
|
642
708
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
643
709
|
const api = new DefaultApi();
|
|
644
710
|
|
|
645
711
|
const body = {
|
|
646
|
-
//
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
sort: ["cluster:asc","name:desc"],
|
|
650
|
-
// number | Page number for pagination (optional)
|
|
651
|
-
page: 56,
|
|
652
|
-
// number | Number of items per page (optional)
|
|
653
|
-
pageSize: 56,
|
|
654
|
-
} satisfies GetGroupRequest;
|
|
712
|
+
// ForecasterDatastoresRequest (optional)
|
|
713
|
+
forecasterDatastoresRequest: ...,
|
|
714
|
+
} satisfies GetForecasterDatastoresRequest;
|
|
655
715
|
|
|
656
716
|
try {
|
|
657
|
-
const data = await api.
|
|
717
|
+
const data = await api.getForecasterDatastores(body);
|
|
658
718
|
console.log(data);
|
|
659
719
|
} catch (error) {
|
|
660
720
|
console.error(error);
|
|
@@ -670,14 +730,11 @@ example().catch(console.error);
|
|
|
670
730
|
|
|
671
731
|
| Name | Type | Description | Notes |
|
|
672
732
|
|------------- | ------------- | ------------- | -------------|
|
|
673
|
-
| **
|
|
674
|
-
| **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] |
|
|
675
|
-
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
676
|
-
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
733
|
+
| **forecasterDatastoresRequest** | [ForecasterDatastoresRequest](ForecasterDatastoresRequest.md) | | [Optional] |
|
|
677
734
|
|
|
678
735
|
### Return type
|
|
679
736
|
|
|
680
|
-
[**
|
|
737
|
+
[**Array<DatastoreDetail>**](DatastoreDetail.md)
|
|
681
738
|
|
|
682
739
|
### Authorization
|
|
683
740
|
|
|
@@ -685,25 +742,26 @@ No authorization required
|
|
|
685
742
|
|
|
686
743
|
### HTTP request headers
|
|
687
744
|
|
|
688
|
-
- **Content-Type**:
|
|
745
|
+
- **Content-Type**: `application/json`
|
|
689
746
|
- **Accept**: `application/json`
|
|
690
747
|
|
|
691
748
|
|
|
692
749
|
### HTTP response details
|
|
693
750
|
| Status code | Description | Response headers |
|
|
694
751
|
|-------------|-------------|------------------|
|
|
695
|
-
| **200** |
|
|
696
|
-
| **404** | Group not found | - |
|
|
752
|
+
| **200** | List of datastores | - |
|
|
697
753
|
| **500** | Internal server error | - |
|
|
698
754
|
|
|
699
755
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
700
756
|
|
|
701
757
|
|
|
702
|
-
##
|
|
758
|
+
## getForecasterRuns
|
|
703
759
|
|
|
704
|
-
>
|
|
760
|
+
> Array<BenchmarkRun> getForecasterRuns(pairName)
|
|
705
761
|
|
|
706
|
-
|
|
762
|
+
List benchmark runs
|
|
763
|
+
|
|
764
|
+
Returns individual benchmark iterations. Optionally filtered by pair name.
|
|
707
765
|
|
|
708
766
|
### Example
|
|
709
767
|
|
|
@@ -712,21 +770,19 @@ import {
|
|
|
712
770
|
Configuration,
|
|
713
771
|
DefaultApi,
|
|
714
772
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
715
|
-
import type {
|
|
773
|
+
import type { GetForecasterRunsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
716
774
|
|
|
717
775
|
async function example() {
|
|
718
776
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
719
777
|
const api = new DefaultApi();
|
|
720
778
|
|
|
721
779
|
const body = {
|
|
722
|
-
//
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
includeCredentials: true,
|
|
726
|
-
} satisfies GetInspectorStatusRequest;
|
|
780
|
+
// string | Filter runs by pair name (optional)
|
|
781
|
+
pairName: pairName_example,
|
|
782
|
+
} satisfies GetForecasterRunsRequest;
|
|
727
783
|
|
|
728
784
|
try {
|
|
729
|
-
const data = await api.
|
|
785
|
+
const data = await api.getForecasterRuns(body);
|
|
730
786
|
console.log(data);
|
|
731
787
|
} catch (error) {
|
|
732
788
|
console.error(error);
|
|
@@ -742,12 +798,11 @@ example().catch(console.error);
|
|
|
742
798
|
|
|
743
799
|
| Name | Type | Description | Notes |
|
|
744
800
|
|------------- | ------------- | ------------- | -------------|
|
|
745
|
-
| **
|
|
746
|
-
| **includeCredentials** | `boolean` | If true, include configured vCenter URL and username (password is never returned). omitted if was never set. | [Optional] [Defaults to `false`] |
|
|
801
|
+
| **pairName** | `string` | Filter runs by pair name | [Optional] [Defaults to `undefined`] |
|
|
747
802
|
|
|
748
803
|
### Return type
|
|
749
804
|
|
|
750
|
-
[**
|
|
805
|
+
[**Array<BenchmarkRun>**](BenchmarkRun.md)
|
|
751
806
|
|
|
752
807
|
### Authorization
|
|
753
808
|
|
|
@@ -762,17 +817,19 @@ No authorization required
|
|
|
762
817
|
### HTTP response details
|
|
763
818
|
| Status code | Description | Response headers |
|
|
764
819
|
|-------------|-------------|------------------|
|
|
765
|
-
| **200** |
|
|
820
|
+
| **200** | List of benchmark runs | - |
|
|
766
821
|
| **500** | Internal server error | - |
|
|
767
822
|
|
|
768
823
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
769
824
|
|
|
770
825
|
|
|
771
|
-
##
|
|
826
|
+
## getForecasterStats
|
|
772
827
|
|
|
773
|
-
>
|
|
828
|
+
> ForecastStats getForecasterStats(pairName)
|
|
774
829
|
|
|
775
|
-
Get
|
|
830
|
+
Get throughput statistics
|
|
831
|
+
|
|
832
|
+
Returns computed statistics for a datastore pair\'s benchmark results. Primary endpoint for the UI to display migration time estimates.
|
|
776
833
|
|
|
777
834
|
### Example
|
|
778
835
|
|
|
@@ -781,14 +838,19 @@ import {
|
|
|
781
838
|
Configuration,
|
|
782
839
|
DefaultApi,
|
|
783
840
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
784
|
-
import type {
|
|
841
|
+
import type { GetForecasterStatsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
785
842
|
|
|
786
843
|
async function example() {
|
|
787
844
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
788
845
|
const api = new DefaultApi();
|
|
789
846
|
|
|
847
|
+
const body = {
|
|
848
|
+
// string | Pair name to get statistics for
|
|
849
|
+
pairName: pairName_example,
|
|
850
|
+
} satisfies GetForecasterStatsRequest;
|
|
851
|
+
|
|
790
852
|
try {
|
|
791
|
-
const data = await api.
|
|
853
|
+
const data = await api.getForecasterStats(body);
|
|
792
854
|
console.log(data);
|
|
793
855
|
} catch (error) {
|
|
794
856
|
console.error(error);
|
|
@@ -801,11 +863,14 @@ example().catch(console.error);
|
|
|
801
863
|
|
|
802
864
|
### Parameters
|
|
803
865
|
|
|
804
|
-
|
|
866
|
+
|
|
867
|
+
| Name | Type | Description | Notes |
|
|
868
|
+
|------------- | ------------- | ------------- | -------------|
|
|
869
|
+
| **pairName** | `string` | Pair name to get statistics for | [Defaults to `undefined`] |
|
|
805
870
|
|
|
806
871
|
### Return type
|
|
807
872
|
|
|
808
|
-
[**
|
|
873
|
+
[**ForecastStats**](ForecastStats.md)
|
|
809
874
|
|
|
810
875
|
### Authorization
|
|
811
876
|
|
|
@@ -820,18 +885,20 @@ No authorization required
|
|
|
820
885
|
### HTTP response details
|
|
821
886
|
| Status code | Description | Response headers |
|
|
822
887
|
|-------------|-------------|------------------|
|
|
823
|
-
| **200** |
|
|
824
|
-
| **
|
|
888
|
+
| **200** | Throughput statistics | - |
|
|
889
|
+
| **400** | Missing pairName parameter | - |
|
|
825
890
|
| **500** | Internal server error | - |
|
|
826
891
|
|
|
827
892
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
828
893
|
|
|
829
894
|
|
|
830
|
-
##
|
|
895
|
+
## getForecasterStatus
|
|
831
896
|
|
|
832
|
-
>
|
|
897
|
+
> ForecasterStatus getForecasterStatus()
|
|
833
898
|
|
|
834
|
-
|
|
899
|
+
Poll forecaster status
|
|
900
|
+
|
|
901
|
+
Returns current service state with per-pair progress details.
|
|
835
902
|
|
|
836
903
|
### Example
|
|
837
904
|
|
|
@@ -840,21 +907,14 @@ import {
|
|
|
840
907
|
Configuration,
|
|
841
908
|
DefaultApi,
|
|
842
909
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
843
|
-
import type {
|
|
910
|
+
import type { GetForecasterStatusRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
844
911
|
|
|
845
912
|
async function example() {
|
|
846
913
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
847
914
|
const api = new DefaultApi();
|
|
848
915
|
|
|
849
|
-
const body = {
|
|
850
|
-
// boolean | If true, include the agentId in the response (Compatible with manual inventory upload). (optional)
|
|
851
|
-
withAgentId: true,
|
|
852
|
-
// string | Filter inventory to VMs matching this group\'s filter expression (optional)
|
|
853
|
-
groupId: groupId_example,
|
|
854
|
-
} satisfies GetInventoryRequest;
|
|
855
|
-
|
|
856
916
|
try {
|
|
857
|
-
const data = await api.
|
|
917
|
+
const data = await api.getForecasterStatus();
|
|
858
918
|
console.log(data);
|
|
859
919
|
} catch (error) {
|
|
860
920
|
console.error(error);
|
|
@@ -867,15 +927,414 @@ example().catch(console.error);
|
|
|
867
927
|
|
|
868
928
|
### Parameters
|
|
869
929
|
|
|
930
|
+
This endpoint does not need any parameter.
|
|
870
931
|
|
|
871
|
-
|
|
932
|
+
### Return type
|
|
933
|
+
|
|
934
|
+
[**ForecasterStatus**](ForecasterStatus.md)
|
|
935
|
+
|
|
936
|
+
### Authorization
|
|
937
|
+
|
|
938
|
+
No authorization required
|
|
939
|
+
|
|
940
|
+
### HTTP request headers
|
|
941
|
+
|
|
942
|
+
- **Content-Type**: Not defined
|
|
943
|
+
- **Accept**: `application/json`
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
### HTTP response details
|
|
947
|
+
| Status code | Description | Response headers |
|
|
948
|
+
|-------------|-------------|------------------|
|
|
949
|
+
| **200** | Current forecaster status | - |
|
|
950
|
+
|
|
951
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
## getGroup
|
|
955
|
+
|
|
956
|
+
> GroupResponse getGroup(id, sort, page, pageSize)
|
|
957
|
+
|
|
958
|
+
Get group by ID with its VMs
|
|
959
|
+
|
|
960
|
+
### Example
|
|
961
|
+
|
|
962
|
+
```ts
|
|
963
|
+
import {
|
|
964
|
+
Configuration,
|
|
965
|
+
DefaultApi,
|
|
966
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
967
|
+
import type { GetGroupRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
968
|
+
|
|
969
|
+
async function example() {
|
|
970
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
971
|
+
const api = new DefaultApi();
|
|
972
|
+
|
|
973
|
+
const body = {
|
|
974
|
+
// string | Group ID
|
|
975
|
+
id: id_example,
|
|
976
|
+
// Array<string> | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg. (optional)
|
|
977
|
+
sort: ["cluster:asc","name:desc"],
|
|
978
|
+
// number | Page number for pagination (optional)
|
|
979
|
+
page: 56,
|
|
980
|
+
// number | Number of items per page (optional)
|
|
981
|
+
pageSize: 56,
|
|
982
|
+
} satisfies GetGroupRequest;
|
|
983
|
+
|
|
984
|
+
try {
|
|
985
|
+
const data = await api.getGroup(body);
|
|
986
|
+
console.log(data);
|
|
987
|
+
} catch (error) {
|
|
988
|
+
console.error(error);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
// Run the test
|
|
993
|
+
example().catch(console.error);
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
### Parameters
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
| Name | Type | Description | Notes |
|
|
1000
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1001
|
+
| **id** | `string` | Group ID | [Defaults to `undefined`] |
|
|
1002
|
+
| **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, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg. | [Optional] |
|
|
1003
|
+
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
1004
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
1005
|
+
|
|
1006
|
+
### Return type
|
|
1007
|
+
|
|
1008
|
+
[**GroupResponse**](GroupResponse.md)
|
|
1009
|
+
|
|
1010
|
+
### Authorization
|
|
1011
|
+
|
|
1012
|
+
No authorization required
|
|
1013
|
+
|
|
1014
|
+
### HTTP request headers
|
|
1015
|
+
|
|
1016
|
+
- **Content-Type**: Not defined
|
|
1017
|
+
- **Accept**: `application/json`
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
### HTTP response details
|
|
1021
|
+
| Status code | Description | Response headers |
|
|
1022
|
+
|-------------|-------------|------------------|
|
|
1023
|
+
| **200** | Group details with VMs | - |
|
|
1024
|
+
| **404** | Group not found | - |
|
|
1025
|
+
| **500** | Internal server error | - |
|
|
1026
|
+
|
|
1027
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
## getInspectorStatus
|
|
1031
|
+
|
|
1032
|
+
> InspectorStatus getInspectorStatus(includeVddk)
|
|
1033
|
+
|
|
1034
|
+
Get inspector status
|
|
1035
|
+
|
|
1036
|
+
### Example
|
|
1037
|
+
|
|
1038
|
+
```ts
|
|
1039
|
+
import {
|
|
1040
|
+
Configuration,
|
|
1041
|
+
DefaultApi,
|
|
1042
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1043
|
+
import type { GetInspectorStatusRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1044
|
+
|
|
1045
|
+
async function example() {
|
|
1046
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1047
|
+
const api = new DefaultApi();
|
|
1048
|
+
|
|
1049
|
+
const body = {
|
|
1050
|
+
// boolean | If true, include uploaded VDDK metadata (`version`, `md5`) when present. omitted if VDDK was never uploaded. (optional)
|
|
1051
|
+
includeVddk: true,
|
|
1052
|
+
} satisfies GetInspectorStatusRequest;
|
|
1053
|
+
|
|
1054
|
+
try {
|
|
1055
|
+
const data = await api.getInspectorStatus(body);
|
|
1056
|
+
console.log(data);
|
|
1057
|
+
} catch (error) {
|
|
1058
|
+
console.error(error);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// Run the test
|
|
1063
|
+
example().catch(console.error);
|
|
1064
|
+
```
|
|
1065
|
+
|
|
1066
|
+
### Parameters
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
| Name | Type | Description | Notes |
|
|
1070
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1071
|
+
| **includeVddk** | `boolean` | If true, include uploaded VDDK metadata (`version`, `md5`) when present. omitted if VDDK was never uploaded. | [Optional] [Defaults to `false`] |
|
|
1072
|
+
|
|
1073
|
+
### Return type
|
|
1074
|
+
|
|
1075
|
+
[**InspectorStatus**](InspectorStatus.md)
|
|
1076
|
+
|
|
1077
|
+
### Authorization
|
|
1078
|
+
|
|
1079
|
+
No authorization required
|
|
1080
|
+
|
|
1081
|
+
### HTTP request headers
|
|
1082
|
+
|
|
1083
|
+
- **Content-Type**: Not defined
|
|
1084
|
+
- **Accept**: `application/json`
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
### HTTP response details
|
|
1088
|
+
| Status code | Description | Response headers |
|
|
1089
|
+
|-------------|-------------|------------------|
|
|
1090
|
+
| **200** | Inspector status | - |
|
|
1091
|
+
| **500** | Internal server error | - |
|
|
1092
|
+
|
|
1093
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
## getInspectorVddkStatus
|
|
1097
|
+
|
|
1098
|
+
> VddkProperties getInspectorVddkStatus()
|
|
1099
|
+
|
|
1100
|
+
Get VDDK status
|
|
1101
|
+
|
|
1102
|
+
### Example
|
|
1103
|
+
|
|
1104
|
+
```ts
|
|
1105
|
+
import {
|
|
1106
|
+
Configuration,
|
|
1107
|
+
DefaultApi,
|
|
1108
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1109
|
+
import type { GetInspectorVddkStatusRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1110
|
+
|
|
1111
|
+
async function example() {
|
|
1112
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1113
|
+
const api = new DefaultApi();
|
|
1114
|
+
|
|
1115
|
+
try {
|
|
1116
|
+
const data = await api.getInspectorVddkStatus();
|
|
1117
|
+
console.log(data);
|
|
1118
|
+
} catch (error) {
|
|
1119
|
+
console.error(error);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
// Run the test
|
|
1124
|
+
example().catch(console.error);
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
### Parameters
|
|
1128
|
+
|
|
1129
|
+
This endpoint does not need any parameter.
|
|
1130
|
+
|
|
1131
|
+
### Return type
|
|
1132
|
+
|
|
1133
|
+
[**VddkProperties**](VddkProperties.md)
|
|
1134
|
+
|
|
1135
|
+
### Authorization
|
|
1136
|
+
|
|
1137
|
+
No authorization required
|
|
1138
|
+
|
|
1139
|
+
### HTTP request headers
|
|
1140
|
+
|
|
1141
|
+
- **Content-Type**: Not defined
|
|
1142
|
+
- **Accept**: `application/json`
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
### HTTP response details
|
|
1146
|
+
| Status code | Description | Response headers |
|
|
1147
|
+
|-------------|-------------|------------------|
|
|
1148
|
+
| **200** | Returns the current properties of the uploaded VMware VDDK tar. If the VDDK package has not been uploaded, a 404 response is returned. | - |
|
|
1149
|
+
| **404** | Vddk not found | - |
|
|
1150
|
+
| **500** | Internal server error | - |
|
|
1151
|
+
|
|
1152
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
## getInventory
|
|
1156
|
+
|
|
1157
|
+
> GetInventory200Response getInventory(withAgentId, groupId)
|
|
1158
|
+
|
|
1159
|
+
Get collected inventory
|
|
1160
|
+
|
|
1161
|
+
### Example
|
|
1162
|
+
|
|
1163
|
+
```ts
|
|
1164
|
+
import {
|
|
1165
|
+
Configuration,
|
|
1166
|
+
DefaultApi,
|
|
1167
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1168
|
+
import type { GetInventoryRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1169
|
+
|
|
1170
|
+
async function example() {
|
|
1171
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1172
|
+
const api = new DefaultApi();
|
|
1173
|
+
|
|
1174
|
+
const body = {
|
|
1175
|
+
// boolean | If true, include the agentId in the response (Compatible with manual inventory upload). (optional)
|
|
1176
|
+
withAgentId: true,
|
|
1177
|
+
// string | Filter inventory to VMs matching this group\'s filter expression (optional)
|
|
1178
|
+
groupId: groupId_example,
|
|
1179
|
+
} satisfies GetInventoryRequest;
|
|
1180
|
+
|
|
1181
|
+
try {
|
|
1182
|
+
const data = await api.getInventory(body);
|
|
1183
|
+
console.log(data);
|
|
1184
|
+
} catch (error) {
|
|
1185
|
+
console.error(error);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
// Run the test
|
|
1190
|
+
example().catch(console.error);
|
|
1191
|
+
```
|
|
1192
|
+
|
|
1193
|
+
### Parameters
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
| Name | Type | Description | Notes |
|
|
1197
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1198
|
+
| **withAgentId** | `boolean` | If true, include the agentId in the response (Compatible with manual inventory upload). | [Optional] [Defaults to `false`] |
|
|
1199
|
+
| **groupId** | `string` | Filter inventory to VMs matching this group\'s filter expression | [Optional] [Defaults to `undefined`] |
|
|
1200
|
+
|
|
1201
|
+
### Return type
|
|
1202
|
+
|
|
1203
|
+
[**GetInventory200Response**](GetInventory200Response.md)
|
|
1204
|
+
|
|
1205
|
+
### Authorization
|
|
1206
|
+
|
|
1207
|
+
No authorization required
|
|
1208
|
+
|
|
1209
|
+
### HTTP request headers
|
|
1210
|
+
|
|
1211
|
+
- **Content-Type**: Not defined
|
|
1212
|
+
- **Accept**: `application/json`
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
### HTTP response details
|
|
1216
|
+
| Status code | Description | Response headers |
|
|
1217
|
+
|-------------|-------------|------------------|
|
|
1218
|
+
| **200** | Collected inventory | - |
|
|
1219
|
+
| **404** | Inventory not available | - |
|
|
1220
|
+
| **500** | Internal server error | - |
|
|
1221
|
+
|
|
1222
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
## getLatestRightsizingClusters
|
|
1226
|
+
|
|
1227
|
+
> RightsizingClusterListResponse getLatestRightsizingClusters(byExpression)
|
|
1228
|
+
|
|
1229
|
+
Get cluster-level utilization aggregates for the latest completed report
|
|
1230
|
+
|
|
1231
|
+
### Example
|
|
1232
|
+
|
|
1233
|
+
```ts
|
|
1234
|
+
import {
|
|
1235
|
+
Configuration,
|
|
1236
|
+
DefaultApi,
|
|
1237
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1238
|
+
import type { GetLatestRightsizingClustersRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1239
|
+
|
|
1240
|
+
async function example() {
|
|
1241
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1242
|
+
const api = new DefaultApi();
|
|
1243
|
+
|
|
1244
|
+
const body = {
|
|
1245
|
+
// string | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. (optional)
|
|
1246
|
+
byExpression: byExpression_example,
|
|
1247
|
+
} satisfies GetLatestRightsizingClustersRequest;
|
|
1248
|
+
|
|
1249
|
+
try {
|
|
1250
|
+
const data = await api.getLatestRightsizingClusters(body);
|
|
1251
|
+
console.log(data);
|
|
1252
|
+
} catch (error) {
|
|
1253
|
+
console.error(error);
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
// Run the test
|
|
1258
|
+
example().catch(console.error);
|
|
1259
|
+
```
|
|
1260
|
+
|
|
1261
|
+
### Parameters
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
| Name | Type | Description | Notes |
|
|
1265
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1266
|
+
| **byExpression** | `string` | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. | [Optional] [Defaults to `undefined`] |
|
|
1267
|
+
|
|
1268
|
+
### Return type
|
|
1269
|
+
|
|
1270
|
+
[**RightsizingClusterListResponse**](RightsizingClusterListResponse.md)
|
|
1271
|
+
|
|
1272
|
+
### Authorization
|
|
1273
|
+
|
|
1274
|
+
No authorization required
|
|
1275
|
+
|
|
1276
|
+
### HTTP request headers
|
|
1277
|
+
|
|
1278
|
+
- **Content-Type**: Not defined
|
|
1279
|
+
- **Accept**: `application/json`
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
### HTTP response details
|
|
1283
|
+
| Status code | Description | Response headers |
|
|
1284
|
+
|-------------|-------------|------------------|
|
|
1285
|
+
| **200** | Cluster utilization aggregates | - |
|
|
1286
|
+
| **404** | No completed rightsizing report found | - |
|
|
1287
|
+
| **500** | Internal server error | - |
|
|
1288
|
+
|
|
1289
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
## getRightsizingReport
|
|
1293
|
+
|
|
1294
|
+
> RightsizingReport getRightsizingReport(reportId)
|
|
1295
|
+
|
|
1296
|
+
Get a specific rightsizing report with full VM metrics
|
|
1297
|
+
|
|
1298
|
+
### Example
|
|
1299
|
+
|
|
1300
|
+
```ts
|
|
1301
|
+
import {
|
|
1302
|
+
Configuration,
|
|
1303
|
+
DefaultApi,
|
|
1304
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1305
|
+
import type { GetRightsizingReportRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1306
|
+
|
|
1307
|
+
async function example() {
|
|
1308
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1309
|
+
const api = new DefaultApi();
|
|
1310
|
+
|
|
1311
|
+
const body = {
|
|
1312
|
+
// string | Report UUID
|
|
1313
|
+
reportId: reportId_example,
|
|
1314
|
+
} satisfies GetRightsizingReportRequest;
|
|
1315
|
+
|
|
1316
|
+
try {
|
|
1317
|
+
const data = await api.getRightsizingReport(body);
|
|
1318
|
+
console.log(data);
|
|
1319
|
+
} catch (error) {
|
|
1320
|
+
console.error(error);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
// Run the test
|
|
1325
|
+
example().catch(console.error);
|
|
1326
|
+
```
|
|
1327
|
+
|
|
1328
|
+
### Parameters
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
| Name | Type | Description | Notes |
|
|
872
1332
|
|------------- | ------------- | ------------- | -------------|
|
|
873
|
-
| **
|
|
874
|
-
| **groupId** | `string` | Filter inventory to VMs matching this group\'s filter expression | [Optional] [Defaults to `undefined`] |
|
|
1333
|
+
| **reportId** | `string` | Report UUID | [Defaults to `undefined`] |
|
|
875
1334
|
|
|
876
1335
|
### Return type
|
|
877
1336
|
|
|
878
|
-
[**
|
|
1337
|
+
[**RightsizingReport**](RightsizingReport.md)
|
|
879
1338
|
|
|
880
1339
|
### Authorization
|
|
881
1340
|
|
|
@@ -890,18 +1349,18 @@ No authorization required
|
|
|
890
1349
|
### HTTP response details
|
|
891
1350
|
| Status code | Description | Response headers |
|
|
892
1351
|
|-------------|-------------|------------------|
|
|
893
|
-
| **200** |
|
|
894
|
-
| **404** |
|
|
1352
|
+
| **200** | Rightsizing report | - |
|
|
1353
|
+
| **404** | Report not found | - |
|
|
895
1354
|
| **500** | Internal server error | - |
|
|
896
1355
|
|
|
897
1356
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
898
1357
|
|
|
899
1358
|
|
|
900
|
-
##
|
|
1359
|
+
## getRightsizingReportCluster
|
|
901
1360
|
|
|
902
|
-
>
|
|
1361
|
+
> RightsizingClusterResponse getRightsizingReportCluster(reportId, clusterId)
|
|
903
1362
|
|
|
904
|
-
Get a specific
|
|
1363
|
+
Get utilization for a specific cluster from a specific report
|
|
905
1364
|
|
|
906
1365
|
### Example
|
|
907
1366
|
|
|
@@ -910,19 +1369,21 @@ import {
|
|
|
910
1369
|
Configuration,
|
|
911
1370
|
DefaultApi,
|
|
912
1371
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
913
|
-
import type {
|
|
1372
|
+
import type { GetRightsizingReportClusterRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
914
1373
|
|
|
915
1374
|
async function example() {
|
|
916
1375
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
917
1376
|
const api = new DefaultApi();
|
|
918
1377
|
|
|
919
1378
|
const body = {
|
|
920
|
-
// string |
|
|
921
|
-
|
|
922
|
-
|
|
1379
|
+
// string | Rightsizing report UUID
|
|
1380
|
+
reportId: reportId_example,
|
|
1381
|
+
// string | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\")
|
|
1382
|
+
clusterId: clusterId_example,
|
|
1383
|
+
} satisfies GetRightsizingReportClusterRequest;
|
|
923
1384
|
|
|
924
1385
|
try {
|
|
925
|
-
const data = await api.
|
|
1386
|
+
const data = await api.getRightsizingReportCluster(body);
|
|
926
1387
|
console.log(data);
|
|
927
1388
|
} catch (error) {
|
|
928
1389
|
console.error(error);
|
|
@@ -938,11 +1399,12 @@ example().catch(console.error);
|
|
|
938
1399
|
|
|
939
1400
|
| Name | Type | Description | Notes |
|
|
940
1401
|
|------------- | ------------- | ------------- | -------------|
|
|
941
|
-
| **
|
|
1402
|
+
| **reportId** | `string` | Rightsizing report UUID | [Defaults to `undefined`] |
|
|
1403
|
+
| **clusterId** | `string` | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\") | [Defaults to `undefined`] |
|
|
942
1404
|
|
|
943
1405
|
### Return type
|
|
944
1406
|
|
|
945
|
-
[**
|
|
1407
|
+
[**RightsizingClusterResponse**](RightsizingClusterResponse.md)
|
|
946
1408
|
|
|
947
1409
|
### Authorization
|
|
948
1410
|
|
|
@@ -957,7 +1419,77 @@ No authorization required
|
|
|
957
1419
|
### HTTP response details
|
|
958
1420
|
| Status code | Description | Response headers |
|
|
959
1421
|
|-------------|-------------|------------------|
|
|
960
|
-
| **200** |
|
|
1422
|
+
| **200** | Cluster utilization data | - |
|
|
1423
|
+
| **404** | Report not found, or cluster not found in report | - |
|
|
1424
|
+
| **500** | Internal server error | - |
|
|
1425
|
+
|
|
1426
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
## getRightsizingReportClusters
|
|
1430
|
+
|
|
1431
|
+
> RightsizingClusterListResponse getRightsizingReportClusters(reportId, byExpression)
|
|
1432
|
+
|
|
1433
|
+
Get cluster-level utilization aggregates for a specific report
|
|
1434
|
+
|
|
1435
|
+
### Example
|
|
1436
|
+
|
|
1437
|
+
```ts
|
|
1438
|
+
import {
|
|
1439
|
+
Configuration,
|
|
1440
|
+
DefaultApi,
|
|
1441
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1442
|
+
import type { GetRightsizingReportClustersRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1443
|
+
|
|
1444
|
+
async function example() {
|
|
1445
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1446
|
+
const api = new DefaultApi();
|
|
1447
|
+
|
|
1448
|
+
const body = {
|
|
1449
|
+
// string | Rightsizing report UUID
|
|
1450
|
+
reportId: reportId_example,
|
|
1451
|
+
// string | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. (optional)
|
|
1452
|
+
byExpression: byExpression_example,
|
|
1453
|
+
} satisfies GetRightsizingReportClustersRequest;
|
|
1454
|
+
|
|
1455
|
+
try {
|
|
1456
|
+
const data = await api.getRightsizingReportClusters(body);
|
|
1457
|
+
console.log(data);
|
|
1458
|
+
} catch (error) {
|
|
1459
|
+
console.error(error);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
// Run the test
|
|
1464
|
+
example().catch(console.error);
|
|
1465
|
+
```
|
|
1466
|
+
|
|
1467
|
+
### Parameters
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
| Name | Type | Description | Notes |
|
|
1471
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1472
|
+
| **reportId** | `string` | Rightsizing report UUID | [Defaults to `undefined`] |
|
|
1473
|
+
| **byExpression** | `string` | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. | [Optional] [Defaults to `undefined`] |
|
|
1474
|
+
|
|
1475
|
+
### Return type
|
|
1476
|
+
|
|
1477
|
+
[**RightsizingClusterListResponse**](RightsizingClusterListResponse.md)
|
|
1478
|
+
|
|
1479
|
+
### Authorization
|
|
1480
|
+
|
|
1481
|
+
No authorization required
|
|
1482
|
+
|
|
1483
|
+
### HTTP request headers
|
|
1484
|
+
|
|
1485
|
+
- **Content-Type**: Not defined
|
|
1486
|
+
- **Accept**: `application/json`
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
### HTTP response details
|
|
1490
|
+
| Status code | Description | Response headers |
|
|
1491
|
+
|-------------|-------------|------------------|
|
|
1492
|
+
| **200** | Cluster utilization aggregates | - |
|
|
961
1493
|
| **404** | Report not found | - |
|
|
962
1494
|
| **500** | Internal server error | - |
|
|
963
1495
|
|
|
@@ -1031,6 +1563,64 @@ No authorization required
|
|
|
1031
1563
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1032
1564
|
|
|
1033
1565
|
|
|
1566
|
+
## getVMLabels
|
|
1567
|
+
|
|
1568
|
+
> VMLabelsResponse getVMLabels()
|
|
1569
|
+
|
|
1570
|
+
Get all distinct labels in use across VMs
|
|
1571
|
+
|
|
1572
|
+
### Example
|
|
1573
|
+
|
|
1574
|
+
```ts
|
|
1575
|
+
import {
|
|
1576
|
+
Configuration,
|
|
1577
|
+
DefaultApi,
|
|
1578
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1579
|
+
import type { GetVMLabelsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1580
|
+
|
|
1581
|
+
async function example() {
|
|
1582
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1583
|
+
const api = new DefaultApi();
|
|
1584
|
+
|
|
1585
|
+
try {
|
|
1586
|
+
const data = await api.getVMLabels();
|
|
1587
|
+
console.log(data);
|
|
1588
|
+
} catch (error) {
|
|
1589
|
+
console.error(error);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
// Run the test
|
|
1594
|
+
example().catch(console.error);
|
|
1595
|
+
```
|
|
1596
|
+
|
|
1597
|
+
### Parameters
|
|
1598
|
+
|
|
1599
|
+
This endpoint does not need any parameter.
|
|
1600
|
+
|
|
1601
|
+
### Return type
|
|
1602
|
+
|
|
1603
|
+
[**VMLabelsResponse**](VMLabelsResponse.md)
|
|
1604
|
+
|
|
1605
|
+
### Authorization
|
|
1606
|
+
|
|
1607
|
+
No authorization required
|
|
1608
|
+
|
|
1609
|
+
### HTTP request headers
|
|
1610
|
+
|
|
1611
|
+
- **Content-Type**: Not defined
|
|
1612
|
+
- **Accept**: `application/json`
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
### HTTP response details
|
|
1616
|
+
| Status code | Description | Response headers |
|
|
1617
|
+
|-------------|-------------|------------------|
|
|
1618
|
+
| **200** | List of distinct labels | - |
|
|
1619
|
+
| **500** | Internal server error | - |
|
|
1620
|
+
|
|
1621
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1622
|
+
|
|
1623
|
+
|
|
1034
1624
|
## getVMUtilization
|
|
1035
1625
|
|
|
1036
1626
|
> VmUtilizationDetails getVMUtilization(id)
|
|
@@ -1120,7 +1710,7 @@ async function example() {
|
|
|
1120
1710
|
const body = {
|
|
1121
1711
|
// string | Filter by expression (matches VMs with the provided expression) (optional)
|
|
1122
1712
|
byExpression: exp1,
|
|
1123
|
-
// 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)
|
|
1713
|
+
// Array<string> | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg. (optional)
|
|
1124
1714
|
sort: ["cluster:asc","name:desc"],
|
|
1125
1715
|
// number | Page number for pagination (optional)
|
|
1126
1716
|
page: 56,
|
|
@@ -1146,7 +1736,7 @@ example().catch(console.error);
|
|
|
1146
1736
|
| Name | Type | Description | Notes |
|
|
1147
1737
|
|------------- | ------------- | ------------- | -------------|
|
|
1148
1738
|
| **byExpression** | `string` | Filter by expression (matches VMs with the provided expression) | [Optional] [Defaults to `undefined`] |
|
|
1149
|
-
| **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] |
|
|
1739
|
+
| **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, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg. | [Optional] |
|
|
1150
1740
|
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
1151
1741
|
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
1152
1742
|
|
|
@@ -1174,11 +1764,126 @@ No authorization required
|
|
|
1174
1764
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1175
1765
|
|
|
1176
1766
|
|
|
1177
|
-
##
|
|
1767
|
+
## getVMsFilterOptions
|
|
1768
|
+
|
|
1769
|
+
> VMFilterOptionsResponse getVMsFilterOptions()
|
|
1770
|
+
|
|
1771
|
+
Get distinct filter option values for VMs
|
|
1772
|
+
|
|
1773
|
+
### Example
|
|
1774
|
+
|
|
1775
|
+
```ts
|
|
1776
|
+
import {
|
|
1777
|
+
Configuration,
|
|
1778
|
+
DefaultApi,
|
|
1779
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1780
|
+
import type { GetVMsFilterOptionsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1781
|
+
|
|
1782
|
+
async function example() {
|
|
1783
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1784
|
+
const api = new DefaultApi();
|
|
1785
|
+
|
|
1786
|
+
try {
|
|
1787
|
+
const data = await api.getVMsFilterOptions();
|
|
1788
|
+
console.log(data);
|
|
1789
|
+
} catch (error) {
|
|
1790
|
+
console.error(error);
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
// Run the test
|
|
1795
|
+
example().catch(console.error);
|
|
1796
|
+
```
|
|
1797
|
+
|
|
1798
|
+
### Parameters
|
|
1799
|
+
|
|
1800
|
+
This endpoint does not need any parameter.
|
|
1801
|
+
|
|
1802
|
+
### Return type
|
|
1803
|
+
|
|
1804
|
+
[**VMFilterOptionsResponse**](VMFilterOptionsResponse.md)
|
|
1805
|
+
|
|
1806
|
+
### Authorization
|
|
1807
|
+
|
|
1808
|
+
No authorization required
|
|
1809
|
+
|
|
1810
|
+
### HTTP request headers
|
|
1811
|
+
|
|
1812
|
+
- **Content-Type**: Not defined
|
|
1813
|
+
- **Accept**: `application/json`
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
### HTTP response details
|
|
1817
|
+
| Status code | Description | Response headers |
|
|
1818
|
+
|-------------|-------------|------------------|
|
|
1819
|
+
| **200** | Filter options | - |
|
|
1820
|
+
| **500** | Internal server error | - |
|
|
1821
|
+
|
|
1822
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
## getVersion
|
|
1826
|
+
|
|
1827
|
+
> VersionInfo getVersion()
|
|
1828
|
+
|
|
1829
|
+
Get agent version information
|
|
1830
|
+
|
|
1831
|
+
### Example
|
|
1832
|
+
|
|
1833
|
+
```ts
|
|
1834
|
+
import {
|
|
1835
|
+
Configuration,
|
|
1836
|
+
DefaultApi,
|
|
1837
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
1838
|
+
import type { GetVersionRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1839
|
+
|
|
1840
|
+
async function example() {
|
|
1841
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1842
|
+
const api = new DefaultApi();
|
|
1843
|
+
|
|
1844
|
+
try {
|
|
1845
|
+
const data = await api.getVersion();
|
|
1846
|
+
console.log(data);
|
|
1847
|
+
} catch (error) {
|
|
1848
|
+
console.error(error);
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
// Run the test
|
|
1853
|
+
example().catch(console.error);
|
|
1854
|
+
```
|
|
1855
|
+
|
|
1856
|
+
### Parameters
|
|
1857
|
+
|
|
1858
|
+
This endpoint does not need any parameter.
|
|
1859
|
+
|
|
1860
|
+
### Return type
|
|
1861
|
+
|
|
1862
|
+
[**VersionInfo**](VersionInfo.md)
|
|
1863
|
+
|
|
1864
|
+
### Authorization
|
|
1865
|
+
|
|
1866
|
+
No authorization required
|
|
1867
|
+
|
|
1868
|
+
### HTTP request headers
|
|
1869
|
+
|
|
1870
|
+
- **Content-Type**: Not defined
|
|
1871
|
+
- **Accept**: `application/json`
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
### HTTP response details
|
|
1875
|
+
| Status code | Description | Response headers |
|
|
1876
|
+
|-------------|-------------|------------------|
|
|
1877
|
+
| **200** | Version information | - |
|
|
1878
|
+
|
|
1879
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
## listGroups
|
|
1178
1883
|
|
|
1179
|
-
>
|
|
1884
|
+
> GroupListResponse listGroups(byName, page, pageSize)
|
|
1180
1885
|
|
|
1181
|
-
|
|
1886
|
+
List all groups
|
|
1182
1887
|
|
|
1183
1888
|
### Example
|
|
1184
1889
|
|
|
@@ -1187,14 +1892,23 @@ import {
|
|
|
1187
1892
|
Configuration,
|
|
1188
1893
|
DefaultApi,
|
|
1189
1894
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1190
|
-
import type {
|
|
1895
|
+
import type { ListGroupsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1191
1896
|
|
|
1192
1897
|
async function example() {
|
|
1193
1898
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1194
1899
|
const api = new DefaultApi();
|
|
1195
1900
|
|
|
1901
|
+
const body = {
|
|
1902
|
+
// string | Filter groups by name (case-insensitive substring match) (optional)
|
|
1903
|
+
byName: byName_example,
|
|
1904
|
+
// number | Page number (1-indexed) (optional)
|
|
1905
|
+
page: 56,
|
|
1906
|
+
// number | Number of groups per page (optional)
|
|
1907
|
+
pageSize: 56,
|
|
1908
|
+
} satisfies ListGroupsRequest;
|
|
1909
|
+
|
|
1196
1910
|
try {
|
|
1197
|
-
const data = await api.
|
|
1911
|
+
const data = await api.listGroups(body);
|
|
1198
1912
|
console.log(data);
|
|
1199
1913
|
} catch (error) {
|
|
1200
1914
|
console.error(error);
|
|
@@ -1207,11 +1921,16 @@ example().catch(console.error);
|
|
|
1207
1921
|
|
|
1208
1922
|
### Parameters
|
|
1209
1923
|
|
|
1210
|
-
|
|
1924
|
+
|
|
1925
|
+
| Name | Type | Description | Notes |
|
|
1926
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1927
|
+
| **byName** | `string` | Filter groups by name (case-insensitive substring match) | [Optional] [Defaults to `undefined`] |
|
|
1928
|
+
| **page** | `number` | Page number (1-indexed) | [Optional] [Defaults to `1`] |
|
|
1929
|
+
| **pageSize** | `number` | Number of groups per page | [Optional] [Defaults to `20`] |
|
|
1211
1930
|
|
|
1212
1931
|
### Return type
|
|
1213
1932
|
|
|
1214
|
-
[**
|
|
1933
|
+
[**GroupListResponse**](GroupListResponse.md)
|
|
1215
1934
|
|
|
1216
1935
|
### Authorization
|
|
1217
1936
|
|
|
@@ -1226,16 +1945,18 @@ No authorization required
|
|
|
1226
1945
|
### HTTP response details
|
|
1227
1946
|
| Status code | Description | Response headers |
|
|
1228
1947
|
|-------------|-------------|------------------|
|
|
1229
|
-
| **200** |
|
|
1948
|
+
| **200** | List of groups | - |
|
|
1949
|
+
| **400** | Invalid filter expression | - |
|
|
1950
|
+
| **500** | Internal server error | - |
|
|
1230
1951
|
|
|
1231
1952
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1232
1953
|
|
|
1233
1954
|
|
|
1234
|
-
##
|
|
1955
|
+
## listRightsizingReportClusters
|
|
1235
1956
|
|
|
1236
|
-
>
|
|
1957
|
+
> RightsizingClusterListResponse listRightsizingReportClusters(reportId, byExpression)
|
|
1237
1958
|
|
|
1238
|
-
|
|
1959
|
+
Get cluster-level utilization aggregates for a specific report
|
|
1239
1960
|
|
|
1240
1961
|
### Example
|
|
1241
1962
|
|
|
@@ -1244,23 +1965,21 @@ import {
|
|
|
1244
1965
|
Configuration,
|
|
1245
1966
|
DefaultApi,
|
|
1246
1967
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1247
|
-
import type {
|
|
1968
|
+
import type { ListRightsizingReportClustersRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1248
1969
|
|
|
1249
1970
|
async function example() {
|
|
1250
1971
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
1251
1972
|
const api = new DefaultApi();
|
|
1252
1973
|
|
|
1253
1974
|
const body = {
|
|
1254
|
-
// string |
|
|
1255
|
-
|
|
1256
|
-
//
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
pageSize: 56,
|
|
1260
|
-
} satisfies ListGroupsRequest;
|
|
1975
|
+
// string | Rightsizing report UUID
|
|
1976
|
+
reportId: reportId_example,
|
|
1977
|
+
// string | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. (optional)
|
|
1978
|
+
byExpression: byExpression_example,
|
|
1979
|
+
} satisfies ListRightsizingReportClustersRequest;
|
|
1261
1980
|
|
|
1262
1981
|
try {
|
|
1263
|
-
const data = await api.
|
|
1982
|
+
const data = await api.listRightsizingReportClusters(body);
|
|
1264
1983
|
console.log(data);
|
|
1265
1984
|
} catch (error) {
|
|
1266
1985
|
console.error(error);
|
|
@@ -1276,13 +1995,12 @@ example().catch(console.error);
|
|
|
1276
1995
|
|
|
1277
1996
|
| Name | Type | Description | Notes |
|
|
1278
1997
|
|------------- | ------------- | ------------- | -------------|
|
|
1279
|
-
| **
|
|
1280
|
-
| **
|
|
1281
|
-
| **pageSize** | `number` | Number of groups per page | [Optional] [Defaults to `20`] |
|
|
1998
|
+
| **reportId** | `string` | Rightsizing report UUID | [Defaults to `undefined`] |
|
|
1999
|
+
| **byExpression** | `string` | Filter DSL expression (e.g. \"cluster_id = \'domain-c123\'\"). Omit to return all clusters. | [Optional] [Defaults to `undefined`] |
|
|
1282
2000
|
|
|
1283
2001
|
### Return type
|
|
1284
2002
|
|
|
1285
|
-
[**
|
|
2003
|
+
[**RightsizingClusterListResponse**](RightsizingClusterListResponse.md)
|
|
1286
2004
|
|
|
1287
2005
|
### Authorization
|
|
1288
2006
|
|
|
@@ -1297,8 +2015,8 @@ No authorization required
|
|
|
1297
2015
|
### HTTP response details
|
|
1298
2016
|
| Status code | Description | Response headers |
|
|
1299
2017
|
|-------------|-------------|------------------|
|
|
1300
|
-
| **200** |
|
|
1301
|
-
| **
|
|
2018
|
+
| **200** | Cluster utilization aggregates | - |
|
|
2019
|
+
| **404** | Report not found | - |
|
|
1302
2020
|
| **500** | Internal server error | - |
|
|
1303
2021
|
|
|
1304
2022
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -1431,13 +2149,13 @@ No authorization required
|
|
|
1431
2149
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1432
2150
|
|
|
1433
2151
|
|
|
1434
|
-
##
|
|
2152
|
+
## putCredentials
|
|
1435
2153
|
|
|
1436
|
-
>
|
|
2154
|
+
> CredentialStatus putCredentials(vcenterCredentials)
|
|
1437
2155
|
|
|
1438
|
-
|
|
2156
|
+
Store vCenter credentials
|
|
1439
2157
|
|
|
1440
|
-
Validates
|
|
2158
|
+
Validates credentials against vSphere, encrypts with disk-based key, and stores in the local database as the active credential set. A subsequent PUT overwrites the previously stored credentials.
|
|
1441
2159
|
|
|
1442
2160
|
### Example
|
|
1443
2161
|
|
|
@@ -1446,7 +2164,7 @@ import {
|
|
|
1446
2164
|
Configuration,
|
|
1447
2165
|
DefaultApi,
|
|
1448
2166
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1449
|
-
import type {
|
|
2167
|
+
import type { PutCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1450
2168
|
|
|
1451
2169
|
async function example() {
|
|
1452
2170
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
@@ -1455,10 +2173,10 @@ async function example() {
|
|
|
1455
2173
|
const body = {
|
|
1456
2174
|
// VcenterCredentials
|
|
1457
2175
|
vcenterCredentials: ...,
|
|
1458
|
-
} satisfies
|
|
2176
|
+
} satisfies PutCredentialsRequest;
|
|
1459
2177
|
|
|
1460
2178
|
try {
|
|
1461
|
-
const data = await api.
|
|
2179
|
+
const data = await api.putCredentials(body);
|
|
1462
2180
|
console.log(data);
|
|
1463
2181
|
} catch (error) {
|
|
1464
2182
|
console.error(error);
|
|
@@ -1478,7 +2196,7 @@ example().catch(console.error);
|
|
|
1478
2196
|
|
|
1479
2197
|
### Return type
|
|
1480
2198
|
|
|
1481
|
-
|
|
2199
|
+
[**CredentialStatus**](CredentialStatus.md)
|
|
1482
2200
|
|
|
1483
2201
|
### Authorization
|
|
1484
2202
|
|
|
@@ -1493,19 +2211,21 @@ No authorization required
|
|
|
1493
2211
|
### HTTP response details
|
|
1494
2212
|
| Status code | Description | Response headers |
|
|
1495
2213
|
|-------------|-------------|------------------|
|
|
1496
|
-
| **
|
|
2214
|
+
| **201** | Credentials created and stored | - |
|
|
2215
|
+
| **200** | Credentials validated and stored | - |
|
|
1497
2216
|
| **400** | Invalid credentials or unreachable vCenter | - |
|
|
1498
|
-
| **403** | Authentication succeeded but user lacks required privileges | - |
|
|
1499
2217
|
| **500** | Internal server error | - |
|
|
1500
2218
|
|
|
1501
2219
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1502
2220
|
|
|
1503
2221
|
|
|
1504
|
-
##
|
|
2222
|
+
## putForecasterCredentials
|
|
2223
|
+
|
|
2224
|
+
> putForecasterCredentials(vcenterCredentials)
|
|
1505
2225
|
|
|
1506
|
-
|
|
2226
|
+
Verify vCenter credentials and permissions
|
|
1507
2227
|
|
|
1508
|
-
|
|
2228
|
+
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
2229
|
|
|
1510
2230
|
### Example
|
|
1511
2231
|
|
|
@@ -1514,7 +2234,7 @@ import {
|
|
|
1514
2234
|
Configuration,
|
|
1515
2235
|
DefaultApi,
|
|
1516
2236
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
1517
|
-
import type {
|
|
2237
|
+
import type { PutForecasterCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
1518
2238
|
|
|
1519
2239
|
async function example() {
|
|
1520
2240
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
@@ -1523,10 +2243,10 @@ async function example() {
|
|
|
1523
2243
|
const body = {
|
|
1524
2244
|
// VcenterCredentials
|
|
1525
2245
|
vcenterCredentials: ...,
|
|
1526
|
-
} satisfies
|
|
2246
|
+
} satisfies PutForecasterCredentialsRequest;
|
|
1527
2247
|
|
|
1528
2248
|
try {
|
|
1529
|
-
const data = await api.
|
|
2249
|
+
const data = await api.putForecasterCredentials(body);
|
|
1530
2250
|
console.log(data);
|
|
1531
2251
|
} catch (error) {
|
|
1532
2252
|
console.error(error);
|
|
@@ -1555,14 +2275,15 @@ No authorization required
|
|
|
1555
2275
|
### HTTP request headers
|
|
1556
2276
|
|
|
1557
2277
|
- **Content-Type**: `application/json`
|
|
1558
|
-
- **Accept**:
|
|
2278
|
+
- **Accept**: `application/json`
|
|
1559
2279
|
|
|
1560
2280
|
|
|
1561
2281
|
### HTTP response details
|
|
1562
2282
|
| Status code | Description | Response headers |
|
|
1563
2283
|
|-------------|-------------|------------------|
|
|
1564
|
-
| **200** | Credentials
|
|
1565
|
-
| **400** |
|
|
2284
|
+
| **200** | Credentials valid and all required privileges are granted | - |
|
|
2285
|
+
| **400** | Invalid credentials or unreachable vCenter | - |
|
|
2286
|
+
| **403** | Authentication succeeded but user lacks required privileges | - |
|
|
1566
2287
|
| **500** | Internal server error | - |
|
|
1567
2288
|
|
|
1568
2289
|
[[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 +3085,212 @@ No authorization required
|
|
|
2364
3085
|
|
|
2365
3086
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2366
3087
|
|
|
3088
|
+
|
|
3089
|
+
## updateLabelVMs
|
|
3090
|
+
|
|
3091
|
+
> updateLabelVMs(label, updateLabelVMsRequest)
|
|
3092
|
+
|
|
3093
|
+
Modify label VM membership (add/remove label to/from VMs)
|
|
3094
|
+
|
|
3095
|
+
### Example
|
|
3096
|
+
|
|
3097
|
+
```ts
|
|
3098
|
+
import {
|
|
3099
|
+
Configuration,
|
|
3100
|
+
DefaultApi,
|
|
3101
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
3102
|
+
import type { UpdateLabelVMsOperationRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
3103
|
+
|
|
3104
|
+
async function example() {
|
|
3105
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
3106
|
+
const api = new DefaultApi();
|
|
3107
|
+
|
|
3108
|
+
const body = {
|
|
3109
|
+
// string | The label to modify
|
|
3110
|
+
label: label_example,
|
|
3111
|
+
// UpdateLabelVMsRequest
|
|
3112
|
+
updateLabelVMsRequest: ...,
|
|
3113
|
+
} satisfies UpdateLabelVMsOperationRequest;
|
|
3114
|
+
|
|
3115
|
+
try {
|
|
3116
|
+
const data = await api.updateLabelVMs(body);
|
|
3117
|
+
console.log(data);
|
|
3118
|
+
} catch (error) {
|
|
3119
|
+
console.error(error);
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
// Run the test
|
|
3124
|
+
example().catch(console.error);
|
|
3125
|
+
```
|
|
3126
|
+
|
|
3127
|
+
### Parameters
|
|
3128
|
+
|
|
3129
|
+
|
|
3130
|
+
| Name | Type | Description | Notes |
|
|
3131
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3132
|
+
| **label** | `string` | The label to modify | [Defaults to `undefined`] |
|
|
3133
|
+
| **updateLabelVMsRequest** | [UpdateLabelVMsRequest](UpdateLabelVMsRequest.md) | | |
|
|
3134
|
+
|
|
3135
|
+
### Return type
|
|
3136
|
+
|
|
3137
|
+
`void` (Empty response body)
|
|
3138
|
+
|
|
3139
|
+
### Authorization
|
|
3140
|
+
|
|
3141
|
+
No authorization required
|
|
3142
|
+
|
|
3143
|
+
### HTTP request headers
|
|
3144
|
+
|
|
3145
|
+
- **Content-Type**: `application/json`
|
|
3146
|
+
- **Accept**: Not defined
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
|
+
### HTTP response details
|
|
3150
|
+
| Status code | Description | Response headers |
|
|
3151
|
+
|-------------|-------------|------------------|
|
|
3152
|
+
| **200** | Label operation completed successfully (all VMs updated atomically) | - |
|
|
3153
|
+
| **400** | Invalid request | - |
|
|
3154
|
+
| **404** | One or more VMs not found (no changes made) | - |
|
|
3155
|
+
| **500** | Internal server error | - |
|
|
3156
|
+
|
|
3157
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
## updateVM
|
|
3161
|
+
|
|
3162
|
+
> updateVM(id, virtualMachineUpdateRequest)
|
|
3163
|
+
|
|
3164
|
+
Update VM properties
|
|
3165
|
+
|
|
3166
|
+
### Example
|
|
3167
|
+
|
|
3168
|
+
```ts
|
|
3169
|
+
import {
|
|
3170
|
+
Configuration,
|
|
3171
|
+
DefaultApi,
|
|
3172
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
3173
|
+
import type { UpdateVMRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
3174
|
+
|
|
3175
|
+
async function example() {
|
|
3176
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
3177
|
+
const api = new DefaultApi();
|
|
3178
|
+
|
|
3179
|
+
const body = {
|
|
3180
|
+
// string | VirtualMachine id
|
|
3181
|
+
id: id_example,
|
|
3182
|
+
// VirtualMachineUpdateRequest
|
|
3183
|
+
virtualMachineUpdateRequest: ...,
|
|
3184
|
+
} satisfies UpdateVMRequest;
|
|
3185
|
+
|
|
3186
|
+
try {
|
|
3187
|
+
const data = await api.updateVM(body);
|
|
3188
|
+
console.log(data);
|
|
3189
|
+
} catch (error) {
|
|
3190
|
+
console.error(error);
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
// Run the test
|
|
3195
|
+
example().catch(console.error);
|
|
3196
|
+
```
|
|
3197
|
+
|
|
3198
|
+
### Parameters
|
|
3199
|
+
|
|
3200
|
+
|
|
3201
|
+
| Name | Type | Description | Notes |
|
|
3202
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3203
|
+
| **id** | `string` | VirtualMachine id | [Defaults to `undefined`] |
|
|
3204
|
+
| **virtualMachineUpdateRequest** | [VirtualMachineUpdateRequest](VirtualMachineUpdateRequest.md) | | |
|
|
3205
|
+
|
|
3206
|
+
### Return type
|
|
3207
|
+
|
|
3208
|
+
`void` (Empty response body)
|
|
3209
|
+
|
|
3210
|
+
### Authorization
|
|
3211
|
+
|
|
3212
|
+
No authorization required
|
|
3213
|
+
|
|
3214
|
+
### HTTP request headers
|
|
3215
|
+
|
|
3216
|
+
- **Content-Type**: `application/json`
|
|
3217
|
+
- **Accept**: Not defined
|
|
3218
|
+
|
|
3219
|
+
|
|
3220
|
+
### HTTP response details
|
|
3221
|
+
| Status code | Description | Response headers |
|
|
3222
|
+
|-------------|-------------|------------------|
|
|
3223
|
+
| **200** | VM updated successfully | - |
|
|
3224
|
+
| **400** | Invalid request | - |
|
|
3225
|
+
| **404** | VM not found | - |
|
|
3226
|
+
| **500** | Internal server error | - |
|
|
3227
|
+
|
|
3228
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3229
|
+
|
|
3230
|
+
|
|
3231
|
+
## validateInspectorCredentials
|
|
3232
|
+
|
|
3233
|
+
> validateInspectorCredentials(vcenterCredentials)
|
|
3234
|
+
|
|
3235
|
+
Validate vCenter credentials for inspector
|
|
3236
|
+
|
|
3237
|
+
### Example
|
|
3238
|
+
|
|
3239
|
+
```ts
|
|
3240
|
+
import {
|
|
3241
|
+
Configuration,
|
|
3242
|
+
DefaultApi,
|
|
3243
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
3244
|
+
import type { ValidateInspectorCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
3245
|
+
|
|
3246
|
+
async function example() {
|
|
3247
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
3248
|
+
const api = new DefaultApi();
|
|
3249
|
+
|
|
3250
|
+
const body = {
|
|
3251
|
+
// VcenterCredentials
|
|
3252
|
+
vcenterCredentials: ...,
|
|
3253
|
+
} satisfies ValidateInspectorCredentialsRequest;
|
|
3254
|
+
|
|
3255
|
+
try {
|
|
3256
|
+
const data = await api.validateInspectorCredentials(body);
|
|
3257
|
+
console.log(data);
|
|
3258
|
+
} catch (error) {
|
|
3259
|
+
console.error(error);
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3263
|
+
// Run the test
|
|
3264
|
+
example().catch(console.error);
|
|
3265
|
+
```
|
|
3266
|
+
|
|
3267
|
+
### Parameters
|
|
3268
|
+
|
|
3269
|
+
|
|
3270
|
+
| Name | Type | Description | Notes |
|
|
3271
|
+
|------------- | ------------- | ------------- | -------------|
|
|
3272
|
+
| **vcenterCredentials** | [VcenterCredentials](VcenterCredentials.md) | | |
|
|
3273
|
+
|
|
3274
|
+
### Return type
|
|
3275
|
+
|
|
3276
|
+
`void` (Empty response body)
|
|
3277
|
+
|
|
3278
|
+
### Authorization
|
|
3279
|
+
|
|
3280
|
+
No authorization required
|
|
3281
|
+
|
|
3282
|
+
### HTTP request headers
|
|
3283
|
+
|
|
3284
|
+
- **Content-Type**: `application/json`
|
|
3285
|
+
- **Accept**: Not defined
|
|
3286
|
+
|
|
3287
|
+
|
|
3288
|
+
### HTTP response details
|
|
3289
|
+
| Status code | Description | Response headers |
|
|
3290
|
+
|-------------|-------------|------------------|
|
|
3291
|
+
| **200** | Credentials updated successfully | - |
|
|
3292
|
+
| **400** | Bad Credentials | - |
|
|
3293
|
+
| **500** | Internal server error | - |
|
|
3294
|
+
|
|
3295
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
3296
|
+
|