@openshift-migration-advisor/planner-sdk 0.13.3 → 0.13.4-db4c7857bd8f

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.
Files changed (75) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +9 -3
  3. package/dist/apis/SizingApi.d.ts +61 -0
  4. package/dist/apis/SizingApi.js +74 -0
  5. package/dist/apis/SourceApi.d.ts +0 -30
  6. package/dist/apis/SourceApi.js +0 -36
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/SizingApi.d.ts +61 -0
  10. package/dist/esm/apis/SizingApi.js +70 -0
  11. package/dist/esm/apis/SourceApi.d.ts +0 -30
  12. package/dist/esm/apis/SourceApi.js +0 -36
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/ClusterFeatures.d.ts +54 -0
  16. package/dist/esm/models/ClusterFeatures.js +54 -0
  17. package/dist/esm/models/ClusterRequirementsRequest.d.ts +6 -23
  18. package/dist/esm/models/ClusterRequirementsRequest.js +6 -21
  19. package/dist/esm/models/ClusterUtilization.d.ts +68 -0
  20. package/dist/esm/models/ClusterUtilization.js +67 -0
  21. package/dist/esm/models/CpuOverCommitRatio.d.ts +27 -0
  22. package/dist/esm/models/CpuOverCommitRatio.js +45 -0
  23. package/dist/esm/models/InventoryData.d.ts +14 -0
  24. package/dist/esm/models/InventoryData.js +6 -0
  25. package/dist/esm/models/MemoryOverCommitRatio.d.ts +26 -0
  26. package/dist/esm/models/MemoryOverCommitRatio.js +44 -0
  27. package/dist/esm/models/StandaloneClusterRequirementsRequest.d.ts +114 -0
  28. package/dist/esm/models/StandaloneClusterRequirementsRequest.js +88 -0
  29. package/dist/esm/models/StandaloneClusterRequirementsResponse.d.ts +40 -0
  30. package/dist/esm/models/StandaloneClusterRequirementsResponse.js +49 -0
  31. package/dist/esm/models/index.d.ts +6 -0
  32. package/dist/esm/models/index.js +6 -0
  33. package/dist/models/ClusterFeatures.d.ts +54 -0
  34. package/dist/models/ClusterFeatures.js +62 -0
  35. package/dist/models/ClusterRequirementsRequest.d.ts +6 -23
  36. package/dist/models/ClusterRequirementsRequest.js +7 -22
  37. package/dist/models/ClusterUtilization.d.ts +68 -0
  38. package/dist/models/ClusterUtilization.js +74 -0
  39. package/dist/models/CpuOverCommitRatio.d.ts +27 -0
  40. package/dist/models/CpuOverCommitRatio.js +53 -0
  41. package/dist/models/InventoryData.d.ts +14 -0
  42. package/dist/models/InventoryData.js +6 -0
  43. package/dist/models/MemoryOverCommitRatio.d.ts +26 -0
  44. package/dist/models/MemoryOverCommitRatio.js +52 -0
  45. package/dist/models/StandaloneClusterRequirementsRequest.d.ts +114 -0
  46. package/dist/models/StandaloneClusterRequirementsRequest.js +96 -0
  47. package/dist/models/StandaloneClusterRequirementsResponse.d.ts +40 -0
  48. package/dist/models/StandaloneClusterRequirementsResponse.js +56 -0
  49. package/dist/models/index.d.ts +6 -0
  50. package/dist/models/index.js +6 -0
  51. package/docs/AccountApi.md +9 -0
  52. package/docs/ClusterFeatures.md +38 -0
  53. package/docs/ClusterRequirementsRequest.md +2 -2
  54. package/docs/ClusterUtilization.md +46 -0
  55. package/docs/CpuOverCommitRatio.md +33 -0
  56. package/docs/ImageApi.md +2 -0
  57. package/docs/InventoryData.md +4 -0
  58. package/docs/MemoryOverCommitRatio.md +33 -0
  59. package/docs/SizingApi.md +80 -0
  60. package/docs/SourceApi.md +0 -62
  61. package/docs/StandaloneClusterRequirementsRequest.md +59 -0
  62. package/docs/StandaloneClusterRequirementsResponse.md +37 -0
  63. package/package.json +1 -1
  64. package/src/apis/SizingApi.ts +114 -0
  65. package/src/apis/SourceApi.ts +0 -62
  66. package/src/apis/index.ts +1 -0
  67. package/src/models/ClusterFeatures.ts +94 -0
  68. package/src/models/ClusterRequirementsRequest.ts +23 -29
  69. package/src/models/ClusterUtilization.ts +120 -0
  70. package/src/models/CpuOverCommitRatio.ts +55 -0
  71. package/src/models/InventoryData.ts +30 -0
  72. package/src/models/MemoryOverCommitRatio.ts +54 -0
  73. package/src/models/StandaloneClusterRequirementsRequest.ts +194 -0
  74. package/src/models/StandaloneClusterRequirementsResponse.ts +90 -0
  75. package/src/models/index.ts +6 -0
