@openshift-migration-advisor/planner-sdk 0.6.0 → 0.7.0-0448f7fda266
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 +10 -0
- package/README.md +8 -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/ClusterRequirementsRequest.d.ts +14 -0
- package/dist/esm/models/ClusterRequirementsRequest.js +9 -0
- package/dist/esm/models/ComplexityDiskScoreEntry.d.ts +45 -0
- package/dist/esm/models/ComplexityDiskScoreEntry.js +51 -0
- package/dist/esm/models/ComplexityOSNameEntry.d.ts +46 -0
- package/dist/esm/models/ComplexityOSNameEntry.js +51 -0
- package/dist/esm/models/ComplexityOSScoreEntry.d.ts +39 -0
- package/dist/esm/models/ComplexityOSScoreEntry.js +47 -0
- package/dist/esm/models/Info.d.ts +12 -0
- package/dist/esm/models/Info.js +4 -0
- package/dist/esm/models/MigrationComplexityRequest.d.ts +32 -0
- package/dist/esm/models/MigrationComplexityRequest.js +43 -0
- package/dist/esm/models/MigrationComplexityResponse.d.ts +68 -0
- package/dist/esm/models/MigrationComplexityResponse.js +62 -0
- package/dist/esm/models/Source.d.ts +12 -0
- package/dist/esm/models/Source.js +4 -0
- package/dist/esm/models/VMs.d.ts +8 -0
- package/dist/esm/models/VMs.js +2 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/ClusterRequirementsRequest.d.ts +14 -0
- package/dist/models/ClusterRequirementsRequest.js +10 -1
- package/dist/models/ComplexityDiskScoreEntry.d.ts +45 -0
- package/dist/models/ComplexityDiskScoreEntry.js +58 -0
- package/dist/models/ComplexityOSNameEntry.d.ts +46 -0
- package/dist/models/ComplexityOSNameEntry.js +58 -0
- package/dist/models/ComplexityOSScoreEntry.d.ts +39 -0
- package/dist/models/ComplexityOSScoreEntry.js +54 -0
- package/dist/models/Info.d.ts +12 -0
- package/dist/models/Info.js +4 -0
- package/dist/models/MigrationComplexityRequest.d.ts +32 -0
- package/dist/models/MigrationComplexityRequest.js +50 -0
- package/dist/models/MigrationComplexityResponse.d.ts +68 -0
- package/dist/models/MigrationComplexityResponse.js +69 -0
- package/dist/models/Source.d.ts +12 -0
- package/dist/models/Source.js +4 -0
- package/dist/models/VMs.d.ts +8 -0
- package/dist/models/VMs.js +2 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/AssessmentApi.md +76 -0
- package/docs/ClusterRequirementsRequest.md +2 -0
- package/docs/ComplexityDiskScoreEntry.md +39 -0
- package/docs/ComplexityOSNameEntry.md +39 -0
- package/docs/ComplexityOSScoreEntry.md +37 -0
- package/docs/Info.md +4 -0
- package/docs/MigrationComplexityRequest.md +35 -0
- package/docs/MigrationComplexityResponse.md +43 -0
- package/docs/Source.md +4 -0
- package/docs/VMs.md +2 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +90 -0
- package/src/models/ClusterRequirementsRequest.ts +17 -0
- package/src/models/ComplexityDiskScoreEntry.ts +85 -0
- package/src/models/ComplexityOSNameEntry.ts +86 -0
- package/src/models/ComplexityOSScoreEntry.ts +76 -0
- package/src/models/Info.ts +16 -0
- package/src/models/MigrationComplexityRequest.ts +66 -0
- package/src/models/MigrationComplexityResponse.ts +129 -0
- package/src/models/Source.ts +16 -0
- package/src/models/VMs.ts +8 -0
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
* One entry in the OS complexity breakdown
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ComplexityOSScoreEntry
|
|
16
|
+
*/
|
|
17
|
+
export interface ComplexityOSScoreEntry {
|
|
18
|
+
/**
|
|
19
|
+
* Complexity score from 0 to 4, where 1 indicates the least complex OS to migrate and 0 indicates an OS that could not be classified.
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof ComplexityOSScoreEntry
|
|
23
|
+
*/
|
|
24
|
+
score: number;
|
|
25
|
+
/**
|
|
26
|
+
* Number of VMs at this complexity score
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof ComplexityOSScoreEntry
|
|
29
|
+
*/
|
|
30
|
+
vmCount: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ComplexityOSScoreEntry interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfComplexityOSScoreEntry(value: object): value is ComplexityOSScoreEntry;
|
|
36
|
+
export declare function ComplexityOSScoreEntryFromJSON(json: any): ComplexityOSScoreEntry;
|
|
37
|
+
export declare function ComplexityOSScoreEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComplexityOSScoreEntry;
|
|
38
|
+
export declare function ComplexityOSScoreEntryToJSON(json: any): ComplexityOSScoreEntry;
|
|
39
|
+
export declare function ComplexityOSScoreEntryToJSONTyped(value?: ComplexityOSScoreEntry | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfComplexityOSScoreEntry = instanceOfComplexityOSScoreEntry;
|
|
17
|
+
exports.ComplexityOSScoreEntryFromJSON = ComplexityOSScoreEntryFromJSON;
|
|
18
|
+
exports.ComplexityOSScoreEntryFromJSONTyped = ComplexityOSScoreEntryFromJSONTyped;
|
|
19
|
+
exports.ComplexityOSScoreEntryToJSON = ComplexityOSScoreEntryToJSON;
|
|
20
|
+
exports.ComplexityOSScoreEntryToJSONTyped = ComplexityOSScoreEntryToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ComplexityOSScoreEntry interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfComplexityOSScoreEntry(value) {
|
|
25
|
+
if (!('score' in value) || value['score'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('vmCount' in value) || value['vmCount'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function ComplexityOSScoreEntryFromJSON(json) {
|
|
32
|
+
return ComplexityOSScoreEntryFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function ComplexityOSScoreEntryFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'score': json['score'],
|
|
40
|
+
'vmCount': json['vmCount'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function ComplexityOSScoreEntryToJSON(json) {
|
|
44
|
+
return ComplexityOSScoreEntryToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function ComplexityOSScoreEntryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'score': value['score'],
|
|
52
|
+
'vmCount': value['vmCount'],
|
|
53
|
+
};
|
|
54
|
+
}
|
package/dist/models/Info.d.ts
CHANGED
|
@@ -27,6 +27,18 @@ export interface Info {
|
|
|
27
27
|
* @memberof Info
|
|
28
28
|
*/
|
|
29
29
|
versionName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Agent git commit hash
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Info
|
|
34
|
+
*/
|
|
35
|
+
agentGitCommit?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Agent version name, based on git tag
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Info
|
|
40
|
+
*/
|
|
41
|
+
agentVersionName?: string | null;
|
|
30
42
|
}
|
|
31
43
|
/**
|
|
32
44
|
* Check if a given object implements the Info interface.
|
package/dist/models/Info.js
CHANGED
|
@@ -38,6 +38,8 @@ function InfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
38
|
return {
|
|
39
39
|
'gitCommit': json['gitCommit'],
|
|
40
40
|
'versionName': json['versionName'],
|
|
41
|
+
'agentGitCommit': json['agentGitCommit'] == null ? undefined : json['agentGitCommit'],
|
|
42
|
+
'agentVersionName': json['agentVersionName'] == null ? undefined : json['agentVersionName'],
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
function InfoToJSON(json) {
|
|
@@ -50,5 +52,7 @@ function InfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
50
52
|
return {
|
|
51
53
|
'gitCommit': value['gitCommit'],
|
|
52
54
|
'versionName': value['versionName'],
|
|
55
|
+
'agentGitCommit': value['agentGitCommit'],
|
|
56
|
+
'agentVersionName': value['agentVersionName'],
|
|
53
57
|
};
|
|
54
58
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* Request payload for calculating migration complexity estimation
|
|
14
|
+
* @export
|
|
15
|
+
* @interface MigrationComplexityRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface MigrationComplexityRequest {
|
|
18
|
+
/**
|
|
19
|
+
* ID of the cluster to calculate complexity estimation for
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof MigrationComplexityRequest
|
|
22
|
+
*/
|
|
23
|
+
clusterId: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the MigrationComplexityRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfMigrationComplexityRequest(value: object): value is MigrationComplexityRequest;
|
|
29
|
+
export declare function MigrationComplexityRequestFromJSON(json: any): MigrationComplexityRequest;
|
|
30
|
+
export declare function MigrationComplexityRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationComplexityRequest;
|
|
31
|
+
export declare function MigrationComplexityRequestToJSON(json: any): MigrationComplexityRequest;
|
|
32
|
+
export declare function MigrationComplexityRequestToJSONTyped(value?: MigrationComplexityRequest | 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.instanceOfMigrationComplexityRequest = instanceOfMigrationComplexityRequest;
|
|
17
|
+
exports.MigrationComplexityRequestFromJSON = MigrationComplexityRequestFromJSON;
|
|
18
|
+
exports.MigrationComplexityRequestFromJSONTyped = MigrationComplexityRequestFromJSONTyped;
|
|
19
|
+
exports.MigrationComplexityRequestToJSON = MigrationComplexityRequestToJSON;
|
|
20
|
+
exports.MigrationComplexityRequestToJSONTyped = MigrationComplexityRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the MigrationComplexityRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfMigrationComplexityRequest(value) {
|
|
25
|
+
if (!('clusterId' in value) || value['clusterId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function MigrationComplexityRequestFromJSON(json) {
|
|
30
|
+
return MigrationComplexityRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function MigrationComplexityRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'clusterId': json['clusterId'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function MigrationComplexityRequestToJSON(json) {
|
|
41
|
+
return MigrationComplexityRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function MigrationComplexityRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'clusterId': value['clusterId'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { ComplexityOSScoreEntry } from './ComplexityOSScoreEntry.js';
|
|
13
|
+
import type { ComplexityOSNameEntry } from './ComplexityOSNameEntry.js';
|
|
14
|
+
import type { ComplexityDiskScoreEntry } from './ComplexityDiskScoreEntry.js';
|
|
15
|
+
/**
|
|
16
|
+
* Migration complexity estimation results
|
|
17
|
+
* @export
|
|
18
|
+
* @interface MigrationComplexityResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface MigrationComplexityResponse {
|
|
21
|
+
/**
|
|
22
|
+
* Disk-size complexity scores, one entry per score level (1-4). Score 1 is the least complex disk footprint; score 4 is the most complex. Scores correspond to provisioned disk size: 1 (<=10 TB), 2 (<=20 TB), 3 (<=50 TB), 4 (>50 TB). All four score levels are always present.
|
|
23
|
+
*
|
|
24
|
+
* @type {Array<ComplexityDiskScoreEntry>}
|
|
25
|
+
* @memberof MigrationComplexityResponse
|
|
26
|
+
*/
|
|
27
|
+
complexityByDisk: Array<ComplexityDiskScoreEntry>;
|
|
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 that could not be classified. All five score levels are always present.
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<ComplexityOSScoreEntry>}
|
|
32
|
+
* @memberof MigrationComplexityResponse
|
|
33
|
+
*/
|
|
34
|
+
complexityByOS: Array<ComplexityOSScoreEntry>;
|
|
35
|
+
/**
|
|
36
|
+
* Static lookup table mapping each disk-size tier label to its numeric complexity score. The content is identical for every cluster and reflects the DiskSizeScores configuration in the complexity package.
|
|
37
|
+
*
|
|
38
|
+
* @type {{ [key: string]: number; }}
|
|
39
|
+
* @memberof MigrationComplexityResponse
|
|
40
|
+
*/
|
|
41
|
+
diskSizeRatings: {
|
|
42
|
+
[key: string]: number;
|
|
43
|
+
};
|
|
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 = unclassified, 1-4 = increasing complexity). The map contains one entry per distinct OS name in the cluster, regardless of how many VMs run it.
|
|
46
|
+
*
|
|
47
|
+
* @type {{ [key: string]: number; }}
|
|
48
|
+
* @memberof MigrationComplexityResponse
|
|
49
|
+
*/
|
|
50
|
+
osRatings: {
|
|
51
|
+
[key: string]: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Per-OS-name complexity breakdown. One entry per distinct OS name found in the cluster's inventory. Each entry carries the OS name string, its numeric complexity score (0–4), and the number of VMs running it.
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<ComplexityOSNameEntry>}
|
|
57
|
+
* @memberof MigrationComplexityResponse
|
|
58
|
+
*/
|
|
59
|
+
complexityByOSName: Array<ComplexityOSNameEntry>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the MigrationComplexityResponse interface.
|
|
63
|
+
*/
|
|
64
|
+
export declare function instanceOfMigrationComplexityResponse(value: object): value is MigrationComplexityResponse;
|
|
65
|
+
export declare function MigrationComplexityResponseFromJSON(json: any): MigrationComplexityResponse;
|
|
66
|
+
export declare function MigrationComplexityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationComplexityResponse;
|
|
67
|
+
export declare function MigrationComplexityResponseToJSON(json: any): MigrationComplexityResponse;
|
|
68
|
+
export declare function MigrationComplexityResponseToJSONTyped(value?: MigrationComplexityResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,69 @@
|
|
|
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.instanceOfMigrationComplexityResponse = instanceOfMigrationComplexityResponse;
|
|
17
|
+
exports.MigrationComplexityResponseFromJSON = MigrationComplexityResponseFromJSON;
|
|
18
|
+
exports.MigrationComplexityResponseFromJSONTyped = MigrationComplexityResponseFromJSONTyped;
|
|
19
|
+
exports.MigrationComplexityResponseToJSON = MigrationComplexityResponseToJSON;
|
|
20
|
+
exports.MigrationComplexityResponseToJSONTyped = MigrationComplexityResponseToJSONTyped;
|
|
21
|
+
const ComplexityOSScoreEntry_js_1 = require("./ComplexityOSScoreEntry.js");
|
|
22
|
+
const ComplexityOSNameEntry_js_1 = require("./ComplexityOSNameEntry.js");
|
|
23
|
+
const ComplexityDiskScoreEntry_js_1 = require("./ComplexityDiskScoreEntry.js");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the MigrationComplexityResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfMigrationComplexityResponse(value) {
|
|
28
|
+
if (!('complexityByDisk' in value) || value['complexityByDisk'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('complexityByOS' in value) || value['complexityByOS'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('diskSizeRatings' in value) || value['diskSizeRatings'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('osRatings' in value) || value['osRatings'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('complexityByOSName' in value) || value['complexityByOSName'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function MigrationComplexityResponseFromJSON(json) {
|
|
41
|
+
return MigrationComplexityResponseFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function MigrationComplexityResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'complexityByDisk': (json['complexityByDisk'].map(ComplexityDiskScoreEntry_js_1.ComplexityDiskScoreEntryFromJSON)),
|
|
49
|
+
'complexityByOS': (json['complexityByOS'].map(ComplexityOSScoreEntry_js_1.ComplexityOSScoreEntryFromJSON)),
|
|
50
|
+
'diskSizeRatings': json['diskSizeRatings'],
|
|
51
|
+
'osRatings': json['osRatings'],
|
|
52
|
+
'complexityByOSName': (json['complexityByOSName'].map(ComplexityOSNameEntry_js_1.ComplexityOSNameEntryFromJSON)),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function MigrationComplexityResponseToJSON(json) {
|
|
56
|
+
return MigrationComplexityResponseToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function MigrationComplexityResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'complexityByDisk': (value['complexityByDisk'].map(ComplexityDiskScoreEntry_js_1.ComplexityDiskScoreEntryToJSON)),
|
|
64
|
+
'complexityByOS': (value['complexityByOS'].map(ComplexityOSScoreEntry_js_1.ComplexityOSScoreEntryToJSON)),
|
|
65
|
+
'diskSizeRatings': value['diskSizeRatings'],
|
|
66
|
+
'osRatings': value['osRatings'],
|
|
67
|
+
'complexityByOSName': (value['complexityByOSName'].map(ComplexityOSNameEntry_js_1.ComplexityOSNameEntryToJSON)),
|
|
68
|
+
};
|
|
69
|
+
}
|
package/dist/models/Source.d.ts
CHANGED
|
@@ -73,6 +73,18 @@ export interface Source {
|
|
|
73
73
|
* @memberof Source
|
|
74
74
|
*/
|
|
75
75
|
infra?: SourceInfra;
|
|
76
|
+
/**
|
|
77
|
+
* Agent version (version tag) stored when OVA was downloaded
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof Source
|
|
80
|
+
*/
|
|
81
|
+
agentVersion?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Warning message if stored agent version differs from current agent version
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof Source
|
|
86
|
+
*/
|
|
87
|
+
agentVersionWarning?: string | null;
|
|
76
88
|
}
|
|
77
89
|
/**
|
|
78
90
|
* Check if a given object implements the Source interface.
|
package/dist/models/Source.js
CHANGED
|
@@ -55,6 +55,8 @@ function SourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
55
|
'agent': json['agent'] == null ? undefined : (0, Agent_js_1.AgentFromJSON)(json['agent']),
|
|
56
56
|
'labels': json['labels'] == null ? undefined : (json['labels'].map(Label_js_1.LabelFromJSON)),
|
|
57
57
|
'infra': json['infra'] == null ? undefined : (0, SourceInfra_js_1.SourceInfraFromJSON)(json['infra']),
|
|
58
|
+
'agentVersion': json['agentVersion'] == null ? undefined : json['agentVersion'],
|
|
59
|
+
'agentVersionWarning': json['agentVersionWarning'] == null ? undefined : json['agentVersionWarning'],
|
|
58
60
|
};
|
|
59
61
|
}
|
|
60
62
|
function SourceToJSON(json) {
|
|
@@ -74,5 +76,7 @@ function SourceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
74
76
|
'agent': (0, Agent_js_1.AgentToJSON)(value['agent']),
|
|
75
77
|
'labels': value['labels'] == null ? undefined : (value['labels'].map(Label_js_1.LabelToJSON)),
|
|
76
78
|
'infra': (0, SourceInfra_js_1.SourceInfraToJSON)(value['infra']),
|
|
79
|
+
'agentVersion': value['agentVersion'],
|
|
80
|
+
'agentVersionWarning': value['agentVersionWarning'],
|
|
77
81
|
};
|
|
78
82
|
}
|
package/dist/models/VMs.d.ts
CHANGED
|
@@ -90,6 +90,14 @@ export interface VMs {
|
|
|
90
90
|
distributionByNicCount?: {
|
|
91
91
|
[key: string]: number;
|
|
92
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
|
|
95
|
+
* @type {{ [key: string]: number; }}
|
|
96
|
+
* @memberof VMs
|
|
97
|
+
*/
|
|
98
|
+
distributionByComplexity?: {
|
|
99
|
+
[key: string]: number;
|
|
100
|
+
};
|
|
93
101
|
/**
|
|
94
102
|
*
|
|
95
103
|
* @type {VMResourceBreakdown}
|
package/dist/models/VMs.js
CHANGED
|
@@ -66,6 +66,7 @@ function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
66
|
'distributionByCpuTier': json['distributionByCpuTier'] == null ? undefined : json['distributionByCpuTier'],
|
|
67
67
|
'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
|
|
68
68
|
'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
|
|
69
|
+
'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
|
|
69
70
|
'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['ramGB']),
|
|
70
71
|
'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskGB']),
|
|
71
72
|
'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskCount']),
|
|
@@ -95,6 +96,7 @@ function VMsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
95
96
|
'distributionByCpuTier': value['distributionByCpuTier'],
|
|
96
97
|
'distributionByMemoryTier': value['distributionByMemoryTier'],
|
|
97
98
|
'distributionByNicCount': value['distributionByNicCount'],
|
|
99
|
+
'distributionByComplexity': value['distributionByComplexity'],
|
|
98
100
|
'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['ramGB']),
|
|
99
101
|
'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskGB']),
|
|
100
102
|
'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskCount']),
|
package/dist/models/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export * from './AssessmentUpdate.js';
|
|
|
6
6
|
export * from './ClusterRequirementsRequest.js';
|
|
7
7
|
export * from './ClusterRequirementsResponse.js';
|
|
8
8
|
export * from './ClusterSizing.js';
|
|
9
|
+
export * from './ComplexityDiskScoreEntry.js';
|
|
10
|
+
export * from './ComplexityOSNameEntry.js';
|
|
11
|
+
export * from './ComplexityOSScoreEntry.js';
|
|
9
12
|
export * from './Datastore.js';
|
|
10
13
|
export * from './DiskSizeTierSummary.js';
|
|
11
14
|
export * from './DiskTypeSummary.js';
|
|
@@ -21,6 +24,8 @@ export * from './Ipv4Config.js';
|
|
|
21
24
|
export * from './Job.js';
|
|
22
25
|
export * from './JobStatus.js';
|
|
23
26
|
export * from './Label.js';
|
|
27
|
+
export * from './MigrationComplexityRequest.js';
|
|
28
|
+
export * from './MigrationComplexityResponse.js';
|
|
24
29
|
export * from './MigrationEstimationRequest.js';
|
|
25
30
|
export * from './MigrationEstimationResponse.js';
|
|
26
31
|
export * from './MigrationIssue.js';
|
package/dist/models/index.js
CHANGED
|
@@ -24,6 +24,9 @@ __exportStar(require("./AssessmentUpdate.js"), exports);
|
|
|
24
24
|
__exportStar(require("./ClusterRequirementsRequest.js"), exports);
|
|
25
25
|
__exportStar(require("./ClusterRequirementsResponse.js"), exports);
|
|
26
26
|
__exportStar(require("./ClusterSizing.js"), exports);
|
|
27
|
+
__exportStar(require("./ComplexityDiskScoreEntry.js"), exports);
|
|
28
|
+
__exportStar(require("./ComplexityOSNameEntry.js"), exports);
|
|
29
|
+
__exportStar(require("./ComplexityOSScoreEntry.js"), exports);
|
|
27
30
|
__exportStar(require("./Datastore.js"), exports);
|
|
28
31
|
__exportStar(require("./DiskSizeTierSummary.js"), exports);
|
|
29
32
|
__exportStar(require("./DiskTypeSummary.js"), exports);
|
|
@@ -39,6 +42,8 @@ __exportStar(require("./Ipv4Config.js"), exports);
|
|
|
39
42
|
__exportStar(require("./Job.js"), exports);
|
|
40
43
|
__exportStar(require("./JobStatus.js"), exports);
|
|
41
44
|
__exportStar(require("./Label.js"), exports);
|
|
45
|
+
__exportStar(require("./MigrationComplexityRequest.js"), exports);
|
|
46
|
+
__exportStar(require("./MigrationComplexityResponse.js"), exports);
|
|
42
47
|
__exportStar(require("./MigrationEstimationRequest.js"), exports);
|
|
43
48
|
__exportStar(require("./MigrationEstimationResponse.js"), exports);
|
|
44
49
|
__exportStar(require("./MigrationIssue.js"), exports);
|
package/docs/AssessmentApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**calculateAssessmentClusterRequirements**](AssessmentApi.md#calculateassessmentclusterrequirements) | **POST** /api/v1/assessments/{id}/cluster-requirements | |
|
|
8
|
+
| [**calculateMigrationComplexity**](AssessmentApi.md#calculatemigrationcomplexity) | **POST** /api/v1/assessments/{id}/complexity-estimation | |
|
|
8
9
|
| [**calculateMigrationEstimation**](AssessmentApi.md#calculatemigrationestimation) | **POST** /api/v1/assessments/{id}/migration-estimation | |
|
|
9
10
|
| [**createAssessment**](AssessmentApi.md#createassessment) | **POST** /api/v1/assessments | |
|
|
10
11
|
| [**deleteAssessment**](AssessmentApi.md#deleteassessment) | **DELETE** /api/v1/assessments/{id} | |
|
|
@@ -90,6 +91,81 @@ No authorization required
|
|
|
90
91
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
91
92
|
|
|
92
93
|
|
|
94
|
+
## calculateMigrationComplexity
|
|
95
|
+
|
|
96
|
+
> MigrationComplexityResponse calculateMigrationComplexity(id, migrationComplexityRequest)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
Calculate migration complexity estimation for an assessment cluster
|
|
101
|
+
|
|
102
|
+
### Example
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
import {
|
|
106
|
+
Configuration,
|
|
107
|
+
AssessmentApi,
|
|
108
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
109
|
+
import type { CalculateMigrationComplexityRequest } from '@openshift-migration-advisor/planner-sdk';
|
|
110
|
+
|
|
111
|
+
async function example() {
|
|
112
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
113
|
+
const api = new AssessmentApi();
|
|
114
|
+
|
|
115
|
+
const body = {
|
|
116
|
+
// string | ID of the assessment
|
|
117
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
118
|
+
// MigrationComplexityRequest
|
|
119
|
+
migrationComplexityRequest: {"clusterId":"domain-c8"},
|
|
120
|
+
} satisfies CalculateMigrationComplexityRequest;
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
const data = await api.calculateMigrationComplexity(body);
|
|
124
|
+
console.log(data);
|
|
125
|
+
} catch (error) {
|
|
126
|
+
console.error(error);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Run the test
|
|
131
|
+
example().catch(console.error);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
| Name | Type | Description | Notes |
|
|
138
|
+
|------------- | ------------- | ------------- | -------------|
|
|
139
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
140
|
+
| **migrationComplexityRequest** | [MigrationComplexityRequest](MigrationComplexityRequest.md) | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**MigrationComplexityResponse**](MigrationComplexityResponse.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
No authorization required
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: `application/json`
|
|
153
|
+
- **Accept**: `application/json`
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### HTTP response details
|
|
157
|
+
| Status code | Description | Response headers |
|
|
158
|
+
|-------------|-------------|------------------|
|
|
159
|
+
| **200** | Migration complexity estimation successful | - |
|
|
160
|
+
| **400** | Bad Request | - |
|
|
161
|
+
| **401** | Unauthorized | - |
|
|
162
|
+
| **403** | Forbidden | - |
|
|
163
|
+
| **404** | Assessment not found | - |
|
|
164
|
+
| **500** | Internal error | - |
|
|
165
|
+
|
|
166
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
167
|
+
|
|
168
|
+
|
|
93
169
|
## calculateMigrationEstimation
|
|
94
170
|
|
|
95
171
|
> MigrationEstimationResponse calculateMigrationEstimation(id, migrationEstimationRequest)
|
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`controlPlaneSchedulable` | boolean
|
|
17
17
|
`controlPlaneCPU` | number
|
|
18
18
|
`controlPlaneMemory` | number
|
|
19
|
+
`controlPlaneNodeCount` | number
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -33,6 +34,7 @@ const example = {
|
|
|
33
34
|
"controlPlaneSchedulable": null,
|
|
34
35
|
"controlPlaneCPU": null,
|
|
35
36
|
"controlPlaneMemory": null,
|
|
37
|
+
"controlPlaneNodeCount": null,
|
|
36
38
|
} satisfies ClusterRequirementsRequest
|
|
37
39
|
|
|
38
40
|
console.log(example)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# ComplexityDiskScoreEntry
|
|
3
|
+
|
|
4
|
+
One entry in the disk complexity breakdown
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`score` | number
|
|
11
|
+
`vmCount` | number
|
|
12
|
+
`totalSizeTB` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ComplexityDiskScoreEntry } from '@openshift-migration-advisor/planner-sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"score": null,
|
|
22
|
+
"vmCount": null,
|
|
23
|
+
"totalSizeTB": null,
|
|
24
|
+
} satisfies ComplexityDiskScoreEntry
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as ComplexityDiskScoreEntry
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# ComplexityOSNameEntry
|
|
3
|
+
|
|
4
|
+
One entry in the per-OS-name complexity breakdown.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`osName` | string
|
|
11
|
+
`score` | number
|
|
12
|
+
`vmCount` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ComplexityOSNameEntry } from '@openshift-migration-advisor/planner-sdk'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"osName": null,
|
|
22
|
+
"score": null,
|
|
23
|
+
"vmCount": null,
|
|
24
|
+
} satisfies ComplexityOSNameEntry
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as ComplexityOSNameEntry
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|