@openshift-migration-advisor/planner-sdk 0.9.0 → 0.10.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 +6 -0
- package/README.md +6 -2
- package/dist/apis/AssessmentApi.d.ts +38 -1
- package/dist/apis/AssessmentApi.js +44 -0
- package/dist/esm/apis/AssessmentApi.d.ts +38 -1
- package/dist/esm/apis/AssessmentApi.js +45 -1
- 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/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/OsDiskEstimationEntry.d.ts +53 -0
- package/dist/esm/models/OsDiskEstimationEntry.js +55 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -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/MigrationComplexityResponse.d.ts +2 -2
- package/dist/models/MigrationEstimationByComplexityResponse.d.ts +50 -0
- package/dist/models/MigrationEstimationByComplexityResponse.js +58 -0
- package/dist/models/OsDiskEstimationEntry.d.ts +53 -0
- package/dist/models/OsDiskEstimationEntry.js +62 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/AssessmentApi.md +76 -0
- package/docs/EstimationContext.md +36 -0
- package/docs/MigrationEstimationByComplexityResponse.md +38 -0
- package/docs/OsDiskEstimationEntry.md +40 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +87 -0
- package/src/models/ComplexityOSNameEntry.ts +1 -1
- package/src/models/ComplexityOSScoreEntry.ts +1 -1
- package/src/models/EstimationContext.ts +73 -0
- package/src/models/MigrationComplexityResponse.ts +2 -2
- package/src/models/MigrationEstimationByComplexityResponse.ts +98 -0
- package/src/models/OsDiskEstimationEntry.ts +100 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* OpenShift Migration Advisor API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 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
|
+
/**
|
|
17
|
+
* Check if a given object implements the OsDiskEstimationEntry interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfOsDiskEstimationEntry(value) {
|
|
20
|
+
if (!('score' in value) || value['score'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('vmCount' in value) || value['vmCount'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('totalDiskSizeTB' in value) || value['totalDiskSizeTB'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function OsDiskEstimationEntryFromJSON(json) {
|
|
29
|
+
return OsDiskEstimationEntryFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function OsDiskEstimationEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'score': json['score'],
|
|
37
|
+
'vmCount': json['vmCount'],
|
|
38
|
+
'totalDiskSizeTB': json['totalDiskSizeTB'],
|
|
39
|
+
'estimation': json['estimation'] == null ? undefined : (mapValues(json['estimation'], SchemaEstimationResultFromJSON)),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function OsDiskEstimationEntryToJSON(json) {
|
|
43
|
+
return OsDiskEstimationEntryToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function OsDiskEstimationEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'score': value['score'],
|
|
51
|
+
'vmCount': value['vmCount'],
|
|
52
|
+
'totalDiskSizeTB': value['totalDiskSizeTB'],
|
|
53
|
+
'estimation': value['estimation'] == null ? undefined : (mapValues(value['estimation'], SchemaEstimationResultToJSON)),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -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,10 +27,12 @@ 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
32
|
export * from './MigrationIssue.js';
|
|
31
33
|
export * from './ModelError.js';
|
|
32
34
|
export * from './Network.js';
|
|
35
|
+
export * from './OsDiskEstimationEntry.js';
|
|
33
36
|
export * from './OsInfo.js';
|
|
34
37
|
export * from './PresignedUrl.js';
|
|
35
38
|
export * from './SchemaEstimationResult.js';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export * from './ComplexityOSScoreEntry.js';
|
|
|
14
14
|
export * from './Datastore.js';
|
|
15
15
|
export * from './DiskSizeTierSummary.js';
|
|
16
16
|
export * from './DiskTypeSummary.js';
|
|
17
|
+
export * from './EstimationContext.js';
|
|
17
18
|
export * from './EstimationDetail.js';
|
|
18
19
|
export * from './Histogram.js';
|
|
19
20
|
export * from './Host.js';
|
|
@@ -28,10 +29,12 @@ export * from './JobStatus.js';
|
|
|
28
29
|
export * from './Label.js';
|
|
29
30
|
export * from './MigrationComplexityRequest.js';
|
|
30
31
|
export * from './MigrationComplexityResponse.js';
|
|
32
|
+
export * from './MigrationEstimationByComplexityResponse.js';
|
|
31
33
|
export * from './MigrationEstimationRequest.js';
|
|
32
34
|
export * from './MigrationIssue.js';
|
|
33
35
|
export * from './ModelError.js';
|
|
34
36
|
export * from './Network.js';
|
|
37
|
+
export * from './OsDiskEstimationEntry.js';
|
|
35
38
|
export * from './OsInfo.js';
|
|
36
39
|
export * from './PresignedUrl.js';
|
|
37
40
|
export * from './SchemaEstimationResult.js';
|
|
@@ -23,7 +23,7 @@ export interface ComplexityOSNameEntry {
|
|
|
23
23
|
*/
|
|
24
24
|
osName: string;
|
|
25
25
|
/**
|
|
26
|
-
* Complexity score assigned by ClassifyOS. 0 =
|
|
26
|
+
* Complexity score assigned by ClassifyOS. 0 = unknown, 1 = least complex, 4 = most complex.
|
|
27
27
|
*
|
|
28
28
|
* @type {number}
|
|
29
29
|
* @memberof ComplexityOSNameEntry
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface ComplexityOSScoreEntry {
|
|
18
18
|
/**
|
|
19
|
-
* Complexity score from 0 to 4, where 1 indicates the least complex OS to migrate and 0 indicates an OS
|
|
19
|
+
* Complexity score from 0 to 4, where 1 indicates the least complex OS to migrate and 0 indicates an OS with unknown complexity.
|
|
20
20
|
*
|
|
21
21
|
* @type {number}
|
|
22
22
|
* @memberof ComplexityOSScoreEntry
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EstimationContext
|
|
16
|
+
*/
|
|
17
|
+
export interface EstimationContext {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof EstimationContext
|
|
22
|
+
*/
|
|
23
|
+
schemas?: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {{ [key: string]: number; }}
|
|
27
|
+
* @memberof EstimationContext
|
|
28
|
+
*/
|
|
29
|
+
params?: {
|
|
30
|
+
[key: string]: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the EstimationContext interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfEstimationContext(value: object): value is EstimationContext;
|
|
37
|
+
export declare function EstimationContextFromJSON(json: any): EstimationContext;
|
|
38
|
+
export declare function EstimationContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): EstimationContext;
|
|
39
|
+
export declare function EstimationContextToJSON(json: any): EstimationContext;
|
|
40
|
+
export declare function EstimationContextToJSONTyped(value?: EstimationContext | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.instanceOfEstimationContext = instanceOfEstimationContext;
|
|
17
|
+
exports.EstimationContextFromJSON = EstimationContextFromJSON;
|
|
18
|
+
exports.EstimationContextFromJSONTyped = EstimationContextFromJSONTyped;
|
|
19
|
+
exports.EstimationContextToJSON = EstimationContextToJSON;
|
|
20
|
+
exports.EstimationContextToJSONTyped = EstimationContextToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the EstimationContext interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfEstimationContext(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function EstimationContextFromJSON(json) {
|
|
28
|
+
return EstimationContextFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function EstimationContextFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'schemas': json['schemas'] == null ? undefined : json['schemas'],
|
|
36
|
+
'params': json['params'] == null ? undefined : json['params'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function EstimationContextToJSON(json) {
|
|
40
|
+
return EstimationContextToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function EstimationContextToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'schemas': value['schemas'],
|
|
48
|
+
'params': value['params'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
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,10 +27,12 @@ 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
32
|
export * from './MigrationIssue.js';
|
|
31
33
|
export * from './ModelError.js';
|
|
32
34
|
export * from './Network.js';
|
|
35
|
+
export * from './OsDiskEstimationEntry.js';
|
|
33
36
|
export * from './OsInfo.js';
|
|
34
37
|
export * from './PresignedUrl.js';
|
|
35
38
|
export * from './SchemaEstimationResult.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,10 +45,12 @@ __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
50
|
__exportStar(require("./MigrationIssue.js"), exports);
|
|
49
51
|
__exportStar(require("./ModelError.js"), exports);
|
|
50
52
|
__exportStar(require("./Network.js"), exports);
|
|
53
|
+
__exportStar(require("./OsDiskEstimationEntry.js"), exports);
|
|
51
54
|
__exportStar(require("./OsInfo.js"), exports);
|
|
52
55
|
__exportStar(require("./PresignedUrl.js"), exports);
|
|
53
56
|
__exportStar(require("./SchemaEstimationResult.js"), exports);
|
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} | |
|
|
@@ -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)
|
|
@@ -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
|
+
|
|
@@ -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
|
+
|