@@ -0,0 +1,94 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface ClusterFeatures
20
+ */
21
+ export interface ClusterFeatures {
22
+ /**
23
+ * Whether DRS (Distributed Resource Scheduler) is enabled for this cluster
24
+ * @type {boolean}
25
+ * @memberof ClusterFeatures
26
+ */
27
+ drsEnabled?: boolean;
28
+ /**
29
+ * DRS automation mode for the cluster
30
+ * @type {ClusterFeaturesDrsModeEnum}
31
+ * @memberof ClusterFeatures
32
+ */
33
+ drsMode?: ClusterFeaturesDrsModeEnum;
34
+ /**
35
+ * Whether Storage DRS is enabled for this cluster
36
+ * @type {boolean}
37
+ * @memberof ClusterFeatures
38
+ */
39
+ storageDrsEnabled?: boolean;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const ClusterFeaturesDrsModeEnum = {
47
+ FullyAutomated: 'Fully Automated',
48
+ PartiallyAutomated: 'Partially Automated',
49
+ Manual: 'Manual',
50
+ None: 'None'
51
+ } as const;
52
+ export type ClusterFeaturesDrsModeEnum = typeof ClusterFeaturesDrsModeEnum[keyof typeof ClusterFeaturesDrsModeEnum];
53
+
54
+
55
+ /**
56
+ * Check if a given object implements the ClusterFeatures interface.
57
+ */
58
+ export function instanceOfClusterFeatures(value: object): value is ClusterFeatures {
59
+ return true;
60
+ }
61
+
62
+ export function ClusterFeaturesFromJSON(json: any): ClusterFeatures {
63
+ return ClusterFeaturesFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function ClusterFeaturesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterFeatures {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'drsEnabled': json['drsEnabled'] == null ? undefined : json['drsEnabled'],
73
+ 'drsMode': json['drsMode'] == null ? undefined : json['drsMode'],
74
+ 'storageDrsEnabled': json['storageDrsEnabled'] == null ? undefined : json['storageDrsEnabled'],
75
+ };
76
+ }
77
+
78
+ export function ClusterFeaturesToJSON(json: any): ClusterFeatures {
79
+ return ClusterFeaturesToJSONTyped(json, false);
80
+ }
81
+
82
+ export function ClusterFeaturesToJSONTyped(value?: ClusterFeatures | null, ignoreDiscriminator: boolean = false): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+
87
+ return {
88
+
89
+ 'drsEnabled': value['drsEnabled'],
90
+ 'drsMode': value['drsMode'],
91
+ 'storageDrsEnabled': value['storageDrsEnabled'],
92
+ };
93
+ }
94
+
@@ -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 {ClusterRequirementsRequestCpuOverCommitRatioEnum}
45
+ * @type {CpuOverCommitRatio}
31
46
  * @memberof ClusterRequirementsRequest
32
47
  */
