@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
|
@@ -22,8 +22,6 @@ exports.EstimationDetailToJSONTyped = EstimationDetailToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the EstimationDetail interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfEstimationDetail(value) {
|
|
25
|
-
if (!('duration' in value) || value['duration'] === undefined)
|
|
26
|
-
return false;
|
|
27
25
|
if (!('reason' in value) || value['reason'] === undefined)
|
|
28
26
|
return false;
|
|
29
27
|
return true;
|
|
@@ -36,7 +34,9 @@ function EstimationDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
34
|
return json;
|
|
37
35
|
}
|
|
38
36
|
return {
|
|
39
|
-
'duration': json['duration'],
|
|
37
|
+
'duration': json['duration'] == null ? undefined : json['duration'],
|
|
38
|
+
'minDuration': json['minDuration'] == null ? undefined : json['minDuration'],
|
|
39
|
+
'maxDuration': json['maxDuration'] == null ? undefined : json['maxDuration'],
|
|
40
40
|
'reason': json['reason'],
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -49,6 +49,8 @@ function EstimationDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
51
|
'duration': value['duration'],
|
|
52
|
+
'minDuration': value['minDuration'],
|
|
53
|
+
'maxDuration': value['maxDuration'],
|
|
52
54
|
'reason': value['reason'],
|
|
53
55
|
};
|
|
54
56
|
}
|
|
@@ -26,7 +26,7 @@ export interface MigrationComplexityResponse {
|
|
|
26
26
|
*/
|
|
27
27
|
complexityByDisk: Array<ComplexityDiskScoreEntry>;
|
|
28
28
|
/**
|
|
29
|
-
* OS complexity scores, one entry per score level (0-4). Score 1 indicates the least complex OS to migrate; score 0 indicates an OS
|
|
29
|
+
* 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.
|
|
30
30
|
*
|
|
31
31
|
* @type {Array<ComplexityOSScoreEntry>}
|
|
32
32
|
* @memberof MigrationComplexityResponse
|
|
@@ -42,7 +42,7 @@ export interface MigrationComplexityResponse {
|
|
|
42
42
|
[key: string]: number;
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
|
-
* 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 =
|
|
45
|
+
* 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.
|
|
46
46
|
*
|
|
47
47
|
* @type {{ [key: string]: number; }}
|
|
48
48
|
* @memberof MigrationComplexityResponse
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { OsDiskEstimationEntry } from './OsDiskEstimationEntry.js';
|
|
13
|
+
import type { EstimationContext } from './EstimationContext.js';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface MigrationEstimationByComplexityResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface MigrationEstimationByComplexityResponse {
|
|
20
|
+
/**
|
|
21
|
+
* Combined OS+Disk complexity distribution with per-bucket estimation. All 5 score levels (0-4) always present.
|
|
22
|
+
* @type {Array<OsDiskEstimationEntry>}
|
|
23
|
+
* @memberof MigrationEstimationByComplexityResponse
|
|
24
|
+
*/
|
|
25
|
+
complexityByOsDisk: Array<OsDiskEstimationEntry>;
|
|
26
|
+
/**
|
|
27
|
+
* Decision matrix: outer keys are OS scores (0-4), inner keys are disk scores (1-4), values are combined scores.
|
|
28
|
+
* @type {{ [key: string]: { [key: string]: number; }; }}
|
|
29
|
+
* @memberof MigrationEstimationByComplexityResponse
|
|
30
|
+
*/
|
|
31
|
+
complexityMatrix: {
|
|
32
|
+
[key: string]: {
|
|
33
|
+
[key: string]: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {EstimationContext}
|
|
39
|
+
* @memberof MigrationEstimationByComplexityResponse
|
|
40
|
+
*/
|
|
41
|
+
estimationContext?: EstimationContext;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the MigrationEstimationByComplexityResponse interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfMigrationEstimationByComplexityResponse(value: object): value is MigrationEstimationByComplexityResponse;
|
|
47
|
+
export declare function MigrationEstimationByComplexityResponseFromJSON(json: any): MigrationEstimationByComplexityResponse;
|
|
48
|
+
export declare function MigrationEstimationByComplexityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationEstimationByComplexityResponse;
|
|
49
|
+
export declare function MigrationEstimationByComplexityResponseToJSON(json: any): MigrationEstimationByComplexityResponse;
|
|
50
|
+
export declare function MigrationEstimationByComplexityResponseToJSONTyped(value?: MigrationEstimationByComplexityResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfMigrationEstimationByComplexityResponse = instanceOfMigrationEstimationByComplexityResponse;
|
|
17
|
+
exports.MigrationEstimationByComplexityResponseFromJSON = MigrationEstimationByComplexityResponseFromJSON;
|
|
18
|
+
exports.MigrationEstimationByComplexityResponseFromJSONTyped = MigrationEstimationByComplexityResponseFromJSONTyped;
|
|
19
|
+
exports.MigrationEstimationByComplexityResponseToJSON = MigrationEstimationByComplexityResponseToJSON;
|
|
20
|
+
exports.MigrationEstimationByComplexityResponseToJSONTyped = MigrationEstimationByComplexityResponseToJSONTyped;
|
|
21
|
+
const OsDiskEstimationEntry_js_1 = require("./OsDiskEstimationEntry.js");
|
|
22
|
+
const EstimationContext_js_1 = require("./EstimationContext.js");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the MigrationEstimationByComplexityResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfMigrationEstimationByComplexityResponse(value) {
|
|
27
|
+
if (!('complexityByOsDisk' in value) || value['complexityByOsDisk'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('complexityMatrix' in value) || value['complexityMatrix'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function MigrationEstimationByComplexityResponseFromJSON(json) {
|
|
34
|
+
return MigrationEstimationByComplexityResponseFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function MigrationEstimationByComplexityResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'complexityByOsDisk': (json['complexityByOsDisk'].map(OsDiskEstimationEntry_js_1.OsDiskEstimationEntryFromJSON)),
|
|
42
|
+
'complexityMatrix': json['complexityMatrix'],
|
|
43
|
+
'estimationContext': json['estimationContext'] == null ? undefined : (0, EstimationContext_js_1.EstimationContextFromJSON)(json['estimationContext']),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function MigrationEstimationByComplexityResponseToJSON(json) {
|
|
47
|
+
return MigrationEstimationByComplexityResponseToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function MigrationEstimationByComplexityResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'complexityByOsDisk': (value['complexityByOsDisk'].map(OsDiskEstimationEntry_js_1.OsDiskEstimationEntryToJSON)),
|
|
55
|
+
'complexityMatrix': value['complexityMatrix'],
|
|
56
|
+
'estimationContext': (0, EstimationContext_js_1.EstimationContextToJSON)(value['estimationContext']),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -21,6 +21,22 @@ export interface MigrationEstimationRequest {
|
|
|
21
21
|
* @memberof MigrationEstimationRequest
|
|
22
22
|
*/
|
|
23
23
|
clusterId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Schemas to run. Valid values: "network-based", "storage-offload". If omitted, all schemas are run.
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<string>}
|
|
28
|
+
* @memberof MigrationEstimationRequest
|
|
29
|
+
*/
|
|
30
|
+
estimationSchema?: Array<string>;
|
|
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 silently ignored.
|
|
33
|
+
*
|
|
34
|
+
* @type {{ [key: string]: any; }}
|
|
35
|
+
* @memberof MigrationEstimationRequest
|
|
36
|
+
*/
|
|
37
|
+
params?: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
24
40
|
}
|
|
25
41
|
/**
|
|
26
42
|
* Check if a given object implements the MigrationEstimationRequest interface.
|
|
@@ -35,6 +35,8 @@ function MigrationEstimationRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
37
|
'clusterId': json['clusterId'],
|
|
38
|
+
'estimationSchema': json['estimationSchema'] == null ? undefined : json['estimationSchema'],
|
|
39
|
+
'params': json['params'] == null ? undefined : json['params'],
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
function MigrationEstimationRequestToJSON(json) {
|
|
@@ -46,5 +48,7 @@ function MigrationEstimationRequestToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
46
48
|
}
|
|
47
49
|
return {
|
|
48
50
|
'clusterId': value['clusterId'],
|
|
51
|
+
'estimationSchema': value['estimationSchema'],
|
|
52
|
+
'params': value['params'],
|
|
49
53
|
};
|
|
50
54
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface OsDiskEstimationEntry
|
|
17
|
+
*/
|
|
18
|
+
export interface OsDiskEstimationEntry {
|
|
19
|
+
/**
|
|
20
|
+
* Combined OS+Disk complexity score (0-4).
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof OsDiskEstimationEntry
|
|
23
|
+
*/
|
|
24
|
+
score: number;
|
|
25
|
+
/**
|
|
26
|
+
* Number of VMs at this complexity level.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof OsDiskEstimationEntry
|
|
29
|
+
*/
|
|
30
|
+
vmCount: number;
|
|
31
|
+
/**
|
|
32
|
+
* Total provisioned disk across VMs in this bucket (decimal TB). 0.0 when ComplexityDistribution is absent from the inventory.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof OsDiskEstimationEntry
|
|
35
|
+
*/
|
|
36
|
+
totalDiskSizeTB: number;
|
|
37
|
+
/**
|
|
38
|
+
* Full estimation breakdown keyed by schema name. Absent for empty buckets (vmCount == 0).
|
|
39
|
+
* @type {{ [key: string]: SchemaEstimationResult; }}
|
|
40
|
+
* @memberof OsDiskEstimationEntry
|
|
41
|
+
*/
|
|
42
|
+
estimation?: {
|
|
43
|
+
[key: string]: SchemaEstimationResult;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the OsDiskEstimationEntry interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfOsDiskEstimationEntry(value: object): value is OsDiskEstimationEntry;
|
|
50
|
+
export declare function OsDiskEstimationEntryFromJSON(json: any): OsDiskEstimationEntry;
|
|
51
|
+
export declare function OsDiskEstimationEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): OsDiskEstimationEntry;
|
|
52
|
+
export declare function OsDiskEstimationEntryToJSON(json: any): OsDiskEstimationEntry;
|
|
53
|
+
export declare function OsDiskEstimationEntryToJSONTyped(value?: OsDiskEstimationEntry | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.instanceOfOsDiskEstimationEntry = instanceOfOsDiskEstimationEntry;
|
|
17
|
+
exports.OsDiskEstimationEntryFromJSON = OsDiskEstimationEntryFromJSON;
|
|
18
|
+
exports.OsDiskEstimationEntryFromJSONTyped = OsDiskEstimationEntryFromJSONTyped;
|
|
19
|
+
exports.OsDiskEstimationEntryToJSON = OsDiskEstimationEntryToJSON;
|
|
20
|
+
exports.OsDiskEstimationEntryToJSONTyped = OsDiskEstimationEntryToJSONTyped;
|
|
21
|
+
const runtime_js_1 = require("../runtime.js");
|
|
22
|
+
const SchemaEstimationResult_js_1 = require("./SchemaEstimationResult.js");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the OsDiskEstimationEntry interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfOsDiskEstimationEntry(value) {
|
|
27
|
+
if (!('score' in value) || value['score'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('vmCount' in value) || value['vmCount'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('totalDiskSizeTB' in value) || value['totalDiskSizeTB'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function OsDiskEstimationEntryFromJSON(json) {
|
|
36
|
+
return OsDiskEstimationEntryFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function OsDiskEstimationEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'score': json['score'],
|
|
44
|
+
'vmCount': json['vmCount'],
|
|
45
|
+
'totalDiskSizeTB': json['totalDiskSizeTB'],
|
|
46
|
+
'estimation': json['estimation'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['estimation'], SchemaEstimationResult_js_1.SchemaEstimationResultFromJSON)),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function OsDiskEstimationEntryToJSON(json) {
|
|
50
|
+
return OsDiskEstimationEntryToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function OsDiskEstimationEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'score': value['score'],
|
|
58
|
+
'vmCount': value['vmCount'],
|
|
59
|
+
'totalDiskSizeTB': value['totalDiskSizeTB'],
|
|
60
|
+
'estimation': value['estimation'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['estimation'], SchemaEstimationResult_js_1.SchemaEstimationResultToJSON)),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { EstimationDetail } from './EstimationDetail.js';
|
|
13
|
+
/**
|
|
14
|
+
* Estimation results for a single schema
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SchemaEstimationResult
|
|
17
|
+
*/
|
|
18
|
+
export interface SchemaEstimationResult {
|
|
19
|
+
/**
|
|
20
|
+
* Minimum total estimated duration across all calculators
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof SchemaEstimationResult
|
|
23
|
+
*/
|
|
24
|
+
minTotalDuration: string;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum total estimated duration across all calculators
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SchemaEstimationResult
|
|
29
|
+
*/
|
|
30
|
+
maxTotalDuration: string;
|
|
31
|
+
/**
|
|
32
|
+
* Per-calculator results
|
|
33
|
+
* @type {{ [key: string]: EstimationDetail; }}
|
|
34
|
+
* @memberof SchemaEstimationResult
|
|
35
|
+
*/
|
|
36
|
+
breakdown: {
|
|
37
|
+
[key: string]: EstimationDetail;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the SchemaEstimationResult interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfSchemaEstimationResult(value: object): value is SchemaEstimationResult;
|
|
44
|
+
export declare function SchemaEstimationResultFromJSON(json: any): SchemaEstimationResult;
|
|
45
|
+
export declare function SchemaEstimationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SchemaEstimationResult;
|
|
46
|
+
export declare function SchemaEstimationResultToJSON(json: any): SchemaEstimationResult;
|
|
47
|
+
export declare function SchemaEstimationResultToJSONTyped(value?: SchemaEstimationResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
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.instanceOfSchemaEstimationResult = instanceOfSchemaEstimationResult;
|
|
17
|
+
exports.SchemaEstimationResultFromJSON = SchemaEstimationResultFromJSON;
|
|
18
|
+
exports.SchemaEstimationResultFromJSONTyped = SchemaEstimationResultFromJSONTyped;
|
|
19
|
+
exports.SchemaEstimationResultToJSON = SchemaEstimationResultToJSON;
|
|
20
|
+
exports.SchemaEstimationResultToJSONTyped = SchemaEstimationResultToJSONTyped;
|
|
21
|
+
const runtime_js_1 = require("../runtime.js");
|
|
22
|
+
const EstimationDetail_js_1 = require("./EstimationDetail.js");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the SchemaEstimationResult interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfSchemaEstimationResult(value) {
|
|
27
|
+
if (!('minTotalDuration' in value) || value['minTotalDuration'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('maxTotalDuration' in value) || value['maxTotalDuration'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('breakdown' in value) || value['breakdown'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function SchemaEstimationResultFromJSON(json) {
|
|
36
|
+
return SchemaEstimationResultFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function SchemaEstimationResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'minTotalDuration': json['minTotalDuration'],
|
|
44
|
+
'maxTotalDuration': json['maxTotalDuration'],
|
|
45
|
+
'breakdown': ((0, runtime_js_1.mapValues)(json['breakdown'], EstimationDetail_js_1.EstimationDetailFromJSON)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function SchemaEstimationResultToJSON(json) {
|
|
49
|
+
return SchemaEstimationResultToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function SchemaEstimationResultToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'minTotalDuration': value['minTotalDuration'],
|
|
57
|
+
'maxTotalDuration': value['maxTotalDuration'],
|
|
58
|
+
'breakdown': ((0, runtime_js_1.mapValues)(value['breakdown'], EstimationDetail_js_1.EstimationDetailToJSON)),
|
|
59
|
+
};
|
|
60
|
+
}
|
package/dist/models/VMs.d.ts
CHANGED
|
@@ -94,10 +94,19 @@ export interface VMs {
|
|
|
94
94
|
* Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
|
|
95
95
|
* @type {{ [key: string]: number; }}
|
|
96
96
|
* @memberof VMs
|
|
97
|
+
* @deprecated
|
|
97
98
|
*/
|
|
98
99
|
distributionByComplexity?: {
|
|
99
100
|
[key: string]: number;
|
|
100
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity.
|
|
104
|
+
* @type {{ [key: string]: DiskSizeTierSummary; }}
|
|
105
|
+
* @memberof VMs
|
|
106
|
+
*/
|
|
107
|
+
complexityDistribution?: {
|
|
108
|
+
[key: string]: DiskSizeTierSummary;
|
|
109
|
+
};
|
|
101
110
|
/**
|
|
102
111
|
*
|
|
103
112
|
* @type {VMResourceBreakdown}
|
package/dist/models/VMs.js
CHANGED
|
@@ -67,6 +67,7 @@ function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
67
|
'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
|
|
68
68
|
'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
|
|
69
69
|
'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
|
|
70
|
+
'complexityDistribution': json['complexityDistribution'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['complexityDistribution'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
|
|
70
71
|
'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['ramGB']),
|
|
71
72
|
'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskGB']),
|
|
72
73
|
'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskCount']),
|
|
@@ -97,6 +98,7 @@ function VMsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
97
98
|
'distributionByMemoryTier': value['distributionByMemoryTier'],
|
|
98
99
|
'distributionByNicCount': value['distributionByNicCount'],
|
|
99
100
|
'distributionByComplexity': value['distributionByComplexity'],
|
|
101
|
+
'complexityDistribution': value['complexityDistribution'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['complexityDistribution'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
|
|
100
102
|
'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['ramGB']),
|
|
101
103
|
'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskGB']),
|
|
102
104
|
'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskCount']),
|
package/dist/models/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './ComplexityOSScoreEntry.js';
|
|
|
12
12
|
export * from './Datastore.js';
|
|
13
13
|
export * from './DiskSizeTierSummary.js';
|
|
14
14
|
export * from './DiskTypeSummary.js';
|
|
15
|
+
export * from './EstimationContext.js';
|
|
15
16
|
export * from './EstimationDetail.js';
|
|
16
17
|
export * from './Histogram.js';
|
|
17
18
|
export * from './Host.js';
|
|
@@ -26,13 +27,15 @@ export * from './JobStatus.js';
|
|
|
26
27
|
export * from './Label.js';
|
|
27
28
|
export * from './MigrationComplexityRequest.js';
|
|
28
29
|
export * from './MigrationComplexityResponse.js';
|
|
30
|
+
export * from './MigrationEstimationByComplexityResponse.js';
|
|
29
31
|
export * from './MigrationEstimationRequest.js';
|
|
30
|
-
export * from './MigrationEstimationResponse.js';
|
|
31
32
|
export * from './MigrationIssue.js';
|
|
32
33
|
export * from './ModelError.js';
|
|
33
34
|
export * from './Network.js';
|
|
35
|
+
export * from './OsDiskEstimationEntry.js';
|
|
34
36
|
export * from './OsInfo.js';
|
|
35
37
|
export * from './PresignedUrl.js';
|
|
38
|
+
export * from './SchemaEstimationResult.js';
|
|
36
39
|
export * from './SizingOverCommitRatio.js';
|
|
37
40
|
export * from './SizingResourceConsumption.js';
|
|
38
41
|
export * from './SizingResourceLimits.js';
|
package/dist/models/index.js
CHANGED
|
@@ -30,6 +30,7 @@ __exportStar(require("./ComplexityOSScoreEntry.js"), exports);
|
|
|
30
30
|
__exportStar(require("./Datastore.js"), exports);
|
|
31
31
|
__exportStar(require("./DiskSizeTierSummary.js"), exports);
|
|
32
32
|
__exportStar(require("./DiskTypeSummary.js"), exports);
|
|
33
|
+
__exportStar(require("./EstimationContext.js"), exports);
|
|
33
34
|
__exportStar(require("./EstimationDetail.js"), exports);
|
|
34
35
|
__exportStar(require("./Histogram.js"), exports);
|
|
35
36
|
__exportStar(require("./Host.js"), exports);
|
|
@@ -44,13 +45,15 @@ __exportStar(require("./JobStatus.js"), exports);
|
|
|
44
45
|
__exportStar(require("./Label.js"), exports);
|
|
45
46
|
__exportStar(require("./MigrationComplexityRequest.js"), exports);
|
|
46
47
|
__exportStar(require("./MigrationComplexityResponse.js"), exports);
|
|
48
|
+
__exportStar(require("./MigrationEstimationByComplexityResponse.js"), exports);
|
|
47
49
|
__exportStar(require("./MigrationEstimationRequest.js"), exports);
|
|
48
|
-
__exportStar(require("./MigrationEstimationResponse.js"), exports);
|
|
49
50
|
__exportStar(require("./MigrationIssue.js"), exports);
|
|
50
51
|
__exportStar(require("./ModelError.js"), exports);
|
|
51
52
|
__exportStar(require("./Network.js"), exports);
|
|
53
|
+
__exportStar(require("./OsDiskEstimationEntry.js"), exports);
|
|
52
54
|
__exportStar(require("./OsInfo.js"), exports);
|
|
53
55
|
__exportStar(require("./PresignedUrl.js"), exports);
|
|
56
|
+
__exportStar(require("./SchemaEstimationResult.js"), exports);
|
|
54
57
|
__exportStar(require("./SizingOverCommitRatio.js"), exports);
|
|
55
58
|
__exportStar(require("./SizingResourceConsumption.js"), exports);
|
|
56
59
|
__exportStar(require("./SizingResourceLimits.js"), exports);
|
package/dist/runtime.js
CHANGED
|
@@ -219,7 +219,7 @@ class BaseAPI {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
exports.BaseAPI = BaseAPI;
|
|
222
|
-
BaseAPI.jsonRegex =
|
|
222
|
+
BaseAPI.jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
|
|
223
223
|
;
|
|
224
224
|
function isBlob(value) {
|
|
225
225
|
return typeof Blob !== 'undefined' && value instanceof Blob;
|
package/docs/AssessmentApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
7
7
|
| [**calculateAssessmentClusterRequirements**](AssessmentApi.md#calculateassessmentclusterrequirements) | **POST** /api/v1/assessments/{id}/cluster-requirements | |
|
|
8
8
|
| [**calculateMigrationComplexity**](AssessmentApi.md#calculatemigrationcomplexity) | **POST** /api/v1/assessments/{id}/complexity-estimation | |
|
|
9
9
|
| [**calculateMigrationEstimation**](AssessmentApi.md#calculatemigrationestimation) | **POST** /api/v1/assessments/{id}/migration-estimation | |
|
|
10
|
+
| [**calculateMigrationEstimationByComplexity**](AssessmentApi.md#calculatemigrationestimationbycomplexity) | **POST** /api/v1/assessments/{id}/migration-estimation/by-complexity | |
|
|
10
11
|
| [**createAssessment**](AssessmentApi.md#createassessment) | **POST** /api/v1/assessments | |
|
|
11
12
|
| [**deleteAssessment**](AssessmentApi.md#deleteassessment) | **DELETE** /api/v1/assessments/{id} | |
|
|
12
13
|
| [**getAssessment**](AssessmentApi.md#getassessment) | **GET** /api/v1/assessments/{id} | |
|
|
@@ -168,7 +169,7 @@ No authorization required
|
|
|
168
169
|
|
|
169
170
|
## calculateMigrationEstimation
|
|
170
171
|
|
|
171
|
-
>
|
|
172
|
+
> { [key: string]: SchemaEstimationResult; } calculateMigrationEstimation(id, migrationEstimationRequest)
|
|
172
173
|
|
|
173
174
|
|
|
174
175
|
|
|
@@ -191,7 +192,7 @@ async function example() {
|
|
|
191
192
|
// string | ID of the assessment
|
|
192
193
|
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
193
194
|
// MigrationEstimationRequest
|
|
194
|
-
migrationEstimationRequest: {"clusterId":"domain-c8"},
|
|
195
|
+
migrationEstimationRequest: {"clusterId":"domain-c8","estimationSchema":["network-based"],"params":{"transfer_rate_mbps":1000,"work_hours_per_day":6}},
|
|
195
196
|
} satisfies CalculateMigrationEstimationRequest;
|
|
196
197
|
|
|
197
198
|
try {
|
|
@@ -216,7 +217,7 @@ example().catch(console.error);
|
|
|
216
217
|
|
|
217
218
|
### Return type
|
|
218
219
|
|
|
219
|
-
[**
|
|
220
|
+
[**{ [key: string]: SchemaEstimationResult; }**](SchemaEstimationResult.md)
|
|
220
221
|
|
|
221
222
|
### Authorization
|
|
222
223
|
|
|
@@ -241,6 +242,81 @@ No authorization required
|
|
|
241
242
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
242
243
|
|
|
243
244
|
|
|
245
|
+
## calculateMigrationEstimationByComplexity
|
|
246
|
+
|
|
247
|
+
> MigrationEstimationByComplexityResponse calculateMigrationEstimationByComplexity(id, migrationEstimationRequest)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
Calculate migration time estimation broken down by combined OS+Disk complexity
|
|
252
|
+
|
|
253
|
+
### Example
|
|
254
|
+
|
|
255
|
+
```ts
|
|
256
|
+
import {
|
|
257
|
+
Configuration,
|
|
258
|
+
AssessmentApi,
|
|
259
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
260
|
+
import type { CalculateMigrationEstimationByComplexityRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
261
|
+
|
|
262
|
+
async function example() {
|
|
263
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
264
|
+
const api = new AssessmentApi();
|
|
265
|
+
|
|
266
|
+
const body = {
|
|
267
|
+
// string | ID of the assessment
|
|
268
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
269
|
+
// MigrationEstimationRequest
|
|
270
|
+
migrationEstimationRequest: ...,
|
|
271
|
+
} satisfies CalculateMigrationEstimationByComplexityRequest;
|
|
272
|
+
|
|
273
|
+
try {
|
|
274
|
+
const data = await api.calculateMigrationEstimationByComplexity(body);
|
|
275
|
+
console.log(data);
|
|
276
|
+
} catch (error) {
|
|
277
|
+
console.error(error);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Run the test
|
|
282
|
+
example().catch(console.error);
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Parameters
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
| Name | Type | Description | Notes |
|
|
289
|
+
|------------- | ------------- | ------------- | -------------|
|
|
290
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
291
|
+
| **migrationEstimationRequest** | [MigrationEstimationRequest](MigrationEstimationRequest.md) | | |
|
|
292
|
+
|
|
293
|
+
### Return type
|
|
294
|
+
|
|
295
|
+
[**MigrationEstimationByComplexityResponse**](MigrationEstimationByComplexityResponse.md)
|
|
296
|
+
|
|
297
|
+
### Authorization
|
|
298
|
+
|
|
299
|
+
No authorization required
|
|
300
|
+
|
|
301
|
+
### HTTP request headers
|
|
302
|
+
|
|
303
|
+
- **Content-Type**: `application/json`
|
|
304
|
+
- **Accept**: `application/json`
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
### HTTP response details
|
|
308
|
+
| Status code | Description | Response headers |
|
|
309
|
+
|-------------|-------------|------------------|
|
|
310
|
+
| **200** | Migration estimation by complexity calculation successful | - |
|
|
311
|
+
| **400** | Bad Request | - |
|
|
312
|
+
| **401** | Unauthorized | - |
|
|
313
|
+
| **403** | Forbidden | - |
|
|
314
|
+
| **404** | Assessment not found | - |
|
|
315
|
+
| **500** | Internal error | - |
|
|
316
|
+
|
|
317
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
318
|
+
|
|
319
|
+
|
|
244
320
|
## createAssessment
|
|
245
321
|
|
|
246
322
|
> Assessment createAssessment(assessmentForm)
|
|
@@ -17,6 +17,7 @@ Name | Type
|
|
|
17
17
|
`controlPlaneCPU` | number
|
|
18
18
|
`controlPlaneMemory` | number
|
|
19
19
|
`controlPlaneNodeCount` | number
|
|
20
|
+
`hostedControlPlane` | boolean
|
|
20
21
|
|
|
21
22
|
## Example
|
|
22
23
|
|
|
@@ -35,6 +36,7 @@ const example = {
|
|
|
35
36
|
"controlPlaneCPU": null,
|
|
36
37
|
"controlPlaneMemory": null,
|
|
37
38
|
"controlPlaneNodeCount": null,
|
|
39
|
+
"hostedControlPlane": null,
|
|
38
40
|
} satisfies ClusterRequirementsRequest
|
|
39
41
|
|
|
40
42
|
console.log(example)
|