@openshift-migration-advisor/planner-sdk 0.8.0 → 0.9.0-a26ff9932eeb
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 +8 -2
- package/.openapi-generator/VERSION +1 -1
- package/README.md +8 -4
- package/dist/apis/AssessmentApi.d.ts +50 -5
- package/dist/apis/AssessmentApi.js +45 -1
- package/dist/esm/apis/AssessmentApi.d.ts +50 -5
- package/dist/esm/apis/AssessmentApi.js +46 -2
- package/dist/esm/models/ClusterRequirementsRequest.d.ts +9 -3
- package/dist/esm/models/ClusterRequirementsRequest.js +2 -0
- package/dist/esm/models/ComplexityOSNameEntry.d.ts +1 -1
- package/dist/esm/models/ComplexityOSScoreEntry.d.ts +1 -1
- package/dist/esm/models/EstimationContext.d.ts +40 -0
- package/dist/esm/models/EstimationContext.js +43 -0
- package/dist/esm/models/EstimationDetail.d.ts +14 -2
- package/dist/esm/models/EstimationDetail.js +5 -3
- package/dist/esm/models/MigrationComplexityResponse.d.ts +2 -2
- package/dist/esm/models/MigrationEstimationByComplexityResponse.d.ts +50 -0
- package/dist/esm/models/MigrationEstimationByComplexityResponse.js +51 -0
- package/dist/esm/models/MigrationEstimationRequest.d.ts +16 -0
- package/dist/esm/models/MigrationEstimationRequest.js +4 -0
- package/dist/esm/models/OsDiskEstimationEntry.d.ts +53 -0
- package/dist/esm/models/OsDiskEstimationEntry.js +55 -0
- package/dist/esm/models/SchemaEstimationResult.d.ts +47 -0
- package/dist/esm/models/{MigrationEstimationResponse.js → SchemaEstimationResult.js} +15 -11
- package/dist/esm/models/VMs.d.ts +9 -0
- package/dist/esm/models/VMs.js +2 -0
- package/dist/esm/models/index.d.ts +4 -1
- package/dist/esm/models/index.js +4 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ClusterRequirementsRequest.d.ts +9 -3
- package/dist/models/ClusterRequirementsRequest.js +2 -0
- package/dist/models/ComplexityOSNameEntry.d.ts +1 -1
- package/dist/models/ComplexityOSScoreEntry.d.ts +1 -1
- package/dist/models/EstimationContext.d.ts +40 -0
- package/dist/models/EstimationContext.js +50 -0
- package/dist/models/EstimationDetail.d.ts +14 -2
- package/dist/models/EstimationDetail.js +5 -3
- package/dist/models/MigrationComplexityResponse.d.ts +2 -2
- package/dist/models/MigrationEstimationByComplexityResponse.d.ts +50 -0
- package/dist/models/MigrationEstimationByComplexityResponse.js +58 -0
- package/dist/models/MigrationEstimationRequest.d.ts +16 -0
- package/dist/models/MigrationEstimationRequest.js +4 -0
- package/dist/models/OsDiskEstimationEntry.d.ts +53 -0
- package/dist/models/OsDiskEstimationEntry.js +62 -0
- package/dist/models/SchemaEstimationResult.d.ts +47 -0
- package/dist/models/SchemaEstimationResult.js +60 -0
- package/dist/models/VMs.d.ts +9 -0
- package/dist/models/VMs.js +2 -0
- package/dist/models/index.d.ts +4 -1
- package/dist/models/index.js +4 -1
- package/dist/runtime.js +1 -1
- package/docs/AssessmentApi.md +79 -3
- package/docs/ClusterRequirementsRequest.md +2 -0
- package/docs/EstimationContext.md +36 -0
- package/docs/EstimationDetail.md +5 -1
- package/docs/MigrationEstimationByComplexityResponse.md +38 -0
- package/docs/MigrationEstimationRequest.md +4 -0
- package/docs/OsDiskEstimationEntry.md +40 -0
- package/docs/{MigrationEstimationResponse.md → SchemaEstimationResult.md} +9 -7
- package/docs/VMs.md +2 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +95 -8
- package/src/models/ClusterRequirementsRequest.ts +11 -3
- package/src/models/ComplexityOSNameEntry.ts +1 -1
- package/src/models/ComplexityOSScoreEntry.ts +1 -1
- package/src/models/EstimationContext.ts +73 -0
- package/src/models/EstimationDetail.ts +19 -4
- package/src/models/MigrationComplexityResponse.ts +2 -2
- package/src/models/MigrationEstimationByComplexityResponse.ts +98 -0
- package/src/models/MigrationEstimationRequest.ts +18 -0
- package/src/models/OsDiskEstimationEntry.ts +100 -0
- package/src/models/SchemaEstimationResult.ts +92 -0
- package/src/models/VMs.ts +9 -0
- package/src/models/index.ts +4 -1
- package/src/runtime.ts +1 -1
- package/dist/esm/models/MigrationEstimationResponse.d.ts +0 -41
- package/dist/models/MigrationEstimationResponse.d.ts +0 -41
- package/dist/models/MigrationEstimationResponse.js +0 -56
- package/src/models/MigrationEstimationResponse.ts +0 -83
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# EstimationContext
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`schemas` | Array<string>
|
|
10
|
+
`params` | { [key: string]: number; }
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { EstimationContext } from '@openshift-migration-advisor/planner-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"schemas": null,
|
|
20
|
+
"params": null,
|
|
21
|
+
} satisfies EstimationContext
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as EstimationContext
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
package/docs/EstimationDetail.md
CHANGED
|
@@ -8,6 +8,8 @@ Detailed estimation result from a single calculator
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`duration` | string
|
|
11
|
+
`minDuration` | string
|
|
12
|
+
`maxDuration` | string
|
|
11
13
|
`reason` | string
|
|
12
14
|
|
|
13
15
|
## Example
|
|
@@ -18,7 +20,9 @@ import type { EstimationDetail } from '@openshift-migration-advisor/planner-sdk'
|
|
|
18
20
|
// TODO: Update the object below with actual values
|
|
19
21
|
const example = {
|
|
20
22
|
"duration": 3h40m0s,
|
|
21
|
-
"
|
|
23
|
+
"minDuration": 8m20s,
|
|
24
|
+
"maxDuration": 33m20s,
|
|
25
|
+
"reason": null,
|
|
22
26
|
} satisfies EstimationDetail
|
|
23
27
|
|
|
24
28
|
console.log(example)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# MigrationEstimationByComplexityResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`complexityByOsDisk` | [Array<OsDiskEstimationEntry>](OsDiskEstimationEntry.md)
|
|
10
|
+
`complexityMatrix` | { [key: string]: { [key: string]: number; }; }
|
|
11
|
+
`estimationContext` | [EstimationContext](EstimationContext.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { MigrationEstimationByComplexityResponse } from '@openshift-migration-advisor/planner-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"complexityByOsDisk": null,
|
|
21
|
+
"complexityMatrix": null,
|
|
22
|
+
"estimationContext": null,
|
|
23
|
+
} satisfies MigrationEstimationByComplexityResponse
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as MigrationEstimationByComplexityResponse
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|
|
@@ -8,6 +8,8 @@ Request payload for calculating migration time estimation
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`clusterId` | string
|
|
11
|
+
`estimationSchema` | Array<string>
|
|
12
|
+
`params` | { [key: string]: any; }
|
|
11
13
|
|
|
12
14
|
## Example
|
|
13
15
|
|
|
@@ -17,6 +19,8 @@ import type { MigrationEstimationRequest } from '@openshift-migration-advisor/pl
|
|
|
17
19
|
// TODO: Update the object below with actual values
|
|
18
20
|
const example = {
|
|
19
21
|
"clusterId": domain-c8,
|
|
22
|
+
"estimationSchema": null,
|
|
23
|
+
"params": null,
|
|
20
24
|
} satisfies MigrationEstimationRequest
|
|
21
25
|
|
|
22
26
|
console.log(example)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# OsDiskEstimationEntry
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`score` | number
|
|
10
|
+
`vmCount` | number
|
|
11
|
+
`totalDiskSizeTB` | number
|
|
12
|
+
`estimation` | [{ [key: string]: SchemaEstimationResult; }](SchemaEstimationResult.md)
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { OsDiskEstimationEntry } from '@openshift-migration-advisor/planner-sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"score": null,
|
|
22
|
+
"vmCount": null,
|
|
23
|
+
"totalDiskSizeTB": null,
|
|
24
|
+
"estimation": null,
|
|
25
|
+
} satisfies OsDiskEstimationEntry
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as OsDiskEstimationEntry
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# SchemaEstimationResult
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Estimation results for a single schema
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
|
-
`
|
|
10
|
+
`minTotalDuration` | string
|
|
11
|
+
`maxTotalDuration` | string
|
|
11
12
|
`breakdown` | [{ [key: string]: EstimationDetail; }](EstimationDetail.md)
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
15
16
|
```typescript
|
|
16
|
-
import type {
|
|
17
|
+
import type { SchemaEstimationResult } from '@openshift-migration-advisor/planner-sdk'
|
|
17
18
|
|
|
18
19
|
// TODO: Update the object below with actual values
|
|
19
20
|
const example = {
|
|
20
|
-
"
|
|
21
|
+
"minTotalDuration": 1h20m0s,
|
|
22
|
+
"maxTotalDuration": 5h20m0s,
|
|
21
23
|
"breakdown": null,
|
|
22
|
-
} satisfies
|
|
24
|
+
} satisfies SchemaEstimationResult
|
|
23
25
|
|
|
24
26
|
console.log(example)
|
|
25
27
|
|
|
@@ -28,7 +30,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
28
30
|
console.log(exampleJSON)
|
|
29
31
|
|
|
30
32
|
// Parse the JSON string back to an object
|
|
31
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as SchemaEstimationResult
|
|
32
34
|
console.log(exampleParsed)
|
|
33
35
|
```
|
|
34
36
|
|
package/docs/VMs.md
CHANGED
|
@@ -17,6 +17,7 @@ Name | Type
|
|
|
17
17
|
`distributionByMemoryTier` | { [key: string]: number; }
|
|
18
18
|
`distributionByNicCount` | { [key: string]: number; }
|
|
19
19
|
`distributionByComplexity` | { [key: string]: number; }
|
|
20
|
+
`complexityDistribution` | [{ [key: string]: DiskSizeTierSummary; }](DiskSizeTierSummary.md)
|
|
20
21
|
`ramGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
21
22
|
`diskGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
22
23
|
`diskCount` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
@@ -45,6 +46,7 @@ const example = {
|
|
|
45
46
|
"distributionByMemoryTier": null,
|
|
46
47
|
"distributionByNicCount": null,
|
|
47
48
|
"distributionByComplexity": null,
|
|
49
|
+
"complexityDistribution": null,
|
|
48
50
|
"ramGB": null,
|
|
49
51
|
"diskGB": null,
|
|
50
52
|
"diskCount": null,
|
package/package.json
CHANGED
|
@@ -22,8 +22,9 @@ import type {
|
|
|
22
22
|
ClusterRequirementsResponse,
|
|
23
23
|
MigrationComplexityRequest,
|
|
24
24
|
MigrationComplexityResponse,
|
|
25
|
+
MigrationEstimationByComplexityResponse,
|
|
25
26
|
MigrationEstimationRequest,
|
|
26
|
-
|
|
27
|
+
SchemaEstimationResult,
|
|
27
28
|
} from '../models/index.js';
|
|
28
29
|
import {
|
|
29
30
|
AssessmentFromJSON,
|
|
@@ -40,10 +41,12 @@ import {
|
|
|
40
41
|
MigrationComplexityRequestToJSON,
|
|
41
42
|
MigrationComplexityResponseFromJSON,
|
|
42
43
|
MigrationComplexityResponseToJSON,
|
|
44
|
+
MigrationEstimationByComplexityResponseFromJSON,
|
|
45
|
+
MigrationEstimationByComplexityResponseToJSON,
|
|
43
46
|
MigrationEstimationRequestFromJSON,
|
|
44
47
|
MigrationEstimationRequestToJSON,
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
SchemaEstimationResultFromJSON,
|
|
49
|
+
SchemaEstimationResultToJSON,
|
|
47
50
|
} from '../models/index.js';
|
|
48
51
|
|
|
49
52
|
export interface CalculateAssessmentClusterRequirementsRequest {
|
|
@@ -61,6 +64,11 @@ export interface CalculateMigrationEstimationRequest {
|
|
|
61
64
|
migrationEstimationRequest: MigrationEstimationRequest;
|
|
62
65
|
}
|
|
63
66
|
|
|
67
|
+
export interface CalculateMigrationEstimationByComplexityRequest {
|
|
68
|
+
id: string;
|
|
69
|
+
migrationEstimationRequest: MigrationEstimationRequest;
|
|
70
|
+
}
|
|
71
|
+
|
|
64
72
|
export interface CreateAssessmentRequest {
|
|
65
73
|
assessmentForm: AssessmentForm;
|
|
66
74
|
}
|
|
@@ -154,12 +162,36 @@ export interface AssessmentApiInterface {
|
|
|
154
162
|
* @throws {RequiredError}
|
|
155
163
|
* @memberof AssessmentApiInterface
|
|
156
164
|
*/
|
|
157
|
-
calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
165
|
+
calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: SchemaEstimationResult; }>>;
|
|
158
166
|
|
|
159
167
|
/**
|
|
160
168
|
* Calculate migration time estimation for an assessment
|
|
161
169
|
*/
|
|
162
|
-
calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
170
|
+
calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: SchemaEstimationResult; }>;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Creates request options for calculateMigrationEstimationByComplexity without sending the request
|
|
174
|
+
* @param {string} id ID of the assessment
|
|
175
|
+
* @param {MigrationEstimationRequest} migrationEstimationRequest
|
|
176
|
+
* @throws {RequiredError}
|
|
177
|
+
* @memberof AssessmentApiInterface
|
|
178
|
+
*/
|
|
179
|
+
calculateMigrationEstimationByComplexityRequestOpts(requestParameters: CalculateMigrationEstimationByComplexityRequest): Promise<runtime.RequestOpts>;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Calculate migration time estimation broken down by combined OS+Disk complexity
|
|
183
|
+
* @param {string} id ID of the assessment
|
|
184
|
+
* @param {MigrationEstimationRequest} migrationEstimationRequest
|
|
185
|
+
* @param {*} [options] Override http request option.
|
|
186
|
+
* @throws {RequiredError}
|
|
187
|
+
* @memberof AssessmentApiInterface
|
|
188
|
+
*/
|
|
189
|
+
calculateMigrationEstimationByComplexityRaw(requestParameters: CalculateMigrationEstimationByComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationByComplexityResponse>>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Calculate migration time estimation broken down by combined OS+Disk complexity
|
|
193
|
+
*/
|
|
194
|
+
calculateMigrationEstimationByComplexity(requestParameters: CalculateMigrationEstimationByComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationByComplexityResponse>;
|
|
163
195
|
|
|
164
196
|
/**
|
|
165
197
|
* Creates request options for createAssessment without sending the request
|
|
@@ -430,21 +462,76 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
430
462
|
/**
|
|
431
463
|
* Calculate migration time estimation for an assessment
|
|
432
464
|
*/
|
|
433
|
-
async calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
465
|
+
async calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: SchemaEstimationResult; }>> {
|
|
434
466
|
const requestOptions = await this.calculateMigrationEstimationRequestOpts(requestParameters);
|
|
435
467
|
const response = await this.request(requestOptions, initOverrides);
|
|
436
468
|
|
|
437
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
469
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, SchemaEstimationResultFromJSON));
|
|
438
470
|
}
|
|
439
471
|
|
|
440
472
|
/**
|
|
441
473
|
* Calculate migration time estimation for an assessment
|
|
442
474
|
*/
|
|
443
|
-
async calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
475
|
+
async calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: SchemaEstimationResult; }> {
|
|
444
476
|
const response = await this.calculateMigrationEstimationRaw(requestParameters, initOverrides);
|
|
445
477
|
return await response.value();
|
|
446
478
|
}
|
|
447
479
|
|
|
480
|
+
/**
|
|
481
|
+
* Creates request options for calculateMigrationEstimationByComplexity without sending the request
|
|
482
|
+
*/
|
|
483
|
+
async calculateMigrationEstimationByComplexityRequestOpts(requestParameters: CalculateMigrationEstimationByComplexityRequest): Promise<runtime.RequestOpts> {
|
|
484
|
+
if (requestParameters['id'] == null) {
|
|
485
|
+
throw new runtime.RequiredError(
|
|
486
|
+
'id',
|
|
487
|
+
'Required parameter "id" was null or undefined when calling calculateMigrationEstimationByComplexity().'
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if (requestParameters['migrationEstimationRequest'] == null) {
|
|
492
|
+
throw new runtime.RequiredError(
|
|
493
|
+
'migrationEstimationRequest',
|
|
494
|
+
'Required parameter "migrationEstimationRequest" was null or undefined when calling calculateMigrationEstimationByComplexity().'
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const queryParameters: any = {};
|
|
499
|
+
|
|
500
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
501
|
+
|
|
502
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
let urlPath = `/api/v1/assessments/{id}/migration-estimation/by-complexity`;
|
|
506
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
507
|
+
|
|
508
|
+
return {
|
|
509
|
+
path: urlPath,
|
|
510
|
+
method: 'POST',
|
|
511
|
+
headers: headerParameters,
|
|
512
|
+
query: queryParameters,
|
|
513
|
+
body: MigrationEstimationRequestToJSON(requestParameters['migrationEstimationRequest']),
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Calculate migration time estimation broken down by combined OS+Disk complexity
|
|
519
|
+
*/
|
|
520
|
+
async calculateMigrationEstimationByComplexityRaw(requestParameters: CalculateMigrationEstimationByComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationByComplexityResponse>> {
|
|
521
|
+
const requestOptions = await this.calculateMigrationEstimationByComplexityRequestOpts(requestParameters);
|
|
522
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
523
|
+
|
|
524
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MigrationEstimationByComplexityResponseFromJSON(jsonValue));
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Calculate migration time estimation broken down by combined OS+Disk complexity
|
|
529
|
+
*/
|
|
530
|
+
async calculateMigrationEstimationByComplexity(requestParameters: CalculateMigrationEstimationByComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationByComplexityResponse> {
|
|
531
|
+
const response = await this.calculateMigrationEstimationByComplexityRaw(requestParameters, initOverrides);
|
|
532
|
+
return await response.value();
|
|
533
|
+
}
|
|
534
|
+
|
|
448
535
|
/**
|
|
449
536
|
* Creates request options for createAssessment without sending the request
|
|
450
537
|
*/
|
|
@@ -56,7 +56,7 @@ export interface ClusterRequirementsRequest {
|
|
|
56
56
|
*/
|
|
57
57
|
workerNodeThreads?: number;
|
|
58
58
|
/**
|
|
59
|
-
* Allow workload scheduling on control plane nodes
|
|
59
|
+
* Allow workload scheduling on control plane nodes (default: false)
|
|
60
60
|
* @type {boolean}
|
|
61
61
|
* @memberof ClusterRequirementsRequest
|
|
62
62
|
*/
|
|
@@ -68,17 +68,23 @@ export interface ClusterRequirementsRequest {
|
|
|
68
68
|
*/
|
|
69
69
|
controlPlaneCPU?: number;
|
|
70
70
|
/**
|
|
71
|
-
* Memory
|
|
71
|
+
* Memory in GB per control plane node (default: 16)
|
|
72
72
|
* @type {number}
|
|
73
73
|
* @memberof ClusterRequirementsRequest
|
|
74
74
|
*/
|
|
75
75
|
controlPlaneMemory?: number;
|
|
76
76
|
/**
|
|
77
|
-
* Number of control plane nodes
|
|
77
|
+
* Number of control plane nodes: 1 or 3 (default: 3)
|
|
78
78
|
* @type {ClusterRequirementsRequestControlPlaneNodeCountEnum}
|
|
79
79
|
* @memberof ClusterRequirementsRequest
|
|
80
80
|
*/
|
|
81
81
|
controlPlaneNodeCount?: ClusterRequirementsRequestControlPlaneNodeCountEnum;
|
|
82
|
+
/**
|
|
83
|
+
* If true, control plane is hosted externally. Incompatible with control plane fields (default: false)
|
|
84
|
+
* @type {boolean}
|
|
85
|
+
* @memberof ClusterRequirementsRequest
|
|
86
|
+
*/
|
|
87
|
+
hostedControlPlane?: boolean;
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
|
|
@@ -145,6 +151,7 @@ export function ClusterRequirementsRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
145
151
|
'controlPlaneCPU': json['controlPlaneCPU'] == null ? undefined : json['controlPlaneCPU'],
|
|
146
152
|
'controlPlaneMemory': json['controlPlaneMemory'] == null ? undefined : json['controlPlaneMemory'],
|
|
147
153
|
'controlPlaneNodeCount': json['controlPlaneNodeCount'] == null ? undefined : json['controlPlaneNodeCount'],
|
|
154
|
+
'hostedControlPlane': json['hostedControlPlane'] == null ? undefined : json['hostedControlPlane'],
|
|
148
155
|
};
|
|
149
156
|
}
|
|
150
157
|
|
|
@@ -169,6 +176,7 @@ export function ClusterRequirementsRequestToJSONTyped(value?: ClusterRequirement
|
|
|
169
176
|
'controlPlaneCPU': value['controlPlaneCPU'],
|
|
170
177
|
'controlPlaneMemory': value['controlPlaneMemory'],
|
|
171
178
|
'controlPlaneNodeCount': value['controlPlaneNodeCount'],
|
|
179
|
+
'hostedControlPlane': value['hostedControlPlane'],
|
|
172
180
|
};
|
|
173
181
|
}
|
|
174
182
|
|
|
@@ -27,7 +27,7 @@ export interface ComplexityOSNameEntry {
|
|
|
27
27
|
*/
|
|
28
28
|
osName: string;
|
|
29
29
|
/**
|
|
30
|
-
* Complexity score assigned by ClassifyOS. 0 =
|
|
30
|
+
* Complexity score assigned by ClassifyOS. 0 = unknown, 1 = least complex, 4 = most complex.
|
|
31
31
|
*
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof ComplexityOSNameEntry
|
|
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime.js';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface ComplexityOSScoreEntry {
|
|
22
22
|
/**
|
|
23
|
-
* Complexity score from 0 to 4, where 1 indicates the least complex OS to migrate and 0 indicates an OS
|
|
23
|
+
* Complexity score from 0 to 4, where 1 indicates the least complex OS to migrate and 0 indicates an OS with unknown complexity.
|
|
24
24
|
*
|
|
25
25
|
* @type {number}
|
|
26
26
|
* @memberof ComplexityOSScoreEntry
|
|
@@ -0,0 +1,73 @@
|
|
|
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: undefined
|
|
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 EstimationContext
|
|
20
|
+
*/
|
|
21
|
+
export interface EstimationContext {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {Array<string>}
|
|
25
|
+
* @memberof EstimationContext
|
|
26
|
+
*/
|
|
27
|
+
schemas?: Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {{ [key: string]: number; }}
|
|
31
|
+
* @memberof EstimationContext
|
|
32
|
+
*/
|
|
33
|
+
params?: { [key: string]: number; };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the EstimationContext interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfEstimationContext(value: object): value is EstimationContext {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function EstimationContextFromJSON(json: any): EstimationContext {
|
|
44
|
+
return EstimationContextFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function EstimationContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): EstimationContext {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'schemas': json['schemas'] == null ? undefined : json['schemas'],
|
|
54
|
+
'params': json['params'] == null ? undefined : json['params'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function EstimationContextToJSON(json: any): EstimationContext {
|
|
59
|
+
return EstimationContextToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function EstimationContextToJSONTyped(value?: EstimationContext | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'schemas': value['schemas'],
|
|
70
|
+
'params': value['params'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -20,11 +20,23 @@ import { mapValues } from '../runtime.js';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface EstimationDetail {
|
|
22
22
|
/**
|
|
23
|
-
* Estimated duration for this component (
|
|
23
|
+
* Estimated duration for this component (point calculators only)
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof EstimationDetail
|
|
26
26
|
*/
|
|
27
|
-
duration
|
|
27
|
+
duration?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Minimum estimated duration (ranged calculators only)
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof EstimationDetail
|
|
32
|
+
*/
|
|
33
|
+
minDuration?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Maximum estimated duration (ranged calculators only)
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof EstimationDetail
|
|
38
|
+
*/
|
|
39
|
+
maxDuration?: string;
|
|
28
40
|
/**
|
|
29
41
|
* Explanation of how the estimation was calculated
|
|
30
42
|
* @type {string}
|
|
@@ -37,7 +49,6 @@ export interface EstimationDetail {
|
|
|
37
49
|
* Check if a given object implements the EstimationDetail interface.
|
|
38
50
|
*/
|
|
39
51
|
export function instanceOfEstimationDetail(value: object): value is EstimationDetail {
|
|
40
|
-
if (!('duration' in value) || value['duration'] === undefined) return false;
|
|
41
52
|
if (!('reason' in value) || value['reason'] === undefined) return false;
|
|
42
53
|
return true;
|
|
43
54
|
}
|
|
@@ -52,7 +63,9 @@ export function EstimationDetailFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
52
63
|
}
|
|
53
64
|
return {
|
|
54
65
|
|
|
55
|
-
'duration': json['duration'],
|
|
66
|
+
'duration': json['duration'] == null ? undefined : json['duration'],
|
|
67
|
+
'minDuration': json['minDuration'] == null ? undefined : json['minDuration'],
|
|
68
|
+
'maxDuration': json['maxDuration'] == null ? undefined : json['maxDuration'],
|
|
56
69
|
'reason': json['reason'],
|
|
57
70
|
};
|
|
58
71
|
}
|
|
@@ -69,6 +82,8 @@ export function EstimationDetailToJSONTyped(value?: EstimationDetail | null, ign
|
|
|
69
82
|
return {
|
|
70
83
|
|
|
71
84
|
'duration': value['duration'],
|
|
85
|
+
'minDuration': value['minDuration'],
|
|
86
|
+
'maxDuration': value['maxDuration'],
|
|
72
87
|
'reason': value['reason'],
|
|
73
88
|
};
|
|
74
89
|
}
|
|
@@ -49,7 +49,7 @@ export interface MigrationComplexityResponse {
|
|
|
49
49
|
*/
|
|
50
50
|
complexityByDisk: Array<ComplexityDiskScoreEntry>;
|
|
51
51
|
/**
|
|
52
|
-
* OS complexity scores, one entry per score level (0-4). Score 1 indicates the least complex OS to migrate; score 0 indicates an OS
|
|
52
|
+
* OS complexity scores, one entry per score level (0-4). Score 1 indicates the least complex OS to migrate; score 0 indicates an OS with unknown complexity. All five score levels are always present.
|
|
53
53
|
*
|
|
54
54
|
* @type {Array<ComplexityOSScoreEntry>}
|
|
55
55
|
* @memberof MigrationComplexityResponse
|
|
@@ -63,7 +63,7 @@ export interface MigrationComplexityResponse {
|
|
|
63
63
|
*/
|
|
64
64
|
diskSizeRatings: { [key: string]: number; };
|
|
65
65
|
/**
|
|
66
|
-
* Per-OS-name score for every OS found in this cluster's inventory. Keys are the OS name strings exactly as they appear in vms.osInfo; values are the numeric complexity score assigned by ClassifyOS (0 =
|
|
66
|
+
* Per-OS-name score for every OS found in this cluster's inventory. Keys are the OS name strings exactly as they appear in vms.osInfo; values are the numeric complexity score assigned by ClassifyOS (0 = unknown, 1-4 = increasing complexity). The map contains one entry per distinct OS name in the cluster, regardless of how many VMs run it.
|
|
67
67
|
*
|
|
68
68
|
* @type {{ [key: string]: number; }}
|
|
69
69
|
* @memberof MigrationComplexityResponse
|