@openshift-migration-advisor/planner-sdk 0.10.0-fa4e0ff47672 → 0.11.0
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 +2 -0
- package/README.md +3 -2
- package/dist/apis/AccountApi.js +9 -9
- package/dist/apis/AssessmentApi.d.ts +5 -13
- package/dist/apis/AssessmentApi.js +8 -8
- package/dist/apis/ImageApi.js +2 -2
- package/dist/apis/JobApi.js +2 -2
- package/dist/apis/SourceApi.js +4 -4
- package/dist/esm/apis/AccountApi.js +9 -9
- package/dist/esm/apis/AssessmentApi.d.ts +5 -13
- package/dist/esm/apis/AssessmentApi.js +9 -9
- package/dist/esm/apis/ImageApi.js +2 -2
- package/dist/esm/apis/JobApi.js +2 -2
- package/dist/esm/apis/SourceApi.js +4 -4
- package/dist/esm/models/MigrationEstimationRequest.d.ts +1 -1
- package/dist/esm/models/MigrationEstimationResponse.d.ts +43 -0
- package/dist/esm/models/MigrationEstimationResponse.js +50 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/MigrationEstimationRequest.d.ts +1 -1
- package/dist/models/MigrationEstimationResponse.d.ts +43 -0
- package/dist/models/MigrationEstimationResponse.js +57 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/AssessmentApi.md +2 -2
- package/docs/MigrationEstimationResponse.md +37 -0
- package/package.json +1 -1
- package/src/apis/AccountApi.ts +9 -9
- package/src/apis/AssessmentApi.ts +15 -15
- package/src/apis/ImageApi.ts +2 -2
- package/src/apis/JobApi.ts +2 -2
- package/src/apis/SourceApi.ts +4 -4
- package/src/models/MigrationEstimationRequest.ts +1 -1
- package/src/models/MigrationEstimationResponse.ts +91 -0
- package/src/models/index.ts +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import { mapValues } from '../runtime.js';
|
|
15
|
+
import { SchemaEstimationResultFromJSON, SchemaEstimationResultToJSON, } from './SchemaEstimationResult.js';
|
|
16
|
+
import { EstimationContextFromJSON, EstimationContextToJSON, } from './EstimationContext.js';
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the MigrationEstimationResponse interface.
|
|
19
|
+
*/
|
|
20
|
+
export function instanceOfMigrationEstimationResponse(value) {
|
|
21
|
+
if (!('estimation' in value) || value['estimation'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('estimationContext' in value) || value['estimationContext'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
export function MigrationEstimationResponseFromJSON(json) {
|
|
28
|
+
return MigrationEstimationResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
export function MigrationEstimationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'estimation': (mapValues(json['estimation'], SchemaEstimationResultFromJSON)),
|
|
36
|
+
'estimationContext': EstimationContextFromJSON(json['estimationContext']),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function MigrationEstimationResponseToJSON(json) {
|
|
40
|
+
return MigrationEstimationResponseToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
export function MigrationEstimationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'estimation': (mapValues(value['estimation'], SchemaEstimationResultToJSON)),
|
|
48
|
+
'estimationContext': EstimationContextToJSON(value['estimationContext']),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -36,6 +36,7 @@ export * from './MigrationComplexityRequest.js';
|
|
|
36
36
|
export * from './MigrationComplexityResponse.js';
|
|
37
37
|
export * from './MigrationEstimationByComplexityResponse.js';
|
|
38
38
|
export * from './MigrationEstimationRequest.js';
|
|
39
|
+
export * from './MigrationEstimationResponse.js';
|
|
39
40
|
export * from './MigrationIssue.js';
|
|
40
41
|
export * from './ModelError.js';
|
|
41
42
|
export * from './Network.js';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -38,6 +38,7 @@ export * from './MigrationComplexityRequest.js';
|
|
|
38
38
|
export * from './MigrationComplexityResponse.js';
|
|
39
39
|
export * from './MigrationEstimationByComplexityResponse.js';
|
|
40
40
|
export * from './MigrationEstimationRequest.js';
|
|
41
|
+
export * from './MigrationEstimationResponse.js';
|
|
41
42
|
export * from './MigrationIssue.js';
|
|
42
43
|
export * from './ModelError.js';
|
|
43
44
|
export * from './Network.js';
|
|
@@ -29,7 +29,7 @@ export interface MigrationEstimationRequest {
|
|
|
29
29
|
*/
|
|
30
30
|
estimationSchema?: Array<string>;
|
|
31
31
|
/**
|
|
32
|
-
* Optional calculator parameter overrides. Keys must match known calculator param names (e.g. "transfer_rate_mbps", "work_hours_per_day", "troubleshoot_mins_per_vm", "post_migration_engineers"). User-supplied values take precedence over both defaults and inventory-derived values. Unknown keys are
|
|
32
|
+
* Optional calculator parameter overrides. Keys must match known calculator param names (e.g. "transfer_rate_mbps", "work_hours_per_day", "troubleshoot_mins_per_vm", "post_migration_engineers"). User-supplied values take precedence over both defaults and inventory-derived values. Unknown keys are rejected with HTTP 400.
|
|
33
33
|
*
|
|
34
34
|
* @type {{ [key: string]: any; }}
|
|
35
35
|
* @memberof MigrationEstimationRequest
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenShift Migration Advisor API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { SchemaEstimationResult } from './SchemaEstimationResult.js';
|
|
13
|
+
import type { EstimationContext } from './EstimationContext.js';
|
|
14
|
+
/**
|
|
15
|
+
* Migration estimation result, including per-schema results and the parameters used.
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface MigrationEstimationResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface MigrationEstimationResponse {
|
|
21
|
+
/**
|
|
22
|
+
* Estimation results keyed by schema name (e.g. "network-based", "storage-offload").
|
|
23
|
+
* @type {{ [key: string]: SchemaEstimationResult; }}
|
|
24
|
+
* @memberof MigrationEstimationResponse
|
|
25
|
+
*/
|
|
26
|
+
estimation: {
|
|
27
|
+
[key: string]: SchemaEstimationResult;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {EstimationContext}
|
|
32
|
+
* @memberof MigrationEstimationResponse
|
|
33
|
+
*/
|
|
34
|
+
estimationContext: EstimationContext;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the MigrationEstimationResponse interface.
|
|
38
|
+
*/
|
|
39
|
+
export declare function instanceOfMigrationEstimationResponse(value: object): value is MigrationEstimationResponse;
|
|
40
|
+
export declare function MigrationEstimationResponseFromJSON(json: any): MigrationEstimationResponse;
|
|
41
|
+
export declare function MigrationEstimationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationEstimationResponse;
|
|
42
|
+
export declare function MigrationEstimationResponseToJSON(json: any): MigrationEstimationResponse;
|
|
43
|
+
export declare function MigrationEstimationResponseToJSONTyped(value?: MigrationEstimationResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* OpenShift Migration Advisor API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: undefined
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfMigrationEstimationResponse = instanceOfMigrationEstimationResponse;
|
|
17
|
+
exports.MigrationEstimationResponseFromJSON = MigrationEstimationResponseFromJSON;
|
|
18
|
+
exports.MigrationEstimationResponseFromJSONTyped = MigrationEstimationResponseFromJSONTyped;
|
|
19
|
+
exports.MigrationEstimationResponseToJSON = MigrationEstimationResponseToJSON;
|
|
20
|
+
exports.MigrationEstimationResponseToJSONTyped = MigrationEstimationResponseToJSONTyped;
|
|
21
|
+
const runtime_js_1 = require("../runtime.js");
|
|
22
|
+
const SchemaEstimationResult_js_1 = require("./SchemaEstimationResult.js");
|
|
23
|
+
const EstimationContext_js_1 = require("./EstimationContext.js");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the MigrationEstimationResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfMigrationEstimationResponse(value) {
|
|
28
|
+
if (!('estimation' in value) || value['estimation'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('estimationContext' in value) || value['estimationContext'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function MigrationEstimationResponseFromJSON(json) {
|
|
35
|
+
return MigrationEstimationResponseFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function MigrationEstimationResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'estimation': ((0, runtime_js_1.mapValues)(json['estimation'], SchemaEstimationResult_js_1.SchemaEstimationResultFromJSON)),
|
|
43
|
+
'estimationContext': (0, EstimationContext_js_1.EstimationContextFromJSON)(json['estimationContext']),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function MigrationEstimationResponseToJSON(json) {
|
|
47
|
+
return MigrationEstimationResponseToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function MigrationEstimationResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'estimation': ((0, runtime_js_1.mapValues)(value['estimation'], SchemaEstimationResult_js_1.SchemaEstimationResultToJSON)),
|
|
55
|
+
'estimationContext': (0, EstimationContext_js_1.EstimationContextToJSON)(value['estimationContext']),
|
|
56
|
+
};
|
|
57
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './MigrationComplexityRequest.js';
|
|
|
36
36
|
export * from './MigrationComplexityResponse.js';
|
|
37
37
|
export * from './MigrationEstimationByComplexityResponse.js';
|
|
38
38
|
export * from './MigrationEstimationRequest.js';
|
|
39
|
+
export * from './MigrationEstimationResponse.js';
|
|
39
40
|
export * from './MigrationIssue.js';
|
|
40
41
|
export * from './ModelError.js';
|
|
41
42
|
export * from './Network.js';
|
package/dist/models/index.js
CHANGED
|
@@ -54,6 +54,7 @@ __exportStar(require("./MigrationComplexityRequest.js"), exports);
|
|
|
54
54
|
__exportStar(require("./MigrationComplexityResponse.js"), exports);
|
|
55
55
|
__exportStar(require("./MigrationEstimationByComplexityResponse.js"), exports);
|
|
56
56
|
__exportStar(require("./MigrationEstimationRequest.js"), exports);
|
|
57
|
+
__exportStar(require("./MigrationEstimationResponse.js"), exports);
|
|
57
58
|
__exportStar(require("./MigrationIssue.js"), exports);
|
|
58
59
|
__exportStar(require("./ModelError.js"), exports);
|
|
59
60
|
__exportStar(require("./Network.js"), exports);
|
package/docs/AssessmentApi.md
CHANGED
|
@@ -169,7 +169,7 @@ No authorization required
|
|
|
169
169
|
|
|
170
170
|
## calculateMigrationEstimation
|
|
171
171
|
|
|
172
|
-
>
|
|
172
|
+
> MigrationEstimationResponse calculateMigrationEstimation(id, migrationEstimationRequest)
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
|
|
@@ -217,7 +217,7 @@ example().catch(console.error);
|
|
|
217
217
|
|
|
218
218
|
### Return type
|
|
219
219
|
|
|
220
|
-
[**
|
|
220
|
+
[**MigrationEstimationResponse**](MigrationEstimationResponse.md)
|
|
221
221
|
|
|
222
222
|
### Authorization
|
|
223
223
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# MigrationEstimationResponse
|
|
3
|
+
|
|
4
|
+
Migration estimation result, including per-schema results and the parameters used.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`estimation` | [{ [key: string]: SchemaEstimationResult; }](SchemaEstimationResult.md)
|
|
11
|
+
`estimationContext` | [EstimationContext](EstimationContext.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { MigrationEstimationResponse } from '@openshift-migration-advisor/planner-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"estimation": null,
|
|
21
|
+
"estimationContext": null,
|
|
22
|
+
} satisfies MigrationEstimationResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as MigrationEstimationResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/package.json
CHANGED
package/src/apis/AccountApi.ts
CHANGED
|
@@ -402,7 +402,7 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
402
402
|
|
|
403
403
|
|
|
404
404
|
let urlPath = `/api/v1/groups/{id}/members`;
|
|
405
|
-
urlPath = urlPath.replace(
|
|
405
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
406
406
|
|
|
407
407
|
return {
|
|
408
408
|
path: urlPath,
|
|
@@ -448,7 +448,7 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
448
448
|
|
|
449
449
|
|
|
450
450
|
let urlPath = `/api/v1/groups/{id}`;
|
|
451
|
-
urlPath = urlPath.replace(
|
|
451
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
452
452
|
|
|
453
453
|
return {
|
|
454
454
|
path: urlPath,
|
|
@@ -493,7 +493,7 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
493
493
|
|
|
494
494
|
|
|
495
495
|
let urlPath = `/api/v1/groups/{id}`;
|
|
496
|
-
urlPath = urlPath.replace(
|
|
496
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
497
497
|
|
|
498
498
|
return {
|
|
499
499
|
path: urlPath,
|
|
@@ -575,7 +575,7 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
575
575
|
|
|
576
576
|
|
|
577
577
|
let urlPath = `/api/v1/groups/{id}/members`;
|
|
578
|
-
urlPath = urlPath.replace(
|
|
578
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
579
579
|
|
|
580
580
|
return {
|
|
581
581
|
path: urlPath,
|
|
@@ -676,8 +676,8 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
676
676
|
|
|
677
677
|
|
|
678
678
|
let urlPath = `/api/v1/groups/{id}/members/{username}`;
|
|
679
|
-
urlPath = urlPath.replace(
|
|
680
|
-
urlPath = urlPath.replace(
|
|
679
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
680
|
+
urlPath = urlPath.replace('{username}', encodeURIComponent(String(requestParameters['username'])));
|
|
681
681
|
|
|
682
682
|
return {
|
|
683
683
|
path: urlPath,
|
|
@@ -730,7 +730,7 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
730
730
|
|
|
731
731
|
|
|
732
732
|
let urlPath = `/api/v1/groups/{id}`;
|
|
733
|
-
urlPath = urlPath.replace(
|
|
733
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
734
734
|
|
|
735
735
|
return {
|
|
736
736
|
path: urlPath,
|
|
@@ -792,8 +792,8 @@ export class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
|
792
792
|
|
|
793
793
|
|
|
794
794
|
let urlPath = `/api/v1/groups/{id}/members/{username}`;
|
|
795
|
-
urlPath = urlPath.replace(
|
|
796
|
-
urlPath = urlPath.replace(
|
|
795
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
796
|
+
urlPath = urlPath.replace('{username}', encodeURIComponent(String(requestParameters['username'])));
|
|
797
797
|
|
|
798
798
|
return {
|
|
799
799
|
path: urlPath,
|
|
@@ -24,7 +24,7 @@ import type {
|
|
|
24
24
|
MigrationComplexityResponse,
|
|
25
25
|
MigrationEstimationByComplexityResponse,
|
|
26
26
|
MigrationEstimationRequest,
|
|
27
|
-
|
|
27
|
+
MigrationEstimationResponse,
|
|
28
28
|
} from '../models/index.js';
|
|
29
29
|
import {
|
|
30
30
|
AssessmentFromJSON,
|
|
@@ -45,8 +45,8 @@ import {
|
|
|
45
45
|
MigrationEstimationByComplexityResponseToJSON,
|
|
46
46
|
MigrationEstimationRequestFromJSON,
|
|
47
47
|
MigrationEstimationRequestToJSON,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
MigrationEstimationResponseFromJSON,
|
|
49
|
+
MigrationEstimationResponseToJSON,
|
|
50
50
|
} from '../models/index.js';
|
|
51
51
|
|
|
52
52
|
export interface CalculateAssessmentClusterRequirementsRequest {
|
|
@@ -162,12 +162,12 @@ export interface AssessmentApiInterface {
|
|
|
162
162
|
* @throws {RequiredError}
|
|
163
163
|
* @memberof AssessmentApiInterface
|
|
164
164
|
*/
|
|
165
|
-
calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
165
|
+
calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>>;
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* Calculate migration time estimation for an assessment
|
|
169
169
|
*/
|
|
170
|
-
calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
170
|
+
calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse>;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* Creates request options for calculateMigrationEstimationByComplexity without sending the request
|
|
@@ -338,7 +338,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
338
338
|
|
|
339
339
|
|
|
340
340
|
let urlPath = `/api/v1/assessments/{id}/cluster-requirements`;
|
|
341
|
-
urlPath = urlPath.replace(
|
|
341
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
342
342
|
|
|
343
343
|
return {
|
|
344
344
|
path: urlPath,
|
|
@@ -393,7 +393,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
393
393
|
|
|
394
394
|
|
|
395
395
|
let urlPath = `/api/v1/assessments/{id}/complexity-estimation`;
|
|
396
|
-
urlPath = urlPath.replace(
|
|
396
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
397
397
|
|
|
398
398
|
return {
|
|
399
399
|
path: urlPath,
|
|
@@ -448,7 +448,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
448
448
|
|
|
449
449
|
|
|
450
450
|
let urlPath = `/api/v1/assessments/{id}/migration-estimation`;
|
|
451
|
-
urlPath = urlPath.replace(
|
|
451
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
452
452
|
|
|
453
453
|
return {
|
|
454
454
|
path: urlPath,
|
|
@@ -462,17 +462,17 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
462
462
|
/**
|
|
463
463
|
* Calculate migration time estimation for an assessment
|
|
464
464
|
*/
|
|
465
|
-
async calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
465
|
+
async calculateMigrationEstimationRaw(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationEstimationResponse>> {
|
|
466
466
|
const requestOptions = await this.calculateMigrationEstimationRequestOpts(requestParameters);
|
|
467
467
|
const response = await this.request(requestOptions, initOverrides);
|
|
468
468
|
|
|
469
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
469
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MigrationEstimationResponseFromJSON(jsonValue));
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
/**
|
|
473
473
|
* Calculate migration time estimation for an assessment
|
|
474
474
|
*/
|
|
475
|
-
async calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
475
|
+
async calculateMigrationEstimation(requestParameters: CalculateMigrationEstimationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationEstimationResponse> {
|
|
476
476
|
const response = await this.calculateMigrationEstimationRaw(requestParameters, initOverrides);
|
|
477
477
|
return await response.value();
|
|
478
478
|
}
|
|
@@ -503,7 +503,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
503
503
|
|
|
504
504
|
|
|
505
505
|
let urlPath = `/api/v1/assessments/{id}/migration-estimation/by-complexity`;
|
|
506
|
-
urlPath = urlPath.replace(
|
|
506
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
507
507
|
|
|
508
508
|
return {
|
|
509
509
|
path: urlPath,
|
|
@@ -596,7 +596,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
596
596
|
|
|
597
597
|
|
|
598
598
|
let urlPath = `/api/v1/assessments/{id}`;
|
|
599
|
-
urlPath = urlPath.replace(
|
|
599
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
600
600
|
|
|
601
601
|
return {
|
|
602
602
|
path: urlPath,
|
|
@@ -641,7 +641,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
641
641
|
|
|
642
642
|
|
|
643
643
|
let urlPath = `/api/v1/assessments/{id}`;
|
|
644
|
-
urlPath = urlPath.replace(
|
|
644
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
645
645
|
|
|
646
646
|
return {
|
|
647
647
|
path: urlPath,
|
|
@@ -736,7 +736,7 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
736
736
|
|
|
737
737
|
|
|
738
738
|
let urlPath = `/api/v1/assessments/{id}`;
|
|
739
|
-
urlPath = urlPath.replace(
|
|
739
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
740
740
|
|
|
741
741
|
return {
|
|
742
742
|
path: urlPath,
|
package/src/apis/ImageApi.ts
CHANGED
|
@@ -105,7 +105,7 @@ export class ImageApi extends runtime.BaseAPI implements ImageApiInterface {
|
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
let urlPath = `/api/v1/sources/{id}/image-url`;
|
|
108
|
-
urlPath = urlPath.replace(
|
|
108
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
109
109
|
|
|
110
110
|
return {
|
|
111
111
|
path: urlPath,
|
|
@@ -150,7 +150,7 @@ export class ImageApi extends runtime.BaseAPI implements ImageApiInterface {
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
let urlPath = `/api/v1/sources/{id}/image`;
|
|
153
|
-
urlPath = urlPath.replace(
|
|
153
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
154
154
|
|
|
155
155
|
return {
|
|
156
156
|
path: urlPath,
|
package/src/apis/JobApi.ts
CHANGED
|
@@ -134,7 +134,7 @@ export class JobApi extends runtime.BaseAPI implements JobApiInterface {
|
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
let urlPath = `/api/v1/assessments/jobs/{id}`;
|
|
137
|
-
urlPath = urlPath.replace(
|
|
137
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
138
138
|
|
|
139
139
|
return {
|
|
140
140
|
path: urlPath,
|
|
@@ -255,7 +255,7 @@ export class JobApi extends runtime.BaseAPI implements JobApiInterface {
|
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
let urlPath = `/api/v1/assessments/jobs/{id}`;
|
|
258
|
-
urlPath = urlPath.replace(
|
|
258
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
259
259
|
|
|
260
260
|
return {
|
|
261
261
|
path: urlPath,
|
package/src/apis/SourceApi.ts
CHANGED
|
@@ -288,7 +288,7 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
|
|
|
288
288
|
|
|
289
289
|
|
|
290
290
|
let urlPath = `/api/v1/sources/{id}`;
|
|
291
|
-
urlPath = urlPath.replace(
|
|
291
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
292
292
|
|
|
293
293
|
return {
|
|
294
294
|
path: urlPath,
|
|
@@ -370,7 +370,7 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
|
|
|
370
370
|
|
|
371
371
|
|
|
372
372
|
let urlPath = `/api/v1/sources/{id}`;
|
|
373
|
-
urlPath = urlPath.replace(
|
|
373
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
374
374
|
|
|
375
375
|
return {
|
|
376
376
|
path: urlPath,
|
|
@@ -461,7 +461,7 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
|
|
|
461
461
|
|
|
462
462
|
|
|
463
463
|
let urlPath = `/api/v1/sources/{id}/inventory`;
|
|
464
|
-
urlPath = urlPath.replace(
|
|
464
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
465
465
|
|
|
466
466
|
return {
|
|
467
467
|
path: urlPath,
|
|
@@ -516,7 +516,7 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
|
|
|
516
516
|
|
|
517
517
|
|
|
518
518
|
let urlPath = `/api/v1/sources/{id}`;
|
|
519
|
-
urlPath = urlPath.replace(
|
|
519
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
520
520
|
|
|
521
521
|
return {
|
|
522
522
|
path: urlPath,
|
|
@@ -33,7 +33,7 @@ export interface MigrationEstimationRequest {
|
|
|
33
33
|
*/
|
|
34
34
|
estimationSchema?: Array<string>;
|
|
35
35
|
/**
|
|
36
|
-
* Optional calculator parameter overrides. Keys must match known calculator param names (e.g. "transfer_rate_mbps", "work_hours_per_day", "troubleshoot_mins_per_vm", "post_migration_engineers"). User-supplied values take precedence over both defaults and inventory-derived values. Unknown keys are
|
|
36
|
+
* Optional calculator parameter overrides. Keys must match known calculator param names (e.g. "transfer_rate_mbps", "work_hours_per_day", "troubleshoot_mins_per_vm", "post_migration_engineers"). User-supplied values take precedence over both defaults and inventory-derived values. Unknown keys are rejected with HTTP 400.
|
|
37
37
|
*
|
|
38
38
|
* @type {{ [key: string]: any; }}
|
|
39
39
|
* @memberof MigrationEstimationRequest
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
import type { SchemaEstimationResult } from './SchemaEstimationResult.js';
|
|
17
|
+
import {
|
|
18
|
+
SchemaEstimationResultFromJSON,
|
|
19
|
+
SchemaEstimationResultFromJSONTyped,
|
|
20
|
+
SchemaEstimationResultToJSON,
|
|
21
|
+
SchemaEstimationResultToJSONTyped,
|
|
22
|
+
} from './SchemaEstimationResult.js';
|
|
23
|
+
import type { EstimationContext } from './EstimationContext.js';
|
|
24
|
+
import {
|
|
25
|
+
EstimationContextFromJSON,
|
|
26
|
+
EstimationContextFromJSONTyped,
|
|
27
|
+
EstimationContextToJSON,
|
|
28
|
+
EstimationContextToJSONTyped,
|
|
29
|
+
} from './EstimationContext.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Migration estimation result, including per-schema results and the parameters used.
|
|
33
|
+
*
|
|
34
|
+
* @export
|
|
35
|
+
* @interface MigrationEstimationResponse
|
|
36
|
+
*/
|
|
37
|
+
export interface MigrationEstimationResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Estimation results keyed by schema name (e.g. "network-based", "storage-offload").
|
|
40
|
+
* @type {{ [key: string]: SchemaEstimationResult; }}
|
|
41
|
+
* @memberof MigrationEstimationResponse
|
|
42
|
+
*/
|
|
43
|
+
estimation: { [key: string]: SchemaEstimationResult; };
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {EstimationContext}
|
|
47
|
+
* @memberof MigrationEstimationResponse
|
|
48
|
+
*/
|
|
49
|
+
estimationContext: EstimationContext;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the MigrationEstimationResponse interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfMigrationEstimationResponse(value: object): value is MigrationEstimationResponse {
|
|
56
|
+
if (!('estimation' in value) || value['estimation'] === undefined) return false;
|
|
57
|
+
if (!('estimationContext' in value) || value['estimationContext'] === undefined) return false;
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function MigrationEstimationResponseFromJSON(json: any): MigrationEstimationResponse {
|
|
62
|
+
return MigrationEstimationResponseFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function MigrationEstimationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationEstimationResponse {
|
|
66
|
+
if (json == null) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'estimation': (mapValues(json['estimation'], SchemaEstimationResultFromJSON)),
|
|
72
|
+
'estimationContext': EstimationContextFromJSON(json['estimationContext']),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function MigrationEstimationResponseToJSON(json: any): MigrationEstimationResponse {
|
|
77
|
+
return MigrationEstimationResponseToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function MigrationEstimationResponseToJSONTyped(value?: MigrationEstimationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'estimation': (mapValues(value['estimation'], SchemaEstimationResultToJSON)),
|
|
88
|
+
'estimationContext': EstimationContextToJSON(value['estimationContext']),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from './MigrationComplexityRequest.js';
|
|
|
38
38
|
export * from './MigrationComplexityResponse.js';
|
|
39
39
|
export * from './MigrationEstimationByComplexityResponse.js';
|
|
40
40
|
export * from './MigrationEstimationRequest.js';
|
|
41
|
+
export * from './MigrationEstimationResponse.js';
|
|
41
42
|
export * from './MigrationIssue.js';
|
|
42
43
|
export * from './ModelError.js';
|
|
43
44
|
export * from './Network.js';
|