33
- cpuOverCommitRatio: ClusterRequirementsRequestCpuOverCommitRatioEnum;
48
+ cpuOverCommitRatio: CpuOverCommitRatio;
34
49
  /**
35
50
  * Memory over-commit ratio (e.g., "1:2")
36
- * @type {ClusterRequirementsRequestMemoryOverCommitRatioEnum}
51
+ * @type {MemoryOverCommitRatio}
37
52
  * @memberof ClusterRequirementsRequest
38
53
  */
39
- memoryOverCommitRatio: ClusterRequirementsRequestMemoryOverCommitRatioEnum;
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,120 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface ClusterUtilization
20
+ */
21
+ export interface ClusterUtilization {
22
+ /**
23
+ * Average CPU utilization percentage (0-100)
24
+ * @type {number}
25
+ * @memberof ClusterUtilization
26
+ */
27
+ cpuAvg: number;
28
+ /**
29
+ * 95th percentile CPU utilization percentage (0-100)
30
+ * @type {number}
31
+ * @memberof ClusterUtilization
32
+ */
33
+ cpuP95: number;
34
+ /**
35
+ * Maximum CPU utilization percentage (0-100)
36
+ * @type {number}
37
+ * @memberof ClusterUtilization
38
+ */
39
+ cpuMax: number;
40
+ /**
41
+ * Average memory utilization percentage (0-100)
42
+ * @type {number}
43
+ * @memberof ClusterUtilization
44
+ */
45
+ memAvg: number;
46
+ /**
47
+ * 95th percentile memory utilization percentage (0-100)
48
+ * @type {number}
49
+ * @memberof ClusterUtilization
50
+ */
51
+ memP95: number;
52
+ /**
53
+ * Maximum memory utilization percentage (0-100)
54
+ * @type {number}
55
+ * @memberof ClusterUtilization
56
+ */
57
+ memMax: number;
58
+ /**
59
+ * Data coverage confidence percentage (0-100), calculated as vCPU-weighted coverage
60
+ * @type {number}
61
+ * @memberof ClusterUtilization
62
+ */
63
+ confidence: number;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the ClusterUtilization interface.
68
+ */
69
+ export function instanceOfClusterUtilization(value: object): value is ClusterUtilization {
70
+ if ((!('cpuAvg' in value) && !('cpu_avg' in value)) || (value['cpuAvg'] === undefined && value['cpu_avg'] === undefined)) return false;
71
+ if ((!('cpuP95' in value) && !('cpu_p95' in value)) || (value['cpuP95'] === undefined && value['cpu_p95'] === undefined)) return false;
72
+ if ((!('cpuMax' in value) && !('cpu_max' in value)) || (value['cpuMax'] === undefined && value['cpu_max'] === undefined)) return false;
73
+ if ((!('memAvg' in value) && !('mem_avg' in value)) || (value['memAvg'] === undefined && value['mem_avg'] === undefined)) return false;
74
+ if ((!('memP95' in value) && !('mem_p95' in value)) || (value['memP95'] === undefined && value['mem_p95'] === undefined)) return false;
75
+ if ((!('memMax' in value) && !('mem_max' in value)) || (value['memMax'] === undefined && value['mem_max'] === undefined)) return false;
76
+ if (!('confidence' in value) || value['confidence'] === undefined) return false;
77
+ return true;
78
+ }
79
+
80
+ export function ClusterUtilizationFromJSON(json: any): ClusterUtilization {
81
+ return ClusterUtilizationFromJSONTyped(json, false);
82
+ }
83
+
84
+ export function ClusterUtilizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterUtilization {
85
+ if (json == null) {
86
+ return json;
87
+ }
88
+ return {
89
+
90
+ 'cpuAvg': json['cpu_avg'],
91
+ 'cpuP95': json['cpu_p95'],
92
+ 'cpuMax': json['cpu_max'],
93
+ 'memAvg': json['mem_avg'],
94
+ 'memP95': json['mem_p95'],
95
+ 'memMax': json['mem_max'],
96
+ 'confidence': json['confidence'],
97
+ };
98
+ }
99
+
100
+ export function ClusterUtilizationToJSON(json: any): ClusterUtilization {
101
+ return ClusterUtilizationToJSONTyped(json, false);
102
+ }
103
+
104
+ export function ClusterUtilizationToJSONTyped(value?: ClusterUtilization | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'cpu_avg': value['cpuAvg'],
112
+ 'cpu_p95': value['cpuP95'],
113
+ 'cpu_max': value['cpuMax'],
114
+ 'mem_avg': value['memAvg'],
115
+ 'mem_p95': value['memP95'],
116
+ 'mem_max': value['memMax'],
117
+ 'confidence': value['confidence'],
118
+ };
119
+ }
120
+
@@ -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
+
@@ -27,6 +27,13 @@ import {
27
27
  InfraToJSON,
28
28
  InfraToJSONTyped,
29
29
  } from './Infra.js';
