@openshift-migration-advisor/planner-sdk 0.13.2 → 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 +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/ClusterFeatures.d.ts +54 -0
- package/dist/esm/models/ClusterFeatures.js +54 -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/Inventory.d.ts +6 -0
- package/dist/esm/models/Inventory.js +3 -1
- package/dist/esm/models/InventoryData.d.ts +7 -0
- package/dist/esm/models/InventoryData.js +3 -0
- package/dist/esm/models/JobStatus.d.ts +3 -3
- package/dist/esm/models/JobStatus.js +3 -3
- 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/ClusterFeatures.d.ts +54 -0
- package/dist/models/ClusterFeatures.js +62 -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/Inventory.d.ts +6 -0
- package/dist/models/Inventory.js +3 -1
- package/dist/models/InventoryData.d.ts +7 -0
- package/dist/models/InventoryData.js +3 -0
- package/dist/models/JobStatus.d.ts +3 -3
- package/dist/models/JobStatus.js +3 -3
- 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/ClusterFeatures.md +38 -0
- package/docs/ClusterRequirementsRequest.md +2 -2
- package/docs/CpuOverCommitRatio.md +33 -0
- package/docs/Inventory.md +2 -0
- package/docs/InventoryData.md +2 -0
- package/docs/JobStatus.md +1 -1
- 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/ClusterFeatures.ts +94 -0
- package/src/models/ClusterRequirementsRequest.ts +23 -29
- package/src/models/CpuOverCommitRatio.ts +55 -0
- package/src/models/Inventory.ts +9 -1
- package/src/models/InventoryData.ts +15 -0
- package/src/models/JobStatus.ts +3 -3
- 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/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
|
@@ -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 {
|
|
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
|
+
|
package/src/models/Inventory.ts
CHANGED
|
@@ -33,6 +33,12 @@ export interface Inventory {
|
|
|
33
33
|
* @memberof Inventory
|
|
34
34
|
*/
|
|
35
35
|
vcenterId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Version of the vCenter api. For example "8.0.3.0"
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Inventory
|
|
40
|
+
*/
|
|
41
|
+
vcenterVersion?: string;
|
|
36
42
|
/**
|
|
37
43
|
* Map of cluster names to their inventory data
|
|
38
44
|
* @type {{ [key: string]: InventoryData; }}
|
|
@@ -51,7 +57,7 @@ export interface Inventory {
|
|
|
51
57
|
* Check if a given object implements the Inventory interface.
|
|
52
58
|
*/
|
|
53
59
|
export function instanceOfInventory(value: object): value is Inventory {
|
|
54
|
-
if (!('vcenterId' in value) || value['vcenterId'] === undefined) return false;
|
|
60
|
+
if ((!('vcenterId' in value) && !('vcenter_id' in value)) || (value['vcenterId'] === undefined && value['vcenter_id'] === undefined)) return false;
|
|
55
61
|
if (!('clusters' in value) || value['clusters'] === undefined) return false;
|
|
56
62
|
return true;
|
|
57
63
|
}
|
|
@@ -67,6 +73,7 @@ export function InventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
67
73
|
return {
|
|
68
74
|
|
|
69
75
|
'vcenterId': json['vcenter_id'],
|
|
76
|
+
'vcenterVersion': json['vcenter_version'] == null ? undefined : json['vcenter_version'],
|
|
70
77
|
'clusters': (mapValues(json['clusters'], InventoryDataFromJSON)),
|
|
71
78
|
'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']),
|
|
72
79
|
};
|
|
@@ -84,6 +91,7 @@ export function InventoryToJSONTyped(value?: Inventory | null, ignoreDiscriminat
|
|
|
84
91
|
return {
|
|
85
92
|
|
|
86
93
|
'vcenter_id': value['vcenterId'],
|
|
94
|
+
'vcenter_version': value['vcenterVersion'],
|
|
87
95
|
'clusters': (mapValues(value['clusters'], InventoryDataToJSON)),
|
|
88
96
|
'vcenter': InventoryDataToJSON(value['vcenter']),
|
|
89
97
|
};
|
|
@@ -34,6 +34,13 @@ import {
|
|
|
34
34
|
VMsToJSON,
|
|
35
35
|
VMsToJSONTyped,
|
|
36
36
|
} from './VMs.js';
|
|
37
|
+
import type { ClusterFeatures } from './ClusterFeatures.js';
|
|
38
|
+
import {
|
|
39
|
+
ClusterFeaturesFromJSON,
|
|
40
|
+
ClusterFeaturesFromJSONTyped,
|
|
41
|
+
ClusterFeaturesToJSON,
|
|
42
|
+
ClusterFeaturesToJSONTyped,
|
|
43
|
+
} from './ClusterFeatures.js';
|
|
37
44
|
|
|
38
45
|
/**
|
|
39
46
|
*
|
|
@@ -47,6 +54,12 @@ export interface InventoryData {
|
|
|
47
54
|
* @memberof InventoryData
|
|
48
55
|
*/
|
|
49
56
|
vcenter?: VCenter;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @type {ClusterFeatures}
|
|
60
|
+
* @memberof InventoryData
|
|
61
|
+
*/
|
|
62
|
+
clusterFeatures?: ClusterFeatures;
|
|
50
63
|
/**
|
|
51
64
|
*
|
|
52
65
|
* @type {VMs}
|
|
@@ -81,6 +94,7 @@ export function InventoryDataFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
81
94
|
return {
|
|
82
95
|
|
|
83
96
|
'vcenter': json['vcenter'] == null ? undefined : VCenterFromJSON(json['vcenter']),
|
|
97
|
+
'clusterFeatures': json['clusterFeatures'] == null ? undefined : ClusterFeaturesFromJSON(json['clusterFeatures']),
|
|
84
98
|
'vms': VMsFromJSON(json['vms']),
|
|
85
99
|
'infra': InfraFromJSON(json['infra']),
|
|
86
100
|
};
|
|
@@ -98,6 +112,7 @@ export function InventoryDataToJSONTyped(value?: InventoryData | null, ignoreDis
|
|
|
98
112
|
return {
|
|
99
113
|
|
|
100
114
|
'vcenter': VCenterToJSON(value['vcenter']),
|
|
115
|
+
'clusterFeatures': ClusterFeaturesToJSON(value['clusterFeatures']),
|
|
101
116
|
'vms': VMsToJSON(value['vms']),
|
|
102
117
|
'infra': InfraToJSON(value['infra']),
|
|
103
118
|
};
|
package/src/models/JobStatus.ts
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
/**
|
|
17
17
|
* Job status:
|
|
18
18
|
* * `pending` - Job is queued
|
|
19
|
-
* * `
|
|
20
|
-
* * `
|
|
19
|
+
* * `validating` - Ingesting and validating RVTools file
|
|
20
|
+
* * `parsing` - Building inventory from validated data
|
|
21
21
|
* * `completed` - Assessment created successfully
|
|
22
22
|
* * `failed` - Job failed with error
|
|
23
23
|
* * `cancelled` - Job was cancelled
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
*/
|
|
27
27
|
export const JobStatus = {
|
|
28
28
|
Pending: 'pending',
|
|
29
|
-
Parsing: 'parsing',
|
|
30
29
|
Validating: 'validating',
|
|
30
|
+
Parsing: 'parsing',
|
|
31
31
|
Completed: 'completed',
|
|
32
32
|
Failed: 'failed',
|
|
33
33
|
Cancelled: 'cancelled'
|
|
@@ -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
|
+
|