@openshift-migration-advisor/planner-sdk 0.27.0 → 0.28.0-2a5826fe0340
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 +14 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +17 -3
- package/dist/apis/AssessmentApi.d.ts +205 -0
- package/dist/apis/AssessmentApi.js +210 -0
- package/dist/apis/JobApi.d.ts +86 -0
- package/dist/apis/JobApi.js +124 -0
- package/dist/esm/apis/AssessmentApi.d.ts +205 -0
- package/dist/esm/apis/AssessmentApi.js +210 -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/Datastore.d.ts +18 -2
- package/dist/esm/models/Datastore.js +8 -0
- package/dist/esm/models/Host.d.ts +10 -0
- package/dist/esm/models/Host.js +6 -0
- package/dist/esm/models/HostStorageAdapter.d.ts +58 -0
- package/dist/esm/models/HostStorageAdapter.js +55 -0
- package/dist/esm/models/HostStorageLun.d.ts +50 -0
- package/dist/esm/models/HostStorageLun.js +51 -0
- package/dist/esm/models/Inventory.d.ts +5 -1
- package/dist/esm/models/Inventory.js +2 -0
- package/dist/esm/models/InventoryV2.d.ts +47 -0
- package/dist/esm/models/InventoryV2.js +55 -0
- package/dist/esm/models/OsInfo.d.ts +12 -0
- package/dist/esm/models/OsInfo.js +9 -0
- package/dist/esm/models/SubResource.d.ts +30 -0
- package/dist/esm/models/SubResource.js +43 -0
- package/dist/esm/models/VsphereCoreInput.d.ts +8 -0
- package/dist/esm/models/VsphereCoreInput.js +4 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -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/Datastore.d.ts +18 -2
- package/dist/models/Datastore.js +8 -0
- package/dist/models/Host.d.ts +10 -0
- package/dist/models/Host.js +6 -0
- package/dist/models/HostStorageAdapter.d.ts +58 -0
- package/dist/models/HostStorageAdapter.js +62 -0
- package/dist/models/HostStorageLun.d.ts +50 -0
- package/dist/models/HostStorageLun.js +58 -0
- package/dist/models/Inventory.d.ts +5 -1
- package/dist/models/Inventory.js +2 -0
- package/dist/models/InventoryV2.d.ts +47 -0
- package/dist/models/InventoryV2.js +62 -0
- package/dist/models/OsInfo.d.ts +12 -0
- package/dist/models/OsInfo.js +10 -1
- package/dist/models/SubResource.d.ts +30 -0
- package/dist/models/SubResource.js +50 -0
- package/dist/models/VsphereCoreInput.d.ts +8 -0
- package/dist/models/VsphereCoreInput.js +4 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/docs/AssessmentApi.md +362 -0
- package/docs/AssessmentV2.md +36 -0
- package/docs/AssessmentV2Summary.md +58 -0
- package/docs/AssessmentVCenterV2.md +36 -0
- package/docs/Datastore.md +8 -0
- package/docs/Host.md +4 -0
- package/docs/HostStorageAdapter.md +49 -0
- package/docs/HostStorageLun.md +45 -0
- package/docs/Inventory.md +2 -0
- package/docs/InventoryV2.md +42 -0
- package/docs/JobApi.md +152 -0
- package/docs/OsInfo.md +2 -0
- package/docs/SubResource.md +34 -0
- package/docs/VsphereCoreInput.md +4 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +428 -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/Datastore.ts +26 -2
- package/src/models/Host.ts +27 -0
- package/src/models/HostStorageAdapter.ts +105 -0
- package/src/models/HostStorageLun.ts +93 -0
- package/src/models/Inventory.ts +7 -1
- package/src/models/InventoryV2.ts +97 -0
- package/src/models/OsInfo.ts +15 -0
- package/src/models/SubResource.ts +64 -0
- package/src/models/VsphereCoreInput.ts +12 -0
- package/src/models/index.ts +7 -0
- package/src/runtime.ts +8 -8
package/docs/Inventory.md
CHANGED
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`clusters` | [{ [key: string]: InventoryData; }](InventoryData.md)
|
|
12
12
|
`vcenter` | [InventoryData](InventoryData.md)
|
|
13
13
|
`createdAt` | Date
|
|
14
|
+
`collectionTime` | Date
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"clusters": null,
|
|
25
26
|
"vcenter": null,
|
|
26
27
|
"createdAt": null,
|
|
28
|
+
"collectionTime": null,
|
|
27
29
|
} satisfies Inventory
|
|
28
30
|
|
|
29
31
|
console.log(example)
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
`collectionTime` | Date
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { InventoryV2 } from '@openshift-migration-advisor/planner-sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"id": null,
|
|
23
|
+
"data": null,
|
|
24
|
+
"vcenterVersion": null,
|
|
25
|
+
"createdAt": null,
|
|
26
|
+
"collectionTime": null,
|
|
27
|
+
} satisfies InventoryV2
|
|
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 InventoryV2
|
|
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/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,78 @@ 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
|
+
| **403** | Unauthorized | - |
|
|
377
|
+
| **404** | Not found | - |
|
|
378
|
+
| **500** | Internal error | - |
|
|
379
|
+
|
|
380
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
381
|
+
|
package/docs/OsInfo.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`count` | number
|
|
10
10
|
`supported` | boolean
|
|
11
11
|
`supportTier` | string
|
|
12
|
+
`mtvStatus` | string
|
|
12
13
|
`upgradeRecommendation` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
@@ -21,6 +22,7 @@ const example = {
|
|
|
21
22
|
"count": null,
|
|
22
23
|
"supported": null,
|
|
23
24
|
"supportTier": null,
|
|
25
|
+
"mtvStatus": null,
|
|
24
26
|
"upgradeRecommendation": null,
|
|
25
27
|
} satisfies OsInfo
|
|
26
28
|
|
|
@@ -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
|
+
|
package/docs/VsphereCoreInput.md
CHANGED
|
@@ -9,6 +9,8 @@ Name | Type
|
|
|
9
9
|
`vmEncryptionEnabled` | boolean
|
|
10
10
|
`vmEncryptionPolicy` | string
|
|
11
11
|
`srmEnabled` | boolean
|
|
12
|
+
`niocEnabled` | boolean
|
|
13
|
+
`niocDetails` | string
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -20,6 +22,8 @@ const example = {
|
|
|
20
22
|
"vmEncryptionEnabled": null,
|
|
21
23
|
"vmEncryptionPolicy": null,
|
|
22
24
|
"srmEnabled": null,
|
|
25
|
+
"niocEnabled": null,
|
|
26
|
+
"niocDetails": null,
|
|
23
27
|
} satisfies VsphereCoreInput
|
|
24
28
|
|
|
25
29
|
console.log(example)
|
package/package.json
CHANGED