30
+ import type { ClusterUtilization } from './ClusterUtilization.js';
31
+ import {
32
+ ClusterUtilizationFromJSON,
33
+ ClusterUtilizationFromJSONTyped,
34
+ ClusterUtilizationToJSON,
35
+ ClusterUtilizationToJSONTyped,
36
+ } from './ClusterUtilization.js';
30
37
  import type { VMs } from './VMs.js';
31
38
  import {
32
39
  VMsFromJSON,
@@ -34,6 +41,13 @@ import {
34
41
  VMsToJSON,
35
42
  VMsToJSONTyped,
36
43
  } from './VMs.js';
44
+ import type { ClusterFeatures } from './ClusterFeatures.js';
45
+ import {
46
+ ClusterFeaturesFromJSON,
47
+ ClusterFeaturesFromJSONTyped,
48
+ ClusterFeaturesToJSON,
49
+ ClusterFeaturesToJSONTyped,
50
+ } from './ClusterFeatures.js';
37
51
 
38
52
  /**
39
53
  *
@@ -47,6 +61,18 @@ export interface InventoryData {
47
61
  * @memberof InventoryData
48
62
  */
49
63
  vcenter?: VCenter;
64
+ /**
65
+ *
66
+ * @type {ClusterFeatures}
67
+ * @memberof InventoryData
68
+ */
69
+ clusterFeatures?: ClusterFeatures;
70
+ /**
71
+ *
72
+ * @type {ClusterUtilization}
73
+ * @memberof InventoryData
74
+ */
75
+ clusterUtilization?: ClusterUtilization;
50
76
  /**
51
77
  *
52
78
  * @type {VMs}
@@ -81,6 +107,8 @@ export function InventoryDataFromJSONTyped(json: any, ignoreDiscriminator: boole
81
107
  return {
82
108
 
83
109
  'vcenter': json['vcenter'] == null ? undefined : VCenterFromJSON(json['vcenter']),
110
+ 'clusterFeatures': json['clusterFeatures'] == null ? undefined : ClusterFeaturesFromJSON(json['clusterFeatures']),
111
+ 'clusterUtilization': json['clusterUtilization'] == null ? undefined : ClusterUtilizationFromJSON(json['clusterUtilization']),
84
112
  'vms': VMsFromJSON(json['vms']),
85
113
  'infra': InfraFromJSON(json['infra']),
86
114
  };
@@ -98,6 +126,8 @@ export function InventoryDataToJSONTyped(value?: InventoryData | null, ignoreDis
98
126
  return {
99
127
 
100
128
  'vcenter': VCenterToJSON(value['vcenter']),
129
+ 'clusterFeatures': ClusterFeaturesToJSON(value['clusterFeatures']),
130
+ 'clusterUtilization': ClusterUtilizationToJSON(value['clusterUtilization']),
101
131
  'vms': VMsToJSON(value['vms']),
102
132
  'infra': InfraToJSON(value['infra']),
103
133
  };
@@ -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
+