@openshift-migration-advisor/planner-sdk 0.28.0 → 0.29.0
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 +10 -0
- package/README.md +13 -2
- package/dist/apis/AssessmentApi.d.ts +162 -0
- package/dist/apis/AssessmentApi.js +168 -0
- package/dist/apis/JobApi.d.ts +86 -0
- package/dist/apis/JobApi.js +124 -0
- package/dist/esm/apis/AssessmentApi.d.ts +162 -0
- package/dist/esm/apis/AssessmentApi.js +168 -0
- package/dist/esm/apis/JobApi.d.ts +86 -0
- package/dist/esm/apis/JobApi.js +124 -0
- package/dist/esm/models/AssessmentV2.d.ts +36 -0
- package/dist/esm/models/AssessmentV2.js +49 -0
- package/dist/esm/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/esm/models/AssessmentV2Summary.js +99 -0
- package/dist/esm/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/esm/models/AssessmentVCenterV2.js +49 -0
- package/dist/esm/models/InventoryV2.d.ts +43 -0
- package/dist/esm/models/InventoryV2.js +53 -0
- package/dist/esm/models/SubResource.d.ts +30 -0
- package/dist/esm/models/SubResource.js +43 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/AssessmentV2.d.ts +36 -0
- package/dist/models/AssessmentV2.js +56 -0
- package/dist/models/AssessmentV2Summary.d.ts +97 -0
- package/dist/models/AssessmentV2Summary.js +107 -0
- package/dist/models/AssessmentVCenterV2.d.ts +36 -0
- package/dist/models/AssessmentVCenterV2.js +56 -0
- package/dist/models/InventoryV2.d.ts +43 -0
- package/dist/models/InventoryV2.js +60 -0
- package/dist/models/SubResource.d.ts +30 -0
- package/dist/models/SubResource.js +50 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AssessmentApi.md +287 -0
- package/docs/AssessmentV2.md +36 -0
- package/docs/AssessmentV2Summary.md +58 -0
- package/docs/AssessmentVCenterV2.md +36 -0
- package/docs/InventoryV2.md +40 -0
- package/docs/JobApi.md +150 -0
- package/docs/SubResource.md +34 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +341 -0
- package/src/apis/JobApi.ts +219 -0
- package/src/models/AssessmentV2.ts +86 -0
- package/src/models/AssessmentV2Summary.ts +173 -0
- package/src/models/AssessmentVCenterV2.ts +86 -0
- package/src/models/InventoryV2.ts +91 -0
- package/src/models/SubResource.ts +64 -0
- package/src/models/index.ts +5 -0
- package/src/runtime.ts +8 -8
package/dist/models/index.js
CHANGED
|
@@ -27,6 +27,9 @@ __exportStar(require("./AssessmentForm.js"), exports);
|
|
|
27
27
|
__exportStar(require("./AssessmentSharing.js"), exports);
|
|
28
28
|
__exportStar(require("./AssessmentSubsetInventory.js"), exports);
|
|
29
29
|
__exportStar(require("./AssessmentUpdate.js"), exports);
|
|
30
|
+
__exportStar(require("./AssessmentV2.js"), exports);
|
|
31
|
+
__exportStar(require("./AssessmentV2Summary.js"), exports);
|
|
32
|
+
__exportStar(require("./AssessmentVCenterV2.js"), exports);
|
|
30
33
|
__exportStar(require("./ClusterFeatures.js"), exports);
|
|
31
34
|
__exportStar(require("./ClusterRequirementsRequest.js"), exports);
|
|
32
35
|
__exportStar(require("./ClusterRequirementsResponse.js"), exports);
|
|
@@ -57,6 +60,7 @@ __exportStar(require("./Infra.js"), exports);
|
|
|
57
60
|
__exportStar(require("./Inventory.js"), exports);
|
|
58
61
|
__exportStar(require("./InventoryData.js"), exports);
|
|
59
62
|
__exportStar(require("./InventoryTotals.js"), exports);
|
|
63
|
+
__exportStar(require("./InventoryV2.js"), exports);
|
|
60
64
|
__exportStar(require("./Ipv4Config.js"), exports);
|
|
61
65
|
__exportStar(require("./IssuesBreakdown.js"), exports);
|
|
62
66
|
__exportStar(require("./Job.js"), exports);
|
|
@@ -99,6 +103,7 @@ __exportStar(require("./StandaloneClusterRequirementsRequest.js"), exports);
|
|
|
99
103
|
__exportStar(require("./StandaloneClusterRequirementsResponse.js"), exports);
|
|
100
104
|
__exportStar(require("./Status.js"), exports);
|
|
101
105
|
__exportStar(require("./StorageIoConfiguration.js"), exports);
|
|
106
|
+
__exportStar(require("./SubResource.js"), exports);
|
|
102
107
|
__exportStar(require("./UpdateInventory.js"), exports);
|
|
103
108
|
__exportStar(require("./VCenter.js"), exports);
|
|
104
109
|
__exportStar(require("./VMResourceBreakdown.js"), exports);
|
package/docs/AssessmentApi.md
CHANGED
|
@@ -13,7 +13,11 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
13
13
|
| [**getAssessment**](AssessmentApi.md#getassessment) | **GET** /api/v1/assessments/{id} | |
|
|
14
14
|
| [**getAssessmentClusterRequirementsStoredInput**](AssessmentApi.md#getassessmentclusterrequirementsstoredinput) | **GET** /api/v1/assessments/{id}/cluster-requirements/stored-input | |
|
|
15
15
|
| [**getAssessmentEnhancementData**](AssessmentApi.md#getassessmentenhancementdata) | **GET** /api/v1/assessments/{id}/enhancement-data | |
|
|
16
|
+
| [**getAssessmentV2**](AssessmentApi.md#getassessmentv2) | **GET** /api/v2/assessments/{id} | |
|
|
17
|
+
| [**getVcenter**](AssessmentApi.md#getvcenter) | **GET** /api/v2/assessments/{id}/vcenters/{vid} | |
|
|
18
|
+
| [**getVcenterCluster**](AssessmentApi.md#getvcentercluster) | **GET** /api/v2/assessments/{id}/vcenters/{vid}/clusters/{cid} | |
|
|
16
19
|
| [**listAssessments**](AssessmentApi.md#listassessments) | **GET** /api/v1/assessments | |
|
|
20
|
+
| [**listAssessmentsV2**](AssessmentApi.md#listassessmentsv2) | **GET** /api/v2/assessments | |
|
|
17
21
|
| [**saveAssessmentEnhancementData**](AssessmentApi.md#saveassessmentenhancementdata) | **POST** /api/v1/assessments/{id}/enhancement-data | |
|
|
18
22
|
| [**shareAssessment**](AssessmentApi.md#shareassessment) | **POST** /api/v1/assessments/{id}/share | |
|
|
19
23
|
| [**unshareAssessment**](AssessmentApi.md#unshareassessment) | **DELETE** /api/v1/assessments/{id}/share | |
|
|
@@ -682,6 +686,228 @@ No authorization required
|
|
|
682
686
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
683
687
|
|
|
684
688
|
|
|
689
|
+
## getAssessmentV2
|
|
690
|
+
|
|
691
|
+
> AssessmentV2 getAssessmentV2(id)
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
Get the specified assessment inventory
|
|
696
|
+
|
|
697
|
+
### Example
|
|
698
|
+
|
|
699
|
+
```ts
|
|
700
|
+
import {
|
|
701
|
+
Configuration,
|
|
702
|
+
AssessmentApi,
|
|
703
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
704
|
+
import type { GetAssessmentV2Request } from '@openshift-migration-advisor/planner-sdk';
|
|
705
|
+
|
|
706
|
+
async function example() {
|
|
707
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
708
|
+
const api = new AssessmentApi();
|
|
709
|
+
|
|
710
|
+
const body = {
|
|
711
|
+
// string | ID of the assessment
|
|
712
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
713
|
+
} satisfies GetAssessmentV2Request;
|
|
714
|
+
|
|
715
|
+
try {
|
|
716
|
+
const data = await api.getAssessmentV2(body);
|
|
717
|
+
console.log(data);
|
|
718
|
+
} catch (error) {
|
|
719
|
+
console.error(error);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// Run the test
|
|
724
|
+
example().catch(console.error);
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
### Parameters
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
| Name | Type | Description | Notes |
|
|
731
|
+
|------------- | ------------- | ------------- | -------------|
|
|
732
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
733
|
+
|
|
734
|
+
### Return type
|
|
735
|
+
|
|
736
|
+
[**AssessmentV2**](AssessmentV2.md)
|
|
737
|
+
|
|
738
|
+
### Authorization
|
|
739
|
+
|
|
740
|
+
No authorization required
|
|
741
|
+
|
|
742
|
+
### HTTP request headers
|
|
743
|
+
|
|
744
|
+
- **Content-Type**: Not defined
|
|
745
|
+
- **Accept**: `application/json`
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
### HTTP response details
|
|
749
|
+
| Status code | Description | Response headers |
|
|
750
|
+
|-------------|-------------|------------------|
|
|
751
|
+
| **200** | OK | - |
|
|
752
|
+
| **401** | Unauthorized | - |
|
|
753
|
+
| **403** | Forbidden | - |
|
|
754
|
+
| **404** | NotFound | - |
|
|
755
|
+
| **500** | Internal error | - |
|
|
756
|
+
|
|
757
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
## getVcenter
|
|
761
|
+
|
|
762
|
+
> AssessmentVCenterV2 getVcenter(id, vid)
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
Get the specified vcenter assessment inventory
|
|
767
|
+
|
|
768
|
+
### Example
|
|
769
|
+
|
|
770
|
+
```ts
|
|
771
|
+
import {
|
|
772
|
+
Configuration,
|
|
773
|
+
AssessmentApi,
|
|
774
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
775
|
+
import type { GetVcenterRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
776
|
+
|
|
777
|
+
async function example() {
|
|
778
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
779
|
+
const api = new AssessmentApi();
|
|
780
|
+
|
|
781
|
+
const body = {
|
|
782
|
+
// string | ID of the assessment
|
|
783
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
784
|
+
// string | ID of the vcenter
|
|
785
|
+
vid: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
786
|
+
} satisfies GetVcenterRequest;
|
|
787
|
+
|
|
788
|
+
try {
|
|
789
|
+
const data = await api.getVcenter(body);
|
|
790
|
+
console.log(data);
|
|
791
|
+
} catch (error) {
|
|
792
|
+
console.error(error);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// Run the test
|
|
797
|
+
example().catch(console.error);
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
### Parameters
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
| Name | Type | Description | Notes |
|
|
804
|
+
|------------- | ------------- | ------------- | -------------|
|
|
805
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
806
|
+
| **vid** | `string` | ID of the vcenter | [Defaults to `undefined`] |
|
|
807
|
+
|
|
808
|
+
### Return type
|
|
809
|
+
|
|
810
|
+
[**AssessmentVCenterV2**](AssessmentVCenterV2.md)
|
|
811
|
+
|
|
812
|
+
### Authorization
|
|
813
|
+
|
|
814
|
+
No authorization required
|
|
815
|
+
|
|
816
|
+
### HTTP request headers
|
|
817
|
+
|
|
818
|
+
- **Content-Type**: Not defined
|
|
819
|
+
- **Accept**: `application/json`
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
### HTTP response details
|
|
823
|
+
| Status code | Description | Response headers |
|
|
824
|
+
|-------------|-------------|------------------|
|
|
825
|
+
| **200** | OK | - |
|
|
826
|
+
| **401** | Unauthorized | - |
|
|
827
|
+
| **403** | Forbidden | - |
|
|
828
|
+
| **404** | NotFound | - |
|
|
829
|
+
| **500** | Internal error | - |
|
|
830
|
+
|
|
831
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
## getVcenterCluster
|
|
835
|
+
|
|
836
|
+
> InventoryData getVcenterCluster(id, vid, cid)
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
Get the specified cluster assessment inventory
|
|
841
|
+
|
|
842
|
+
### Example
|
|
843
|
+
|
|
844
|
+
```ts
|
|
845
|
+
import {
|
|
846
|
+
Configuration,
|
|
847
|
+
AssessmentApi,
|
|
848
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
849
|
+
import type { GetVcenterClusterRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
850
|
+
|
|
851
|
+
async function example() {
|
|
852
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
853
|
+
const api = new AssessmentApi();
|
|
854
|
+
|
|
855
|
+
const body = {
|
|
856
|
+
// string | ID of the assessment
|
|
857
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
858
|
+
// string | ID of the vcenter
|
|
859
|
+
vid: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
860
|
+
// string | ID of the cluster
|
|
861
|
+
cid: cid_example,
|
|
862
|
+
} satisfies GetVcenterClusterRequest;
|
|
863
|
+
|
|
864
|
+
try {
|
|
865
|
+
const data = await api.getVcenterCluster(body);
|
|
866
|
+
console.log(data);
|
|
867
|
+
} catch (error) {
|
|
868
|
+
console.error(error);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
// Run the test
|
|
873
|
+
example().catch(console.error);
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
### Parameters
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
| Name | Type | Description | Notes |
|
|
880
|
+
|------------- | ------------- | ------------- | -------------|
|
|
881
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
882
|
+
| **vid** | `string` | ID of the vcenter | [Defaults to `undefined`] |
|
|
883
|
+
| **cid** | `string` | ID of the cluster | [Defaults to `undefined`] |
|
|
884
|
+
|
|
885
|
+
### Return type
|
|
886
|
+
|
|
887
|
+
[**InventoryData**](InventoryData.md)
|
|
888
|
+
|
|
889
|
+
### Authorization
|
|
890
|
+
|
|
891
|
+
No authorization required
|
|
892
|
+
|
|
893
|
+
### HTTP request headers
|
|
894
|
+
|
|
895
|
+
- **Content-Type**: Not defined
|
|
896
|
+
- **Accept**: `application/json`
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
### HTTP response details
|
|
900
|
+
| Status code | Description | Response headers |
|
|
901
|
+
|-------------|-------------|------------------|
|
|
902
|
+
| **200** | OK | - |
|
|
903
|
+
| **401** | Unauthorized | - |
|
|
904
|
+
| **403** | Forbidden | - |
|
|
905
|
+
| **404** | NotFound | - |
|
|
906
|
+
| **500** | Internal error | - |
|
|
907
|
+
|
|
908
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
909
|
+
|
|
910
|
+
|
|
685
911
|
## listAssessments
|
|
686
912
|
|
|
687
913
|
> Array<Assessment> listAssessments()
|
|
@@ -743,6 +969,67 @@ No authorization required
|
|
|
743
969
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
744
970
|
|
|
745
971
|
|
|
972
|
+
## listAssessmentsV2
|
|
973
|
+
|
|
974
|
+
> Array<AssessmentV2Summary> listAssessmentsV2()
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
List assessments
|
|
979
|
+
|
|
980
|
+
### Example
|
|
981
|
+
|
|
982
|
+
```ts
|
|
983
|
+
import {
|
|
984
|
+
Configuration,
|
|
985
|
+
AssessmentApi,
|
|
986
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
987
|
+
import type { ListAssessmentsV2Request } from '@openshift-migration-advisor/planner-sdk';
|
|
988
|
+
|
|
989
|
+
async function example() {
|
|
990
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
991
|
+
const api = new AssessmentApi();
|
|
992
|
+
|
|
993
|
+
try {
|
|
994
|
+
const data = await api.listAssessmentsV2();
|
|
995
|
+
console.log(data);
|
|
996
|
+
} catch (error) {
|
|
997
|
+
console.error(error);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
// Run the test
|
|
1002
|
+
example().catch(console.error);
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
### Parameters
|
|
1006
|
+
|
|
1007
|
+
This endpoint does not need any parameter.
|
|
1008
|
+
|
|
1009
|
+
### Return type
|
|
1010
|
+
|
|
1011
|
+
[**Array<AssessmentV2Summary>**](AssessmentV2Summary.md)
|
|
1012
|
+
|
|
1013
|
+
### Authorization
|
|
1014
|
+
|
|
1015
|
+
No authorization required
|
|
1016
|
+
|
|
1017
|
+
### HTTP request headers
|
|
1018
|
+
|
|
1019
|
+
- **Content-Type**: Not defined
|
|
1020
|
+
- **Accept**: `application/json`
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
### HTTP response details
|
|
1024
|
+
| Status code | Description | Response headers |
|
|
1025
|
+
|-------------|-------------|------------------|
|
|
1026
|
+
| **200** | OK | - |
|
|
1027
|
+
| **401** | Unauthorized | - |
|
|
1028
|
+
| **500** | Internal error | - |
|
|
1029
|
+
|
|
1030
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1031
|
+
|
|
1032
|
+
|
|
746
1033
|
## saveAssessmentEnhancementData
|
|
747
1034
|
|
|
748
1035
|
> EnhancementData saveAssessmentEnhancementData(id, enhancementData)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# AssessmentV2
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [InventoryV2](InventoryV2.md)
|
|
10
|
+
`vcetners` | [Array<SubResource>](SubResource.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { AssessmentV2 } from '@openshift-migration-advisor/planner-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"data": null,
|
|
20
|
+
"vcetners": null,
|
|
21
|
+
} satisfies AssessmentV2
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as AssessmentV2
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
# AssessmentV2Summary
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
`ownerFirstName` | string
|
|
12
|
+
`ownerLastName` | string
|
|
13
|
+
`sourceType` | string
|
|
14
|
+
`datastoresCount` | number
|
|
15
|
+
`hostsCount` | number
|
|
16
|
+
`vmsCount` | number
|
|
17
|
+
`networksCount` | number
|
|
18
|
+
`sourceId` | string
|
|
19
|
+
`createdAt` | Date
|
|
20
|
+
`permissions` | Array<string>
|
|
21
|
+
`sharing` | [AssessmentSharing](AssessmentSharing.md)
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import type { AssessmentV2Summary } from '@openshift-migration-advisor/planner-sdk'
|
|
27
|
+
|
|
28
|
+
// TODO: Update the object below with actual values
|
|
29
|
+
const example = {
|
|
30
|
+
"id": null,
|
|
31
|
+
"name": null,
|
|
32
|
+
"ownerFirstName": null,
|
|
33
|
+
"ownerLastName": null,
|
|
34
|
+
"sourceType": null,
|
|
35
|
+
"datastoresCount": null,
|
|
36
|
+
"hostsCount": null,
|
|
37
|
+
"vmsCount": null,
|
|
38
|
+
"networksCount": null,
|
|
39
|
+
"sourceId": null,
|
|
40
|
+
"createdAt": null,
|
|
41
|
+
"permissions": null,
|
|
42
|
+
"sharing": null,
|
|
43
|
+
} satisfies AssessmentV2Summary
|
|
44
|
+
|
|
45
|
+
console.log(example)
|
|
46
|
+
|
|
47
|
+
// Convert the instance to a JSON string
|
|
48
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
49
|
+
console.log(exampleJSON)
|
|
50
|
+
|
|
51
|
+
// Parse the JSON string back to an object
|
|
52
|
+
const exampleParsed = JSON.parse(exampleJSON) as AssessmentV2Summary
|
|
53
|
+
console.log(exampleParsed)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
57
|
+
|
|
58
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# AssessmentVCenterV2
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`data` | [InventoryV2](InventoryV2.md)
|
|
10
|
+
`clusters` | [Array<SubResource>](SubResource.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { AssessmentVCenterV2 } from '@openshift-migration-advisor/planner-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"data": null,
|
|
20
|
+
"clusters": null,
|
|
21
|
+
} satisfies AssessmentVCenterV2
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as AssessmentVCenterV2
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# InventoryV2
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`data` | [InventoryData](InventoryData.md)
|
|
11
|
+
`vcenterVersion` | string
|
|
12
|
+
`createdAt` | Date
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { InventoryV2 } from '@openshift-migration-advisor/planner-sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"id": null,
|
|
22
|
+
"data": null,
|
|
23
|
+
"vcenterVersion": null,
|
|
24
|
+
"createdAt": null,
|
|
25
|
+
} satisfies InventoryV2
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as InventoryV2
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
package/docs/JobApi.md
CHANGED
|
@@ -6,7 +6,9 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**cancelJob**](JobApi.md#canceljob) | **DELETE** /api/v1/assessments/jobs/{id} | |
|
|
8
8
|
| [**createRVToolsAssessment**](JobApi.md#creatervtoolsassessment) | **POST** /api/v1/assessments/rvtools | |
|
|
9
|
+
| [**createRVToolsAssessmentV2**](JobApi.md#creatervtoolsassessmentv2) | **POST** /api/v2/assessments/rvtools | |
|
|
9
10
|
| [**getJob**](JobApi.md#getjob) | **GET** /api/v1/assessments/jobs/{id} | |
|
|
11
|
+
| [**uploadRvtoolsToAssessment**](JobApi.md#uploadrvtoolstoassessment) | **PUT** /api/v2/assessments/{id}/rvtools | |
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
@@ -156,6 +158,81 @@ No authorization required
|
|
|
156
158
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
157
159
|
|
|
158
160
|
|
|
161
|
+
## createRVToolsAssessmentV2
|
|
162
|
+
|
|
163
|
+
> Job createRVToolsAssessmentV2(name, file)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Create an assessment from RVTools file asynchronously
|
|
168
|
+
|
|
169
|
+
### Example
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import {
|
|
173
|
+
Configuration,
|
|
174
|
+
JobApi,
|
|
175
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
176
|
+
import type { CreateRVToolsAssessmentV2Request } from '@openshift-migration-advisor/planner-sdk';
|
|
177
|
+
|
|
178
|
+
async function example() {
|
|
179
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
180
|
+
const api = new JobApi();
|
|
181
|
+
|
|
182
|
+
const body = {
|
|
183
|
+
// string | Name of the assessment
|
|
184
|
+
name: name_example,
|
|
185
|
+
// Blob | File upload for assessment data
|
|
186
|
+
file: BINARY_DATA_HERE,
|
|
187
|
+
} satisfies CreateRVToolsAssessmentV2Request;
|
|
188
|
+
|
|
189
|
+
try {
|
|
190
|
+
const data = await api.createRVToolsAssessmentV2(body);
|
|
191
|
+
console.log(data);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(error);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Run the test
|
|
198
|
+
example().catch(console.error);
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
| Name | Type | Description | Notes |
|
|
205
|
+
|------------- | ------------- | ------------- | -------------|
|
|
206
|
+
| **name** | `string` | Name of the assessment | [Defaults to `undefined`] |
|
|
207
|
+
| **file** | `Blob` | File upload for assessment data | [Defaults to `undefined`] |
|
|
208
|
+
|
|
209
|
+
### Return type
|
|
210
|
+
|
|
211
|
+
[**Job**](Job.md)
|
|
212
|
+
|
|
213
|
+
### Authorization
|
|
214
|
+
|
|
215
|
+
No authorization required
|
|
216
|
+
|
|
217
|
+
### HTTP request headers
|
|
218
|
+
|
|
219
|
+
- **Content-Type**: `multipart/form-data`
|
|
220
|
+
- **Accept**: `application/json`
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### HTTP response details
|
|
224
|
+
| Status code | Description | Response headers |
|
|
225
|
+
|-------------|-------------|------------------|
|
|
226
|
+
| **202** | Accepted - Job created | - |
|
|
227
|
+
| **400** | Bad Request | - |
|
|
228
|
+
| **401** | Unauthorized | - |
|
|
229
|
+
| **403** | Forbidden | - |
|
|
230
|
+
| **404** | NotFound | - |
|
|
231
|
+
| **500** | Internal error | - |
|
|
232
|
+
|
|
233
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
234
|
+
|
|
235
|
+
|
|
159
236
|
## getJob
|
|
160
237
|
|
|
161
238
|
> Job getJob(id)
|
|
@@ -227,3 +304,76 @@ No authorization required
|
|
|
227
304
|
|
|
228
305
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
229
306
|
|
|
307
|
+
|
|
308
|
+
## uploadRvtoolsToAssessment
|
|
309
|
+
|
|
310
|
+
> Job uploadRvtoolsToAssessment(id, file)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
Uploads additional RVTools data to an existing assessment and aggregates it into the main inventory asynchronously.
|
|
315
|
+
|
|
316
|
+
### Example
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
import {
|
|
320
|
+
Configuration,
|
|
321
|
+
JobApi,
|
|
322
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
323
|
+
import type { UploadRvtoolsToAssessmentRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
324
|
+
|
|
325
|
+
async function example() {
|
|
326
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
327
|
+
const api = new JobApi();
|
|
328
|
+
|
|
329
|
+
const body = {
|
|
330
|
+
// string | ID of the assessment
|
|
331
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
332
|
+
// Blob | Rvtools extending the exising assessment
|
|
333
|
+
file: BINARY_DATA_HERE,
|
|
334
|
+
} satisfies UploadRvtoolsToAssessmentRequest;
|
|
335
|
+
|
|
336
|
+
try {
|
|
337
|
+
const data = await api.uploadRvtoolsToAssessment(body);
|
|
338
|
+
console.log(data);
|
|
339
|
+
} catch (error) {
|
|
340
|
+
console.error(error);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Run the test
|
|
345
|
+
example().catch(console.error);
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Parameters
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
| Name | Type | Description | Notes |
|
|
352
|
+
|------------- | ------------- | ------------- | -------------|
|
|
353
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
354
|
+
| **file** | `Blob` | Rvtools extending the exising assessment | [Defaults to `undefined`] |
|
|
355
|
+
|
|
356
|
+
### Return type
|
|
357
|
+
|
|
358
|
+
[**Job**](Job.md)
|
|
359
|
+
|
|
360
|
+
### Authorization
|
|
361
|
+
|
|
362
|
+
No authorization required
|
|
363
|
+
|
|
364
|
+
### HTTP request headers
|
|
365
|
+
|
|
366
|
+
- **Content-Type**: `multipart/form-data`
|
|
367
|
+
- **Accept**: `application/json`
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
### HTTP response details
|
|
371
|
+
| Status code | Description | Response headers |
|
|
372
|
+
|-------------|-------------|------------------|
|
|
373
|
+
| **202** | Accepted - Job created | - |
|
|
374
|
+
| **400** | Bad Request | - |
|
|
375
|
+
| **401** | Unauthorized | - |
|
|
376
|
+
| **500** | Internal error | - |
|
|
377
|
+
|
|
378
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
379
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# SubResource
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { SubResource } from '@openshift-migration-advisor/planner-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"id": null,
|
|
19
|
+
} satisfies SubResource
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as SubResource
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|