@openshift-migration-advisor/planner-sdk 0.13.3-d6f3e1a2716b → 0.13.4
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/README.md +8 -2
- package/dist/apis/SizingApi.d.ts +61 -0
- package/dist/apis/SizingApi.js +74 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/SizingApi.d.ts +61 -0
- package/dist/esm/apis/SizingApi.js +70 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ClusterRequirementsRequest.d.ts +6 -23
- package/dist/esm/models/ClusterRequirementsRequest.js +6 -21
- package/dist/esm/models/ClusterUtilization.d.ts +68 -0
- package/dist/esm/models/ClusterUtilization.js +67 -0
- package/dist/esm/models/CpuOverCommitRatio.d.ts +27 -0
- package/dist/esm/models/CpuOverCommitRatio.js +45 -0
- package/dist/esm/models/InventoryData.d.ts +7 -0
- package/dist/esm/models/InventoryData.js +3 -0
- package/dist/esm/models/MemoryOverCommitRatio.d.ts +26 -0
- package/dist/esm/models/MemoryOverCommitRatio.js +44 -0
- package/dist/esm/models/StandaloneClusterRequirementsRequest.d.ts +114 -0
- package/dist/esm/models/StandaloneClusterRequirementsRequest.js +88 -0
- package/dist/esm/models/StandaloneClusterRequirementsResponse.d.ts +40 -0
- package/dist/esm/models/StandaloneClusterRequirementsResponse.js +49 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/ClusterRequirementsRequest.d.ts +6 -23
- package/dist/models/ClusterRequirementsRequest.js +7 -22
- package/dist/models/ClusterUtilization.d.ts +68 -0
- package/dist/models/ClusterUtilization.js +74 -0
- package/dist/models/CpuOverCommitRatio.d.ts +27 -0
- package/dist/models/CpuOverCommitRatio.js +53 -0
- package/dist/models/InventoryData.d.ts +7 -0
- package/dist/models/InventoryData.js +3 -0
- package/dist/models/MemoryOverCommitRatio.d.ts +26 -0
- package/dist/models/MemoryOverCommitRatio.js +52 -0
- package/dist/models/StandaloneClusterRequirementsRequest.d.ts +114 -0
- package/dist/models/StandaloneClusterRequirementsRequest.js +96 -0
- package/dist/models/StandaloneClusterRequirementsResponse.d.ts +40 -0
- package/dist/models/StandaloneClusterRequirementsResponse.js +56 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AccountApi.md +9 -0
- package/docs/ClusterRequirementsRequest.md +2 -2
- package/docs/ClusterUtilization.md +46 -0
- package/docs/CpuOverCommitRatio.md +33 -0
- package/docs/InventoryData.md +2 -0
- package/docs/MemoryOverCommitRatio.md +33 -0
- package/docs/SizingApi.md +80 -0
- package/docs/StandaloneClusterRequirementsRequest.md +59 -0
- package/docs/StandaloneClusterRequirementsResponse.md +37 -0
- package/package.json +1 -1
- package/src/apis/SizingApi.ts +114 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ClusterRequirementsRequest.ts +23 -29
- package/src/models/ClusterUtilization.ts +120 -0
- package/src/models/CpuOverCommitRatio.ts +55 -0
- package/src/models/InventoryData.ts +15 -0
- package/src/models/MemoryOverCommitRatio.ts +54 -0
- package/src/models/StandaloneClusterRequirementsRequest.ts +194 -0
- package/src/models/StandaloneClusterRequirementsResponse.ts +90 -0
- package/src/models/index.ts +5 -0
package/dist/models/index.d.ts
CHANGED
|
@@ -9,9 +9,11 @@ export * from './ClusterRequirementsRequest.js';
|
|
|
9
9
|
export * from './ClusterRequirementsResponse.js';
|
|
10
10
|
export * from './ClusterRequirementsStoredInput.js';
|
|
11
11
|
export * from './ClusterSizing.js';
|
|
12
|
+
export * from './ClusterUtilization.js';
|
|
12
13
|
export * from './ComplexityDiskScoreEntry.js';
|
|
13
14
|
export * from './ComplexityOSNameEntry.js';
|
|
14
15
|
export * from './ComplexityOSScoreEntry.js';
|
|
16
|
+
export * from './CpuOverCommitRatio.js';
|
|
15
17
|
export * from './Customer.js';
|
|
16
18
|
export * from './Datastore.js';
|
|
17
19
|
export * from './DiskSizeTierSummary.js';
|
|
@@ -36,6 +38,7 @@ export * from './Label.js';
|
|
|
36
38
|
export * from './Member.js';
|
|
37
39
|
export * from './MemberCreate.js';
|
|
38
40
|
export * from './MemberUpdate.js';
|
|
41
|
+
export * from './MemoryOverCommitRatio.js';
|
|
39
42
|
export * from './MigrationComplexityRequest.js';
|
|
40
43
|
export * from './MigrationComplexityResponse.js';
|
|
41
44
|
export * from './MigrationEstimationByComplexityResponse.js';
|
|
@@ -62,6 +65,8 @@ export * from './Source.js';
|
|
|
62
65
|
export * from './SourceCreate.js';
|
|
63
66
|
export * from './SourceInfra.js';
|
|
64
67
|
export * from './SourceUpdate.js';
|
|
68
|
+
export * from './StandaloneClusterRequirementsRequest.js';
|
|
69
|
+
export * from './StandaloneClusterRequirementsResponse.js';
|
|
65
70
|
export * from './Status.js';
|
|
66
71
|
export * from './UpdateInventory.js';
|
|
67
72
|
export * from './VCenter.js';
|
package/dist/models/index.js
CHANGED
|
@@ -27,9 +27,11 @@ __exportStar(require("./ClusterRequirementsRequest.js"), exports);
|
|
|
27
27
|
__exportStar(require("./ClusterRequirementsResponse.js"), exports);
|
|
28
28
|
__exportStar(require("./ClusterRequirementsStoredInput.js"), exports);
|
|
29
29
|
__exportStar(require("./ClusterSizing.js"), exports);
|
|
30
|
+
__exportStar(require("./ClusterUtilization.js"), exports);
|
|
30
31
|
__exportStar(require("./ComplexityDiskScoreEntry.js"), exports);
|
|
31
32
|
__exportStar(require("./ComplexityOSNameEntry.js"), exports);
|
|
32
33
|
__exportStar(require("./ComplexityOSScoreEntry.js"), exports);
|
|
34
|
+
__exportStar(require("./CpuOverCommitRatio.js"), exports);
|
|
33
35
|
__exportStar(require("./Customer.js"), exports);
|
|
34
36
|
__exportStar(require("./Datastore.js"), exports);
|
|
35
37
|
__exportStar(require("./DiskSizeTierSummary.js"), exports);
|
|
@@ -54,6 +56,7 @@ __exportStar(require("./Label.js"), exports);
|
|
|
54
56
|
__exportStar(require("./Member.js"), exports);
|
|
55
57
|
__exportStar(require("./MemberCreate.js"), exports);
|
|
56
58
|
__exportStar(require("./MemberUpdate.js"), exports);
|
|
59
|
+
__exportStar(require("./MemoryOverCommitRatio.js"), exports);
|
|
57
60
|
__exportStar(require("./MigrationComplexityRequest.js"), exports);
|
|
58
61
|
__exportStar(require("./MigrationComplexityResponse.js"), exports);
|
|
59
62
|
__exportStar(require("./MigrationEstimationByComplexityResponse.js"), exports);
|
|
@@ -80,6 +83,8 @@ __exportStar(require("./Source.js"), exports);
|
|
|
80
83
|
__exportStar(require("./SourceCreate.js"), exports);
|
|
81
84
|
__exportStar(require("./SourceInfra.js"), exports);
|
|
82
85
|
__exportStar(require("./SourceUpdate.js"), exports);
|
|
86
|
+
__exportStar(require("./StandaloneClusterRequirementsRequest.js"), exports);
|
|
87
|
+
__exportStar(require("./StandaloneClusterRequirementsResponse.js"), exports);
|
|
83
88
|
__exportStar(require("./Status.js"), exports);
|
|
84
89
|
__exportStar(require("./UpdateInventory.js"), exports);
|
|
85
90
|
__exportStar(require("./VCenter.js"), exports);
|
package/docs/AccountApi.md
CHANGED
|
@@ -82,6 +82,7 @@ No authorization required
|
|
|
82
82
|
| **201** | Created | - |
|
|
83
83
|
| **400** | Bad Request | - |
|
|
84
84
|
| **401** | Unauthorized | - |
|
|
85
|
+
| **403** | Forbidden | - |
|
|
85
86
|
| **500** | Internal error | - |
|
|
86
87
|
|
|
87
88
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -155,6 +156,7 @@ No authorization required
|
|
|
155
156
|
| **201** | Created | - |
|
|
156
157
|
| **400** | Bad Request | - |
|
|
157
158
|
| **401** | Unauthorized | - |
|
|
159
|
+
| **403** | Forbidden | - |
|
|
158
160
|
| **404** | Not Found | - |
|
|
159
161
|
| **409** | Conflict | - |
|
|
160
162
|
| **500** | Internal error | - |
|
|
@@ -226,6 +228,7 @@ No authorization required
|
|
|
226
228
|
|-------------|-------------|------------------|
|
|
227
229
|
| **200** | OK | - |
|
|
228
230
|
| **401** | Unauthorized | - |
|
|
231
|
+
| **403** | Forbidden | - |
|
|
229
232
|
| **404** | Not Found | - |
|
|
230
233
|
| **500** | Internal error | - |
|
|
231
234
|
|
|
@@ -296,6 +299,7 @@ No authorization required
|
|
|
296
299
|
|-------------|-------------|------------------|
|
|
297
300
|
| **200** | OK | - |
|
|
298
301
|
| **401** | Unauthorized | - |
|
|
302
|
+
| **403** | Forbidden | - |
|
|
299
303
|
| **404** | Not Found | - |
|
|
300
304
|
| **500** | Internal error | - |
|
|
301
305
|
|
|
@@ -427,6 +431,7 @@ No authorization required
|
|
|
427
431
|
|-------------|-------------|------------------|
|
|
428
432
|
| **200** | OK | - |
|
|
429
433
|
| **401** | Unauthorized | - |
|
|
434
|
+
| **403** | Forbidden | - |
|
|
430
435
|
| **404** | Not Found | - |
|
|
431
436
|
| **500** | Internal error | - |
|
|
432
437
|
|
|
@@ -503,6 +508,7 @@ No authorization required
|
|
|
503
508
|
|-------------|-------------|------------------|
|
|
504
509
|
| **200** | OK | - |
|
|
505
510
|
| **401** | Unauthorized | - |
|
|
511
|
+
| **403** | Forbidden | - |
|
|
506
512
|
| **500** | Internal error | - |
|
|
507
513
|
|
|
508
514
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -575,6 +581,7 @@ No authorization required
|
|
|
575
581
|
|-------------|-------------|------------------|
|
|
576
582
|
| **200** | OK | - |
|
|
577
583
|
| **401** | Unauthorized | - |
|
|
584
|
+
| **403** | Forbidden | - |
|
|
578
585
|
| **400** | Bad Request | - |
|
|
579
586
|
| **404** | Not Found | - |
|
|
580
587
|
| **500** | Internal error | - |
|
|
@@ -650,6 +657,7 @@ No authorization required
|
|
|
650
657
|
| **200** | OK | - |
|
|
651
658
|
| **400** | Bad Request | - |
|
|
652
659
|
| **401** | Unauthorized | - |
|
|
660
|
+
| **403** | Forbidden | - |
|
|
653
661
|
| **404** | Not Found | - |
|
|
654
662
|
| **500** | Internal error | - |
|
|
655
663
|
|
|
@@ -727,6 +735,7 @@ No authorization required
|
|
|
727
735
|
| **200** | OK | - |
|
|
728
736
|
| **400** | Bad Request | - |
|
|
729
737
|
| **401** | Unauthorized | - |
|
|
738
|
+
| **403** | Forbidden | - |
|
|
730
739
|
| **404** | Not Found | - |
|
|
731
740
|
| **500** | Internal error | - |
|
|
732
741
|
|
|
@@ -8,8 +8,8 @@ Request payload for calculating cluster requirements
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`clusterId` | string
|
|
11
|
-
`cpuOverCommitRatio` |
|
|
12
|
-
`memoryOverCommitRatio` |
|
|
11
|
+
`cpuOverCommitRatio` | [CpuOverCommitRatio](CpuOverCommitRatio.md)
|
|
12
|
+
`memoryOverCommitRatio` | [MemoryOverCommitRatio](MemoryOverCommitRatio.md)
|
|
13
13
|
`workerNodeCPU` | number
|
|
14
14
|
`workerNodeMemory` | number
|
|
15
15
|
`workerNodeThreads` | number
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
# ClusterUtilization
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`cpuAvg` | number
|
|
10
|
+
`cpuP95` | number
|
|
11
|
+
`cpuMax` | number
|
|
12
|
+
`memAvg` | number
|
|
13
|
+
`memP95` | number
|
|
14
|
+
`memMax` | number
|
|
15
|
+
`confidence` | number
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { ClusterUtilization } from '@openshift-migration-advisor/planner-sdk'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"cpuAvg": null,
|
|
25
|
+
"cpuP95": null,
|
|
26
|
+
"cpuMax": null,
|
|
27
|
+
"memAvg": null,
|
|
28
|
+
"memP95": null,
|
|
29
|
+
"memMax": null,
|
|
30
|
+
"confidence": null,
|
|
31
|
+
} satisfies ClusterUtilization
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as ClusterUtilization
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# CpuOverCommitRatio
|
|
3
|
+
|
|
4
|
+
CPU over-commit ratio
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { CpuOverCommitRatio } from '@openshift-migration-advisor/planner-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies CpuOverCommitRatio
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as CpuOverCommitRatio
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
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/planner-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
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# MemoryOverCommitRatio
|
|
3
|
+
|
|
4
|
+
Memory over-commit ratio
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { MemoryOverCommitRatio } from '@openshift-migration-advisor/planner-sdk'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies MemoryOverCommitRatio
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as MemoryOverCommitRatio
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# SizingApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://raw.githubusercontent.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**calculateClusterRequirements**](SizingApi.md#calculateclusterrequirements) | **POST** /api/v1/cluster-requirements | |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## calculateClusterRequirements
|
|
12
|
+
|
|
13
|
+
> StandaloneClusterRequirementsResponse calculateClusterRequirements(standaloneClusterRequirementsRequest)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Calculate cluster requirements for hypothetical workload with inline inventory data (no assessment required)
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
Configuration,
|
|
24
|
+
SizingApi,
|
|
25
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
26
|
+
import type { CalculateClusterRequirementsRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
27
|
+
|
|
28
|
+
async function example() {
|
|
29
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
30
|
+
const api = new SizingApi();
|
|
31
|
+
|
|
32
|
+
const body = {
|
|
33
|
+
// StandaloneClusterRequirementsRequest
|
|
34
|
+
standaloneClusterRequirementsRequest: {"totalVMs":100,"totalCPU":400,"totalMemory":800,"cpuOverCommitRatio":"1:4","memoryOverCommitRatio":"1:2","workerNodeCPU":16,"workerNodeMemory":64},
|
|
35
|
+
} satisfies CalculateClusterRequirementsRequest;
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
const data = await api.calculateClusterRequirements(body);
|
|
39
|
+
console.log(data);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error(error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Run the test
|
|
46
|
+
example().catch(console.error);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Parameters
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description | Notes |
|
|
53
|
+
|------------- | ------------- | ------------- | -------------|
|
|
54
|
+
| **standaloneClusterRequirementsRequest** | [StandaloneClusterRequirementsRequest](StandaloneClusterRequirementsRequest.md) | | |
|
|
55
|
+
|
|
56
|
+
### Return type
|
|
57
|
+
|
|
58
|
+
[**StandaloneClusterRequirementsResponse**](StandaloneClusterRequirementsResponse.md)
|
|
59
|
+
|
|
60
|
+
### Authorization
|
|
61
|
+
|
|
62
|
+
No authorization required
|
|
63
|
+
|
|
64
|
+
### HTTP request headers
|
|
65
|
+
|
|
66
|
+
- **Content-Type**: `application/json`
|
|
67
|
+
- **Accept**: `application/json`
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### HTTP response details
|
|
71
|
+
| Status code | Description | Response headers |
|
|
72
|
+
|-------------|-------------|------------------|
|
|
73
|
+
| **200** | Cluster requirements calculation successful | - |
|
|
74
|
+
| **400** | Bad Request | - |
|
|
75
|
+
| **401** | Unauthorized | - |
|
|
76
|
+
| **500** | Internal error | - |
|
|
77
|
+
| **503** | Service Unavailable | - |
|
|
78
|
+
|
|
79
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
80
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
# StandaloneClusterRequirementsRequest
|
|
3
|
+
|
|
4
|
+
Request payload for calculating cluster requirements with inline inventory data (no assessment required)
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`totalVMs` | number
|
|
11
|
+
`totalCPU` | number
|
|
12
|
+
`totalMemory` | number
|
|
13
|
+
`cpuOverCommitRatio` | [CpuOverCommitRatio](CpuOverCommitRatio.md)
|
|
14
|
+
`memoryOverCommitRatio` | [MemoryOverCommitRatio](MemoryOverCommitRatio.md)
|
|
15
|
+
`workerNodeCPU` | number
|
|
16
|
+
`workerNodeMemory` | number
|
|
17
|
+
`workerNodeThreads` | number
|
|
18
|
+
`controlPlaneSchedulable` | boolean
|
|
19
|
+
`controlPlaneCPU` | number
|
|
20
|
+
`controlPlaneMemory` | number
|
|
21
|
+
`controlPlaneNodeCount` | number
|
|
22
|
+
`hostedControlPlane` | boolean
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import type { StandaloneClusterRequirementsRequest } from '@openshift-migration-advisor/planner-sdk'
|
|
28
|
+
|
|
29
|
+
// TODO: Update the object below with actual values
|
|
30
|
+
const example = {
|
|
31
|
+
"totalVMs": null,
|
|
32
|
+
"totalCPU": null,
|
|
33
|
+
"totalMemory": null,
|
|
34
|
+
"cpuOverCommitRatio": null,
|
|
35
|
+
"memoryOverCommitRatio": null,
|
|
36
|
+
"workerNodeCPU": null,
|
|
37
|
+
"workerNodeMemory": null,
|
|
38
|
+
"workerNodeThreads": null,
|
|
39
|
+
"controlPlaneSchedulable": null,
|
|
40
|
+
"controlPlaneCPU": null,
|
|
41
|
+
"controlPlaneMemory": null,
|
|
42
|
+
"controlPlaneNodeCount": null,
|
|
43
|
+
"hostedControlPlane": null,
|
|
44
|
+
} satisfies StandaloneClusterRequirementsRequest
|
|
45
|
+
|
|
46
|
+
console.log(example)
|
|
47
|
+
|
|
48
|
+
// Convert the instance to a JSON string
|
|
49
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
50
|
+
console.log(exampleJSON)
|
|
51
|
+
|
|
52
|
+
// Parse the JSON string back to an object
|
|
53
|
+
const exampleParsed = JSON.parse(exampleJSON) as StandaloneClusterRequirementsRequest
|
|
54
|
+
console.log(exampleParsed)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
58
|
+
|
|
59
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# StandaloneClusterRequirementsResponse
|
|
3
|
+
|
|
4
|
+
Sizing results; omits inventoryTotals (already in the request).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`clusterSizing` | [ClusterSizing](ClusterSizing.md)
|
|
11
|
+
`resourceConsumption` | [SizingResourceConsumption](SizingResourceConsumption.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { StandaloneClusterRequirementsResponse } from '@openshift-migration-advisor/planner-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"clusterSizing": null,
|
|
21
|
+
"resourceConsumption": null,
|
|
22
|
+
} satisfies StandaloneClusterRequirementsResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as StandaloneClusterRequirementsResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/package.json
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* OpenShift Migration Advisor API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1alpha1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime.js';
|
|
16
|
+
import {
|
|
17
|
+
type StandaloneClusterRequirementsRequest,
|
|
18
|
+
StandaloneClusterRequirementsRequestFromJSON,
|
|
19
|
+
StandaloneClusterRequirementsRequestToJSON,
|
|
20
|
+
} from '../models/StandaloneClusterRequirementsRequest.js';
|
|
21
|
+
import {
|
|
22
|
+
type StandaloneClusterRequirementsResponse,
|
|
23
|
+
StandaloneClusterRequirementsResponseFromJSON,
|
|
24
|
+
StandaloneClusterRequirementsResponseToJSON,
|
|
25
|
+
} from '../models/StandaloneClusterRequirementsResponse.js';
|
|
26
|
+
|
|
27
|
+
export interface CalculateClusterRequirementsRequest {
|
|
28
|
+
standaloneClusterRequirementsRequest: StandaloneClusterRequirementsRequest;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* SizingApi - interface
|
|
33
|
+
*
|
|
34
|
+
* @export
|
|
35
|
+
* @interface SizingApiInterface
|
|
36
|
+
*/
|
|
37
|
+
export interface SizingApiInterface {
|
|
38
|
+
/**
|
|
39
|
+
* Creates request options for calculateClusterRequirements without sending the request
|
|
40
|
+
* @param {StandaloneClusterRequirementsRequest} standaloneClusterRequirementsRequest
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
* @memberof SizingApiInterface
|
|
43
|
+
*/
|
|
44
|
+
calculateClusterRequirementsRequestOpts(requestParameters: CalculateClusterRequirementsRequest): Promise<runtime.RequestOpts>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Calculate cluster requirements for hypothetical workload with inline inventory data (no assessment required)
|
|
48
|
+
* @param {StandaloneClusterRequirementsRequest} standaloneClusterRequirementsRequest
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
* @memberof SizingApiInterface
|
|
52
|
+
*/
|
|
53
|
+
calculateClusterRequirementsRaw(requestParameters: CalculateClusterRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StandaloneClusterRequirementsResponse>>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Calculate cluster requirements for hypothetical workload with inline inventory data (no assessment required)
|
|
57
|
+
*/
|
|
58
|
+
calculateClusterRequirements(requestParameters: CalculateClusterRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StandaloneClusterRequirementsResponse>;
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export class SizingApi extends runtime.BaseAPI implements SizingApiInterface {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Creates request options for calculateClusterRequirements without sending the request
|
|
69
|
+
*/
|
|
70
|
+
async calculateClusterRequirementsRequestOpts(requestParameters: CalculateClusterRequirementsRequest): Promise<runtime.RequestOpts> {
|
|
71
|
+
if (requestParameters['standaloneClusterRequirementsRequest'] == null) {
|
|
72
|
+
throw new runtime.RequiredError(
|
|
73
|
+
'standaloneClusterRequirementsRequest',
|
|
74
|
+
'Required parameter "standaloneClusterRequirementsRequest" was null or undefined when calling calculateClusterRequirements().'
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const queryParameters: any = {};
|
|
79
|
+
|
|
80
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
81
|
+
|
|
82
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
let urlPath = `/api/v1/cluster-requirements`;
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
path: urlPath,
|
|
89
|
+
method: 'POST',
|
|
90
|
+
headers: headerParameters,
|
|
91
|
+
query: queryParameters,
|
|
92
|
+
body: StandaloneClusterRequirementsRequestToJSON(requestParameters['standaloneClusterRequirementsRequest']),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Calculate cluster requirements for hypothetical workload with inline inventory data (no assessment required)
|
|
98
|
+
*/
|
|
99
|
+
async calculateClusterRequirementsRaw(requestParameters: CalculateClusterRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StandaloneClusterRequirementsResponse>> {
|
|
100
|
+
const requestOptions = await this.calculateClusterRequirementsRequestOpts(requestParameters);
|
|
101
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
102
|
+
|
|
103
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StandaloneClusterRequirementsResponseFromJSON(jsonValue));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Calculate cluster requirements for hypothetical workload with inline inventory data (no assessment required)
|
|
108
|
+
*/
|
|
109
|
+
async calculateClusterRequirements(requestParameters: CalculateClusterRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StandaloneClusterRequirementsResponse> {
|
|
110
|
+
const response = await this.calculateClusterRequirementsRaw(requestParameters, initOverrides);
|
|
111
|
+
return await response.value();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -13,6 +13,21 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime.js';
|
|
16
|
+
import type { CpuOverCommitRatio } from './CpuOverCommitRatio.js';
|
|
17
|
+
import {
|
|
18
|
+
CpuOverCommitRatioFromJSON,
|
|
19
|
+
CpuOverCommitRatioFromJSONTyped,
|
|
20
|
+
CpuOverCommitRatioToJSON,
|
|
21
|
+
CpuOverCommitRatioToJSONTyped,
|
|
22
|
+
} from './CpuOverCommitRatio.js';
|
|
23
|
+
import type { MemoryOverCommitRatio } from './MemoryOverCommitRatio.js';
|
|
24
|
+
import {
|
|
25
|
+
MemoryOverCommitRatioFromJSON,
|
|
26
|
+
MemoryOverCommitRatioFromJSONTyped,
|
|
27
|
+
MemoryOverCommitRatioToJSON,
|
|
28
|
+
MemoryOverCommitRatioToJSONTyped,
|
|
29
|
+
} from './MemoryOverCommitRatio.js';
|
|
30
|
+
|
|
16
31
|
/**
|
|
17
32
|
* Request payload for calculating cluster requirements
|
|
18
33
|
* @export
|
|
@@ -27,16 +42,16 @@ export interface ClusterRequirementsRequest {
|
|
|
27
42
|
clusterId: string;
|
|
28
43
|
/**
|
|
29
44
|
* CPU over-commit ratio (e.g., "1:4")
|
|
30
|
-
* @type {
|
|
45
|
+
* @type {CpuOverCommitRatio}
|
|
31
46
|
* @memberof ClusterRequirementsRequest
|
|
32
47
|
*/
|
|
33
|
-
cpuOverCommitRatio:
|
|
48
|
+
cpuOverCommitRatio: CpuOverCommitRatio;
|
|
34
49
|
/**
|
|
35
50
|
* Memory over-commit ratio (e.g., "1:2")
|
|
36
|
-
* @type {
|
|
51
|
+
* @type {MemoryOverCommitRatio}
|
|
37
52
|
* @memberof ClusterRequirementsRequest
|
|
38
53
|
*/
|
|
39
|
-
memoryOverCommitRatio:
|
|
54
|
+
memoryOverCommitRatio: MemoryOverCommitRatio;
|
|
40
55
|
/**
|
|
41
56
|
* CPU cores per worker node
|
|
42
57
|
* @type {number}
|
|
@@ -88,27 +103,6 @@ export interface ClusterRequirementsRequest {
|
|
|
88
103
|
}
|
|
89
104
|
|
|
90
105
|
|
|
91
|
-
/**
|
|
92
|
-
* @export
|
|
93
|
-
*/
|
|
94
|
-
export const ClusterRequirementsRequestCpuOverCommitRatioEnum = {
|
|
95
|
-
CpuOneToOne: '1:1',
|
|
96
|
-
CpuOneToTwo: '1:2',
|
|
97
|
-
CpuOneToFour: '1:4',
|
|
98
|
-
CpuOneToSix: '1:6'
|
|
99
|
-
} as const;
|
|
100
|
-
export type ClusterRequirementsRequestCpuOverCommitRatioEnum = typeof ClusterRequirementsRequestCpuOverCommitRatioEnum[keyof typeof ClusterRequirementsRequestCpuOverCommitRatioEnum];
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* @export
|
|
104
|
-
*/
|
|
105
|
-
export const ClusterRequirementsRequestMemoryOverCommitRatioEnum = {
|
|
106
|
-
MemoryOneToOne: '1:1',
|
|
107
|
-
MemoryOneToTwo: '1:2',
|
|
108
|
-
MemoryOneToFour: '1:4'
|
|
109
|
-
} as const;
|
|
110
|
-
export type ClusterRequirementsRequestMemoryOverCommitRatioEnum = typeof ClusterRequirementsRequestMemoryOverCommitRatioEnum[keyof typeof ClusterRequirementsRequestMemoryOverCommitRatioEnum];
|
|
111
|
-
|
|
112
106
|
/**
|
|
113
107
|
* @export
|
|
114
108
|
*/
|
|
@@ -142,8 +136,8 @@ export function ClusterRequirementsRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
142
136
|
return {
|
|
143
137
|
|
|
144
138
|
'clusterId': json['clusterId'],
|
|
145
|
-
'cpuOverCommitRatio': json['cpuOverCommitRatio'],
|
|
146
|
-
'memoryOverCommitRatio': json['memoryOverCommitRatio'],
|
|
139
|
+
'cpuOverCommitRatio': CpuOverCommitRatioFromJSON(json['cpuOverCommitRatio']),
|
|
140
|
+
'memoryOverCommitRatio': MemoryOverCommitRatioFromJSON(json['memoryOverCommitRatio']),
|
|
147
141
|
'workerNodeCPU': json['workerNodeCPU'],
|
|
148
142
|
'workerNodeMemory': json['workerNodeMemory'],
|
|
149
143
|
'workerNodeThreads': json['workerNodeThreads'] == null ? undefined : json['workerNodeThreads'],
|
|
@@ -167,8 +161,8 @@ export function ClusterRequirementsRequestToJSONTyped(value?: ClusterRequirement
|
|
|
167
161
|
return {
|
|
168
162
|
|
|
169
163
|
'clusterId': value['clusterId'],
|
|
170
|
-
'cpuOverCommitRatio': value['cpuOverCommitRatio'],
|
|
171
|
-
'memoryOverCommitRatio': value['memoryOverCommitRatio'],
|
|
164
|
+
'cpuOverCommitRatio': CpuOverCommitRatioToJSON(value['cpuOverCommitRatio']),
|
|
165
|
+
'memoryOverCommitRatio': MemoryOverCommitRatioToJSON(value['memoryOverCommitRatio']),
|
|
172
166
|
'workerNodeCPU': value['workerNodeCPU'],
|
|
173
167
|
'workerNodeMemory': value['workerNodeMemory'],
|
|
174
168
|
'workerNodeThreads': value['workerNodeThreads'],
|