@openshift-migration-advisor/planner-sdk 0.13.3-391ade47acd8 → 0.13.3-4f3d8bb515ec
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 +7 -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/CpuOverCommitRatio.d.ts +27 -0
- package/dist/esm/models/CpuOverCommitRatio.js +45 -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 +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ClusterRequirementsRequest.d.ts +6 -23
- package/dist/models/ClusterRequirementsRequest.js +7 -22
- package/dist/models/CpuOverCommitRatio.d.ts +27 -0
- package/dist/models/CpuOverCommitRatio.js +53 -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 +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ClusterRequirementsRequest.md +2 -2
- package/docs/CpuOverCommitRatio.md +33 -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/CpuOverCommitRatio.ts +55 -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 +4 -0
|
@@ -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'],
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* CPU over-commit ratio
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const CpuOverCommitRatio = {
|
|
21
|
+
CpuOneToOne: '1:1',
|
|
22
|
+
CpuOneToTwo: '1:2',
|
|
23
|
+
CpuOneToFour: '1:4',
|
|
24
|
+
CpuOneToSix: '1:6'
|
|
25
|
+
} as const;
|
|
26
|
+
export type CpuOverCommitRatio = typeof CpuOverCommitRatio[keyof typeof CpuOverCommitRatio];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfCpuOverCommitRatio(value: any): boolean {
|
|
30
|
+
for (const key in CpuOverCommitRatio) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(CpuOverCommitRatio, key)) {
|
|
32
|
+
if (CpuOverCommitRatio[key as keyof typeof CpuOverCommitRatio] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function CpuOverCommitRatioFromJSON(json: any): CpuOverCommitRatio {
|
|
41
|
+
return CpuOverCommitRatioFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function CpuOverCommitRatioFromJSONTyped(json: any, ignoreDiscriminator: boolean): CpuOverCommitRatio {
|
|
45
|
+
return json as CpuOverCommitRatio;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function CpuOverCommitRatioToJSON(value?: CpuOverCommitRatio | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CpuOverCommitRatioToJSONTyped(value: any, ignoreDiscriminator: boolean): CpuOverCommitRatio {
|
|
53
|
+
return value as CpuOverCommitRatio;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Memory over-commit ratio
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const MemoryOverCommitRatio = {
|
|
21
|
+
MemoryOneToOne: '1:1',
|
|
22
|
+
MemoryOneToTwo: '1:2',
|
|
23
|
+
MemoryOneToFour: '1:4'
|
|
24
|
+
} as const;
|
|
25
|
+
export type MemoryOverCommitRatio = typeof MemoryOverCommitRatio[keyof typeof MemoryOverCommitRatio];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfMemoryOverCommitRatio(value: any): boolean {
|
|
29
|
+
for (const key in MemoryOverCommitRatio) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(MemoryOverCommitRatio, key)) {
|
|
31
|
+
if (MemoryOverCommitRatio[key as keyof typeof MemoryOverCommitRatio] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function MemoryOverCommitRatioFromJSON(json: any): MemoryOverCommitRatio {
|
|
40
|
+
return MemoryOverCommitRatioFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function MemoryOverCommitRatioFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryOverCommitRatio {
|
|
44
|
+
return json as MemoryOverCommitRatio;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function MemoryOverCommitRatioToJSON(value?: MemoryOverCommitRatio | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function MemoryOverCommitRatioToJSONTyped(value: any, ignoreDiscriminator: boolean): MemoryOverCommitRatio {
|
|
52
|
+
return value as MemoryOverCommitRatio;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,194 @@
|
|
|
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 { 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
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Request payload for calculating cluster requirements with inline inventory data (no assessment required)
|
|
33
|
+
* @export
|
|
34
|
+
* @interface StandaloneClusterRequirementsRequest
|
|
35
|
+
*/
|
|
36
|
+
export interface StandaloneClusterRequirementsRequest {
|
|
37
|
+
/**
|
|
38
|
+
* Total number of VMs to size for
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
41
|
+
*/
|
|
42
|
+
totalVMs: number;
|
|
43
|
+
/**
|
|
44
|
+
* Total CPU cores across all VMs
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
47
|
+
*/
|
|
48
|
+
totalCPU: number;
|
|
49
|
+
/**
|
|
50
|
+
* Total memory (GB) across all VMs
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
53
|
+
*/
|
|
54
|
+
totalMemory: number;
|
|
55
|
+
/**
|
|
56
|
+
* CPU over-commit ratio (e.g., "1:4")
|
|
57
|
+
* @type {CpuOverCommitRatio}
|
|
58
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
59
|
+
*/
|
|
60
|
+
cpuOverCommitRatio: CpuOverCommitRatio;
|
|
61
|
+
/**
|
|
62
|
+
* Memory over-commit ratio (e.g., "1:2")
|
|
63
|
+
* @type {MemoryOverCommitRatio}
|
|
64
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
65
|
+
*/
|
|
66
|
+
memoryOverCommitRatio: MemoryOverCommitRatio;
|
|
67
|
+
/**
|
|
68
|
+
* CPU cores per worker node
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
71
|
+
*/
|
|
72
|
+
workerNodeCPU: number;
|
|
73
|
+
/**
|
|
74
|
+
* Memory (GB) per worker node
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
77
|
+
*/
|
|
78
|
+
workerNodeMemory: number;
|
|
79
|
+
/**
|
|
80
|
+
* Number of CPU threads per worker node (for SMT calculation). If not provided, assumes no SMT (threads = cores). Must be >= workerNodeCPU
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
83
|
+
*/
|
|
84
|
+
workerNodeThreads?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Allow workload scheduling on control plane nodes (default: false)
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
89
|
+
*/
|
|
90
|
+
controlPlaneSchedulable?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* CPU cores per control plane node (default: 6)
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
95
|
+
*/
|
|
96
|
+
controlPlaneCPU?: number;
|
|
97
|
+
/**
|
|
98
|
+
* Memory in GB per control plane node (default: 16)
|
|
99
|
+
* @type {number}
|
|
100
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
101
|
+
*/
|
|
102
|
+
controlPlaneMemory?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Number of control plane nodes: 1 or 3 (default: 3)
|
|
105
|
+
* @type {StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum}
|
|
106
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
107
|
+
*/
|
|
108
|
+
controlPlaneNodeCount?: StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum;
|
|
109
|
+
/**
|
|
110
|
+
* If true, control plane is hosted externally. Incompatible with control plane fields (default: false)
|
|
111
|
+
* @type {boolean}
|
|
112
|
+
* @memberof StandaloneClusterRequirementsRequest
|
|
113
|
+
*/
|
|
114
|
+
hostedControlPlane?: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @export
|
|
120
|
+
*/
|
|
121
|
+
export const StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum = {
|
|
122
|
+
NUMBER_1: 1,
|
|
123
|
+
NUMBER_3: 3
|
|
124
|
+
} as const;
|
|
125
|
+
export type StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum = typeof StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum[keyof typeof StandaloneClusterRequirementsRequestControlPlaneNodeCountEnum];
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Check if a given object implements the StandaloneClusterRequirementsRequest interface.
|
|
130
|
+
*/
|
|
131
|
+
export function instanceOfStandaloneClusterRequirementsRequest(value: object): value is StandaloneClusterRequirementsRequest {
|
|
132
|
+
if (!('totalVMs' in value) || value['totalVMs'] === undefined) return false;
|
|
133
|
+
if (!('totalCPU' in value) || value['totalCPU'] === undefined) return false;
|
|
134
|
+
if (!('totalMemory' in value) || value['totalMemory'] === undefined) return false;
|
|
135
|
+
if (!('cpuOverCommitRatio' in value) || value['cpuOverCommitRatio'] === undefined) return false;
|
|
136
|
+
if (!('memoryOverCommitRatio' in value) || value['memoryOverCommitRatio'] === undefined) return false;
|
|
137
|
+
if (!('workerNodeCPU' in value) || value['workerNodeCPU'] === undefined) return false;
|
|
138
|
+
if (!('workerNodeMemory' in value) || value['workerNodeMemory'] === undefined) return false;
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function StandaloneClusterRequirementsRequestFromJSON(json: any): StandaloneClusterRequirementsRequest {
|
|
143
|
+
return StandaloneClusterRequirementsRequestFromJSONTyped(json, false);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function StandaloneClusterRequirementsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StandaloneClusterRequirementsRequest {
|
|
147
|
+
if (json == null) {
|
|
148
|
+
return json;
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
|
|
152
|
+
'totalVMs': json['totalVMs'],
|
|
153
|
+
'totalCPU': json['totalCPU'],
|
|
154
|
+
'totalMemory': json['totalMemory'],
|
|
155
|
+
'cpuOverCommitRatio': CpuOverCommitRatioFromJSON(json['cpuOverCommitRatio']),
|
|
156
|
+
'memoryOverCommitRatio': MemoryOverCommitRatioFromJSON(json['memoryOverCommitRatio']),
|
|
157
|
+
'workerNodeCPU': json['workerNodeCPU'],
|
|
158
|
+
'workerNodeMemory': json['workerNodeMemory'],
|
|
159
|
+
'workerNodeThreads': json['workerNodeThreads'] == null ? undefined : json['workerNodeThreads'],
|
|
160
|
+
'controlPlaneSchedulable': json['controlPlaneSchedulable'] == null ? undefined : json['controlPlaneSchedulable'],
|
|
161
|
+
'controlPlaneCPU': json['controlPlaneCPU'] == null ? undefined : json['controlPlaneCPU'],
|
|
162
|
+
'controlPlaneMemory': json['controlPlaneMemory'] == null ? undefined : json['controlPlaneMemory'],
|
|
163
|
+
'controlPlaneNodeCount': json['controlPlaneNodeCount'] == null ? undefined : json['controlPlaneNodeCount'],
|
|
164
|
+
'hostedControlPlane': json['hostedControlPlane'] == null ? undefined : json['hostedControlPlane'],
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function StandaloneClusterRequirementsRequestToJSON(json: any): StandaloneClusterRequirementsRequest {
|
|
169
|
+
return StandaloneClusterRequirementsRequestToJSONTyped(json, false);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function StandaloneClusterRequirementsRequestToJSONTyped(value?: StandaloneClusterRequirementsRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
173
|
+
if (value == null) {
|
|
174
|
+
return value;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return {
|
|
178
|
+
|
|
179
|
+
'totalVMs': value['totalVMs'],
|
|
180
|
+
'totalCPU': value['totalCPU'],
|
|
181
|
+
'totalMemory': value['totalMemory'],
|
|
182
|
+
'cpuOverCommitRatio': CpuOverCommitRatioToJSON(value['cpuOverCommitRatio']),
|
|
183
|
+
'memoryOverCommitRatio': MemoryOverCommitRatioToJSON(value['memoryOverCommitRatio']),
|
|
184
|
+
'workerNodeCPU': value['workerNodeCPU'],
|
|
185
|
+
'workerNodeMemory': value['workerNodeMemory'],
|
|
186
|
+
'workerNodeThreads': value['workerNodeThreads'],
|
|
187
|
+
'controlPlaneSchedulable': value['controlPlaneSchedulable'],
|
|
188
|
+
'controlPlaneCPU': value['controlPlaneCPU'],
|
|
189
|
+
'controlPlaneMemory': value['controlPlaneMemory'],
|
|
190
|
+
'controlPlaneNodeCount': value['controlPlaneNodeCount'],
|
|
191
|
+
'hostedControlPlane': value['hostedControlPlane'],
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { mapValues } from '../runtime.js';
|
|
16
|
+
import type { SizingResourceConsumption } from './SizingResourceConsumption.js';
|
|
17
|
+
import {
|
|
18
|
+
SizingResourceConsumptionFromJSON,
|
|
19
|
+
SizingResourceConsumptionFromJSONTyped,
|
|
20
|
+
SizingResourceConsumptionToJSON,
|
|
21
|
+
SizingResourceConsumptionToJSONTyped,
|
|
22
|
+
} from './SizingResourceConsumption.js';
|
|
23
|
+
import type { ClusterSizing } from './ClusterSizing.js';
|
|
24
|
+
import {
|
|
25
|
+
ClusterSizingFromJSON,
|
|
26
|
+
ClusterSizingFromJSONTyped,
|
|
27
|
+
ClusterSizingToJSON,
|
|
28
|
+
ClusterSizingToJSONTyped,
|
|
29
|
+
} from './ClusterSizing.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Sizing results; omits inventoryTotals (already in the request).
|
|
33
|
+
* @export
|
|
34
|
+
* @interface StandaloneClusterRequirementsResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface StandaloneClusterRequirementsResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {ClusterSizing}
|
|
40
|
+
* @memberof StandaloneClusterRequirementsResponse
|
|
41
|
+
*/
|
|
42
|
+
clusterSizing: ClusterSizing;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {SizingResourceConsumption}
|
|
46
|
+
* @memberof StandaloneClusterRequirementsResponse
|
|
47
|
+
*/
|
|
48
|
+
resourceConsumption: SizingResourceConsumption;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the StandaloneClusterRequirementsResponse interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfStandaloneClusterRequirementsResponse(value: object): value is StandaloneClusterRequirementsResponse {
|
|
55
|
+
if (!('clusterSizing' in value) || value['clusterSizing'] === undefined) return false;
|
|
56
|
+
if (!('resourceConsumption' in value) || value['resourceConsumption'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function StandaloneClusterRequirementsResponseFromJSON(json: any): StandaloneClusterRequirementsResponse {
|
|
61
|
+
return StandaloneClusterRequirementsResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function StandaloneClusterRequirementsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StandaloneClusterRequirementsResponse {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'clusterSizing': ClusterSizingFromJSON(json['clusterSizing']),
|
|
71
|
+
'resourceConsumption': SizingResourceConsumptionFromJSON(json['resourceConsumption']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function StandaloneClusterRequirementsResponseToJSON(json: any): StandaloneClusterRequirementsResponse {
|
|
76
|
+
return StandaloneClusterRequirementsResponseToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function StandaloneClusterRequirementsResponseToJSONTyped(value?: StandaloneClusterRequirementsResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'clusterSizing': ClusterSizingToJSON(value['clusterSizing']),
|
|
87
|
+
'resourceConsumption': SizingResourceConsumptionToJSON(value['resourceConsumption']),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './ClusterSizing.js';
|
|
|
14
14
|
export * from './ComplexityDiskScoreEntry.js';
|
|
15
15
|
export * from './ComplexityOSNameEntry.js';
|
|
16
16
|
export * from './ComplexityOSScoreEntry.js';
|
|
17
|
+
export * from './CpuOverCommitRatio.js';
|
|
17
18
|
export * from './Customer.js';
|
|
18
19
|
export * from './Datastore.js';
|
|
19
20
|
export * from './DiskSizeTierSummary.js';
|
|
@@ -38,6 +39,7 @@ export * from './Label.js';
|
|
|
38
39
|
export * from './Member.js';
|
|
39
40
|
export * from './MemberCreate.js';
|
|
40
41
|
export * from './MemberUpdate.js';
|
|
42
|
+
export * from './MemoryOverCommitRatio.js';
|
|
41
43
|
export * from './MigrationComplexityRequest.js';
|
|
42
44
|
export * from './MigrationComplexityResponse.js';
|
|
43
45
|
export * from './MigrationEstimationByComplexityResponse.js';
|
|
@@ -64,6 +66,8 @@ export * from './Source.js';
|
|
|
64
66
|
export * from './SourceCreate.js';
|
|
65
67
|
export * from './SourceInfra.js';
|
|
66
68
|
export * from './SourceUpdate.js';
|
|
69
|
+
export * from './StandaloneClusterRequirementsRequest.js';
|
|
70
|
+
export * from './StandaloneClusterRequirementsResponse.js';
|
|
67
71
|
export * from './Status.js';
|
|
68
72
|
export * from './UpdateInventory.js';
|
|
69
73
|
export * from './VCenter.js';
|