@openshift-migration-advisor/agent-sdk 0.12.0-645d2fae3eee → 0.12.0-73dd4924f11b
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 +12 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +15 -3
- package/dist/apis/DefaultApi.d.ts +206 -4
- package/dist/apis/DefaultApi.js +227 -0
- package/dist/esm/apis/DefaultApi.d.ts +206 -4
- package/dist/esm/apis/DefaultApi.js +227 -0
- 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/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/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/InventoryData.d.ts +7 -0
- package/dist/esm/models/InventoryData.js +3 -0
- package/dist/esm/models/UpdateGroupRequest.d.ts +0 -6
- package/dist/esm/models/UpdateGroupRequest.js +0 -2
- package/dist/esm/models/VMFilterOptionsResponse.d.ts +56 -0
- package/dist/esm/models/VMFilterOptionsResponse.js +59 -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 +14 -2
- package/dist/esm/models/VirtualMachine.js +6 -2
- package/dist/esm/models/VmInspectionStatus.d.ts +6 -0
- package/dist/esm/models/VmInspectionStatus.js +4 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/runtime.js +2 -1
- 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/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/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/InventoryData.d.ts +7 -0
- package/dist/models/InventoryData.js +3 -0
- package/dist/models/UpdateGroupRequest.d.ts +0 -6
- package/dist/models/UpdateGroupRequest.js +0 -2
- package/dist/models/VMFilterOptionsResponse.d.ts +56 -0
- package/dist/models/VMFilterOptionsResponse.js +66 -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 +14 -2
- package/dist/models/VirtualMachine.js +6 -2
- package/dist/models/VmInspectionStatus.d.ts +6 -0
- package/dist/models/VmInspectionStatus.js +4 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/runtime.js +2 -1
- package/docs/ApplicationListResponse.md +34 -0
- package/docs/ApplicationOverview.md +40 -0
- package/docs/ApplicationVM.md +36 -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 +385 -4
- package/docs/Group.md +0 -2
- package/docs/GroupResponse.md +2 -0
- package/docs/InventoryData.md +2 -0
- package/docs/UpdateGroupRequest.md +0 -2
- package/docs/VMFilterOptionsResponse.md +42 -0
- package/docs/VMNIC.md +4 -0
- package/docs/VcenterCredentials.md +4 -0
- package/docs/VirtualMachine.md +6 -2
- package/docs/VmInspectionStatus.md +2 -0
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +405 -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/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/Group.ts +0 -8
- package/src/models/GroupResponse.ts +15 -0
- package/src/models/InventoryData.ts +15 -0
- package/src/models/UpdateGroupRequest.ts +0 -8
- package/src/models/VMFilterOptionsResponse.ts +102 -0
- package/src/models/VMNIC.ts +16 -0
- package/src/models/VcenterCredentials.ts +16 -0
- package/src/models/VirtualMachine.ts +20 -4
- package/src/models/VmInspectionStatus.ts +9 -0
- package/src/models/index.ts +6 -0
- package/src/runtime.ts +1 -1
package/docs/DefaultApi.md
CHANGED
|
@@ -5,11 +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 |
|
|
10
11
|
| [**deleteLabelGlobally**](DefaultApi.md#deletelabelglobally) | **DELETE** /vms/labels/{label} | Delete label from all VMs |
|
|
11
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 |
|
|
12
15
|
| [**getCollectorStatus**](DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status |
|
|
16
|
+
| [**getCredentials**](DefaultApi.md#getcredentials) | **GET** /credentials | Get stored credential status |
|
|
13
17
|
| [**getForecasterDatastores**](DefaultApi.md#getforecasterdatastores) | **POST** /forecaster/datastores | List available datastores |
|
|
14
18
|
| [**getForecasterRuns**](DefaultApi.md#getforecasterruns) | **GET** /forecaster/runs | List benchmark runs |
|
|
15
19
|
| [**getForecasterStats**](DefaultApi.md#getforecasterstats) | **GET** /forecaster/stats | Get throughput statistics |
|
|
@@ -26,11 +30,13 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
26
30
|
| [**getVMLabels**](DefaultApi.md#getvmlabels) | **GET** /vms/labels | Get all distinct labels in use across VMs |
|
|
27
31
|
| [**getVMUtilization**](DefaultApi.md#getvmutilization) | **GET** /vms/{id}/utilization | Get utilization breakdown for a specific VM |
|
|
28
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 |
|
|
29
34
|
| [**getVersion**](DefaultApi.md#getversion) | **GET** /version | Get agent version information |
|
|
30
35
|
| [**listGroups**](DefaultApi.md#listgroups) | **GET** /groups | List all groups |
|
|
31
36
|
| [**listRightsizingReportClusters**](DefaultApi.md#listrightsizingreportclusters) | **GET** /rightsizing/{report_id}/clusters | Get cluster-level utilization aggregates for a specific report |
|
|
32
37
|
| [**listRightsizingReports**](DefaultApi.md#listrightsizingreports) | **GET** /rightsizing | List all rightsizing reports |
|
|
33
38
|
| [**postForecasterPairCapabilities**](DefaultApi.md#postforecasterpaircapabilities) | **POST** /forecaster/capabilities | Compute pair capabilities |
|
|
39
|
+
| [**putCredentials**](DefaultApi.md#putcredentials) | **PUT** /credentials | Store vCenter credentials |
|
|
34
40
|
| [**putForecasterCredentials**](DefaultApi.md#putforecastercredentials) | **PUT** /forecaster/credentials | Verify vCenter credentials and permissions |
|
|
35
41
|
| [**putInspectorVddk**](DefaultApi.md#putinspectorvddk) | **PUT** /inspector/vddk | Upload VDDK tarball |
|
|
36
42
|
| [**removeVMFromInspection**](DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspection | Remove VirtualMachine from inspection queue |
|
|
@@ -117,6 +123,66 @@ No authorization required
|
|
|
117
123
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
118
124
|
|
|
119
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
|
+
|
|
120
186
|
## deleteForecasterRun
|
|
121
187
|
|
|
122
188
|
> deleteForecasterRun(id)
|
|
@@ -376,6 +442,132 @@ No authorization required
|
|
|
376
442
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
377
443
|
|
|
378
444
|
|
|
445
|
+
## getApplications
|
|
446
|
+
|
|
447
|
+
> ApplicationListResponse getApplications()
|
|
448
|
+
|
|
449
|
+
List detected applications running on VMs
|
|
450
|
+
|
|
451
|
+
### Example
|
|
452
|
+
|
|
453
|
+
```ts
|
|
454
|
+
import {
|
|
455
|
+
Configuration,
|
|
456
|
+
DefaultApi,
|
|
457
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
458
|
+
import type { GetApplicationsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
459
|
+
|
|
460
|
+
async function example() {
|
|
461
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
462
|
+
const api = new DefaultApi();
|
|
463
|
+
|
|
464
|
+
try {
|
|
465
|
+
const data = await api.getApplications();
|
|
466
|
+
console.log(data);
|
|
467
|
+
} catch (error) {
|
|
468
|
+
console.error(error);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Run the test
|
|
473
|
+
example().catch(console.error);
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Parameters
|
|
477
|
+
|
|
478
|
+
This endpoint does not need any parameter.
|
|
479
|
+
|
|
480
|
+
### Return type
|
|
481
|
+
|
|
482
|
+
[**ApplicationListResponse**](ApplicationListResponse.md)
|
|
483
|
+
|
|
484
|
+
### Authorization
|
|
485
|
+
|
|
486
|
+
No authorization required
|
|
487
|
+
|
|
488
|
+
### HTTP request headers
|
|
489
|
+
|
|
490
|
+
- **Content-Type**: Not defined
|
|
491
|
+
- **Accept**: `application/json`
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
### HTTP response details
|
|
495
|
+
| Status code | Description | Response headers |
|
|
496
|
+
|-------------|-------------|------------------|
|
|
497
|
+
| **200** | List of applications with matching VMs | - |
|
|
498
|
+
| **500** | Internal server error | - |
|
|
499
|
+
|
|
500
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
## getClusterUtilization
|
|
504
|
+
|
|
505
|
+
> RightsizingClusterResponse getClusterUtilization(clusterId)
|
|
506
|
+
|
|
507
|
+
Get latest cluster utilization by cluster ID
|
|
508
|
+
|
|
509
|
+
### Example
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
import {
|
|
513
|
+
Configuration,
|
|
514
|
+
DefaultApi,
|
|
515
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
516
|
+
import type { GetClusterUtilizationRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
517
|
+
|
|
518
|
+
async function example() {
|
|
519
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
520
|
+
const api = new DefaultApi();
|
|
521
|
+
|
|
522
|
+
const body = {
|
|
523
|
+
// string | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\")
|
|
524
|
+
clusterId: clusterId_example,
|
|
525
|
+
} satisfies GetClusterUtilizationRequest;
|
|
526
|
+
|
|
527
|
+
try {
|
|
528
|
+
const data = await api.getClusterUtilization(body);
|
|
529
|
+
console.log(data);
|
|
530
|
+
} catch (error) {
|
|
531
|
+
console.error(error);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// Run the test
|
|
536
|
+
example().catch(console.error);
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Parameters
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
| Name | Type | Description | Notes |
|
|
543
|
+
|------------- | ------------- | ------------- | -------------|
|
|
544
|
+
| **clusterId** | `string` | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\") | [Defaults to `undefined`] |
|
|
545
|
+
|
|
546
|
+
### Return type
|
|
547
|
+
|
|
548
|
+
[**RightsizingClusterResponse**](RightsizingClusterResponse.md)
|
|
549
|
+
|
|
550
|
+
### Authorization
|
|
551
|
+
|
|
552
|
+
No authorization required
|
|
553
|
+
|
|
554
|
+
### HTTP request headers
|
|
555
|
+
|
|
556
|
+
- **Content-Type**: Not defined
|
|
557
|
+
- **Accept**: `application/json`
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
### HTTP response details
|
|
561
|
+
| Status code | Description | Response headers |
|
|
562
|
+
|-------------|-------------|------------------|
|
|
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 | - |
|
|
566
|
+
| **500** | Internal server error | - |
|
|
567
|
+
|
|
568
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
569
|
+
|
|
570
|
+
|
|
379
571
|
## getCollectorStatus
|
|
380
572
|
|
|
381
573
|
> CollectorStatus getCollectorStatus()
|
|
@@ -434,6 +626,67 @@ No authorization required
|
|
|
434
626
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
435
627
|
|
|
436
628
|
|
|
629
|
+
## getCredentials
|
|
630
|
+
|
|
631
|
+
> CredentialStatus getCredentials()
|
|
632
|
+
|
|
633
|
+
Get stored credential status
|
|
634
|
+
|
|
635
|
+
Returns stored credential metadata (URL only). Never exposes username or password. This endpoint does not revalidate credentials against vSphere.
|
|
636
|
+
|
|
637
|
+
### Example
|
|
638
|
+
|
|
639
|
+
```ts
|
|
640
|
+
import {
|
|
641
|
+
Configuration,
|
|
642
|
+
DefaultApi,
|
|
643
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
644
|
+
import type { GetCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
645
|
+
|
|
646
|
+
async function example() {
|
|
647
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
648
|
+
const api = new DefaultApi();
|
|
649
|
+
|
|
650
|
+
try {
|
|
651
|
+
const data = await api.getCredentials();
|
|
652
|
+
console.log(data);
|
|
653
|
+
} catch (error) {
|
|
654
|
+
console.error(error);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
// Run the test
|
|
659
|
+
example().catch(console.error);
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
### Parameters
|
|
663
|
+
|
|
664
|
+
This endpoint does not need any parameter.
|
|
665
|
+
|
|
666
|
+
### Return type
|
|
667
|
+
|
|
668
|
+
[**CredentialStatus**](CredentialStatus.md)
|
|
669
|
+
|
|
670
|
+
### Authorization
|
|
671
|
+
|
|
672
|
+
No authorization required
|
|
673
|
+
|
|
674
|
+
### HTTP request headers
|
|
675
|
+
|
|
676
|
+
- **Content-Type**: Not defined
|
|
677
|
+
- **Accept**: `application/json`
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
### HTTP response details
|
|
681
|
+
| Status code | Description | Response headers |
|
|
682
|
+
|-------------|-------------|------------------|
|
|
683
|
+
| **200** | Credential status | - |
|
|
684
|
+
| **404** | No credentials stored | - |
|
|
685
|
+
| **500** | Internal server error | - |
|
|
686
|
+
|
|
687
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
688
|
+
|
|
689
|
+
|
|
437
690
|
## getForecasterDatastores
|
|
438
691
|
|
|
439
692
|
> Array<DatastoreDetail> getForecasterDatastores(forecasterDatastoresRequest)
|
|
@@ -720,7 +973,7 @@ async function example() {
|
|
|
720
973
|
const body = {
|
|
721
974
|
// string | Group ID
|
|
722
975
|
id: id_example,
|
|
723
|
-
// 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)
|
|
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)
|
|
724
977
|
sort: ["cluster:asc","name:desc"],
|
|
725
978
|
// number | Page number for pagination (optional)
|
|
726
979
|
page: 56,
|
|
@@ -746,7 +999,7 @@ example().catch(console.error);
|
|
|
746
999
|
| Name | Type | Description | Notes |
|
|
747
1000
|
|------------- | ------------- | ------------- | -------------|
|
|
748
1001
|
| **id** | `string` | Group ID | [Defaults to `undefined`] |
|
|
749
|
-
| **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] |
|
|
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] |
|
|
750
1003
|
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
751
1004
|
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
752
1005
|
|
|
@@ -1457,7 +1710,7 @@ async function example() {
|
|
|
1457
1710
|
const body = {
|
|
1458
1711
|
// string | Filter by expression (matches VMs with the provided expression) (optional)
|
|
1459
1712
|
byExpression: exp1,
|
|
1460
|
-
// Array<string> | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. (optional)
|
|
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)
|
|
1461
1714
|
sort: ["cluster:asc","name:desc"],
|
|
1462
1715
|
// number | Page number for pagination (optional)
|
|
1463
1716
|
page: 56,
|
|
@@ -1483,7 +1736,7 @@ example().catch(console.error);
|
|
|
1483
1736
|
| Name | Type | Description | Notes |
|
|
1484
1737
|
|------------- | ------------- | ------------- | -------------|
|
|
1485
1738
|
| **byExpression** | `string` | Filter by expression (matches VMs with the provided expression) | [Optional] [Defaults to `undefined`] |
|
|
1486
|
-
| **sort** | `Array<string>` | Sort fields with direction (e.g., \"name:asc\" or \"cluster:desc,name:asc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues. | [Optional] |
|
|
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] |
|
|
1487
1740
|
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
1488
1741
|
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `undefined`] |
|
|
1489
1742
|
|
|
@@ -1511,6 +1764,64 @@ No authorization required
|
|
|
1511
1764
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1512
1765
|
|
|
1513
1766
|
|
|
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
|
+
|
|
1514
1825
|
## getVersion
|
|
1515
1826
|
|
|
1516
1827
|
> VersionInfo getVersion()
|
|
@@ -1838,6 +2149,76 @@ No authorization required
|
|
|
1838
2149
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1839
2150
|
|
|
1840
2151
|
|
|
2152
|
+
## putCredentials
|
|
2153
|
+
|
|
2154
|
+
> CredentialStatus putCredentials(vcenterCredentials)
|
|
2155
|
+
|
|
2156
|
+
Store vCenter credentials
|
|
2157
|
+
|
|
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.
|
|
2159
|
+
|
|
2160
|
+
### Example
|
|
2161
|
+
|
|
2162
|
+
```ts
|
|
2163
|
+
import {
|
|
2164
|
+
Configuration,
|
|
2165
|
+
DefaultApi,
|
|
2166
|
+
} from '@openshift-migration-advisor/agent-sdk';
|
|
2167
|
+
import type { PutCredentialsRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
2168
|
+
|
|
2169
|
+
async function example() {
|
|
2170
|
+
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
2171
|
+
const api = new DefaultApi();
|
|
2172
|
+
|
|
2173
|
+
const body = {
|
|
2174
|
+
// VcenterCredentials
|
|
2175
|
+
vcenterCredentials: ...,
|
|
2176
|
+
} satisfies PutCredentialsRequest;
|
|
2177
|
+
|
|
2178
|
+
try {
|
|
2179
|
+
const data = await api.putCredentials(body);
|
|
2180
|
+
console.log(data);
|
|
2181
|
+
} catch (error) {
|
|
2182
|
+
console.error(error);
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
// Run the test
|
|
2187
|
+
example().catch(console.error);
|
|
2188
|
+
```
|
|
2189
|
+
|
|
2190
|
+
### Parameters
|
|
2191
|
+
|
|
2192
|
+
|
|
2193
|
+
| Name | Type | Description | Notes |
|
|
2194
|
+
|------------- | ------------- | ------------- | -------------|
|
|
2195
|
+
| **vcenterCredentials** | [VcenterCredentials](VcenterCredentials.md) | | |
|
|
2196
|
+
|
|
2197
|
+
### Return type
|
|
2198
|
+
|
|
2199
|
+
[**CredentialStatus**](CredentialStatus.md)
|
|
2200
|
+
|
|
2201
|
+
### Authorization
|
|
2202
|
+
|
|
2203
|
+
No authorization required
|
|
2204
|
+
|
|
2205
|
+
### HTTP request headers
|
|
2206
|
+
|
|
2207
|
+
- **Content-Type**: `application/json`
|
|
2208
|
+
- **Accept**: `application/json`
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
### HTTP response details
|
|
2212
|
+
| Status code | Description | Response headers |
|
|
2213
|
+
|-------------|-------------|------------------|
|
|
2214
|
+
| **201** | Credentials created and stored | - |
|
|
2215
|
+
| **200** | Credentials validated and stored | - |
|
|
2216
|
+
| **400** | Invalid credentials or unreachable vCenter | - |
|
|
2217
|
+
| **500** | Internal server error | - |
|
|
2218
|
+
|
|
2219
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2220
|
+
|
|
2221
|
+
|
|
1841
2222
|
## putForecasterCredentials
|
|
1842
2223
|
|
|
1843
2224
|
> putForecasterCredentials(vcenterCredentials)
|
package/docs/Group.md
CHANGED
|
@@ -10,7 +10,6 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`description` | string
|
|
12
12
|
`filter` | string
|
|
13
|
-
`tags` | Array<string>
|
|
14
13
|
`createdAt` | Date
|
|
15
14
|
`updatedAt` | Date
|
|
16
15
|
|
|
@@ -25,7 +24,6 @@ const example = {
|
|
|
25
24
|
"name": null,
|
|
26
25
|
"description": null,
|
|
27
26
|
"filter": memory >= 8GB and cluster = 'prod',
|
|
28
|
-
"tags": ["production","critical"],
|
|
29
27
|
"createdAt": null,
|
|
30
28
|
"updatedAt": null,
|
|
31
29
|
} satisfies Group
|
package/docs/GroupResponse.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`group` | [Group](Group.md)
|
|
10
|
+
`inventory` | [Inventory](Inventory.md)
|
|
10
11
|
`vms` | [Array<VirtualMachine>](VirtualMachine.md)
|
|
11
12
|
`total` | number
|
|
12
13
|
`page` | number
|
|
@@ -20,6 +21,7 @@ import type { GroupResponse } from '@openshift-migration-advisor/agent-sdk'
|
|
|
20
21
|
// TODO: Update the object below with actual values
|
|
21
22
|
const example = {
|
|
22
23
|
"group": null,
|
|
24
|
+
"inventory": null,
|
|
23
25
|
"vms": null,
|
|
24
26
|
"total": null,
|
|
25
27
|
"page": null,
|
package/docs/InventoryData.md
CHANGED
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`vcenter` | [VCenter](VCenter.md)
|
|
10
10
|
`clusterFeatures` | [ClusterFeatures](ClusterFeatures.md)
|
|
11
|
+
`clusterUtilization` | [ClusterUtilization](ClusterUtilization.md)
|
|
11
12
|
`vms` | [VMs](VMs.md)
|
|
12
13
|
`infra` | [Infra](Infra.md)
|
|
13
14
|
|
|
@@ -20,6 +21,7 @@ import type { InventoryData } from '@openshift-migration-advisor/agent-sdk'
|
|
|
20
21
|
const example = {
|
|
21
22
|
"vcenter": null,
|
|
22
23
|
"clusterFeatures": null,
|
|
24
|
+
"clusterUtilization": null,
|
|
23
25
|
"vms": null,
|
|
24
26
|
"infra": null,
|
|
25
27
|
} satisfies InventoryData
|
|
@@ -9,7 +9,6 @@ Name | Type
|
|
|
9
9
|
`name` | string
|
|
10
10
|
`description` | string
|
|
11
11
|
`filter` | string
|
|
12
|
-
`tags` | Array<string>
|
|
13
12
|
|
|
14
13
|
## Example
|
|
15
14
|
|
|
@@ -21,7 +20,6 @@ const example = {
|
|
|
21
20
|
"name": null,
|
|
22
21
|
"description": null,
|
|
23
22
|
"filter": null,
|
|
24
|
-
"tags": null,
|
|
25
23
|
} satisfies UpdateGroupRequest
|
|
26
24
|
|
|
27
25
|
console.log(example)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# VMFilterOptionsResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`clusters` | Array<string>
|
|
10
|
+
`datacenters` | Array<string>
|
|
11
|
+
`concernLabels` | Array<string>
|
|
12
|
+
`concernCategories` | Array<string>
|
|
13
|
+
`applications` | Array<string>
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { VMFilterOptionsResponse } from '@openshift-migration-advisor/agent-sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"clusters": null,
|
|
23
|
+
"datacenters": null,
|
|
24
|
+
"concernLabels": null,
|
|
25
|
+
"concernCategories": null,
|
|
26
|
+
"applications": null,
|
|
27
|
+
} satisfies VMFilterOptionsResponse
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as VMFilterOptionsResponse
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|
package/docs/VMNIC.md
CHANGED
|
@@ -9,6 +9,8 @@ Name | Type
|
|
|
9
9
|
`mac` | string
|
|
10
10
|
`network` | string
|
|
11
11
|
`index` | number
|
|
12
|
+
`ipv4Address` | string
|
|
13
|
+
`ipv6Address` | string
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -20,6 +22,8 @@ const example = {
|
|
|
20
22
|
"mac": null,
|
|
21
23
|
"network": null,
|
|
22
24
|
"index": null,
|
|
25
|
+
"ipv4Address": null,
|
|
26
|
+
"ipv6Address": null,
|
|
23
27
|
} satisfies VMNIC
|
|
24
28
|
|
|
25
29
|
console.log(example)
|
|
@@ -9,6 +9,8 @@ Name | Type
|
|
|
9
9
|
`url` | string
|
|
10
10
|
`username` | string
|
|
11
11
|
`password` | string
|
|
12
|
+
`cacert` | string
|
|
13
|
+
`skipTls` | boolean
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -20,6 +22,8 @@ const example = {
|
|
|
20
22
|
"url": null,
|
|
21
23
|
"username": null,
|
|
22
24
|
"password": null,
|
|
25
|
+
"cacert": null,
|
|
26
|
+
"skipTls": null,
|
|
23
27
|
} satisfies VcenterCredentials
|
|
24
28
|
|
|
25
29
|
console.log(example)
|
package/docs/VirtualMachine.md
CHANGED
|
@@ -19,10 +19,12 @@ Name | Type
|
|
|
19
19
|
`migrationExcluded` | boolean
|
|
20
20
|
`inspectionStatus` | [VmInspectionStatus](VmInspectionStatus.md)
|
|
21
21
|
`inspectionConcernCount` | number
|
|
22
|
-
`
|
|
22
|
+
`groups` | Array<string>
|
|
23
23
|
`labels` | Array<string>
|
|
24
24
|
`utilization_cpu_p95` | number
|
|
25
25
|
`utilization_mem_p95` | number
|
|
26
|
+
`utilization_cpu_max` | number
|
|
27
|
+
`utilization_mem_max` | number
|
|
26
28
|
`utilization_disk` | number
|
|
27
29
|
`utilization_confidence` | number
|
|
28
30
|
|
|
@@ -46,10 +48,12 @@ const example = {
|
|
|
46
48
|
"migrationExcluded": null,
|
|
47
49
|
"inspectionStatus": null,
|
|
48
50
|
"inspectionConcernCount": null,
|
|
49
|
-
"
|
|
51
|
+
"groups": null,
|
|
50
52
|
"labels": null,
|
|
51
53
|
"utilization_cpu_p95": null,
|
|
52
54
|
"utilization_mem_p95": null,
|
|
55
|
+
"utilization_cpu_max": null,
|
|
56
|
+
"utilization_mem_max": null,
|
|
53
57
|
"utilization_disk": null,
|
|
54
58
|
"utilization_confidence": null,
|
|
55
59
|
} satisfies VirtualMachine
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`state` | string
|
|
10
|
+
`message` | string
|
|
10
11
|
`error` | string
|
|
11
12
|
`results` | object
|
|
12
13
|
|
|
@@ -18,6 +19,7 @@ import type { VmInspectionStatus } from '@openshift-migration-advisor/agent-sdk'
|
|
|
18
19
|
// TODO: Update the object below with actual values
|
|
19
20
|
const example = {
|
|
20
21
|
"state": null,
|
|
22
|
+
"message": null,
|
|
21
23
|
"error": null,
|
|
22
24
|
"results": null,
|
|
23
25
|
} satisfies VmInspectionStatus
|
package/package.json
CHANGED