@openshift-migration-advisor/planner-sdk 0.6.0 → 0.7.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 +8 -0
- package/README.md +7 -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/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 +60 -0
- package/dist/esm/models/MigrationComplexityResponse.js +57 -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 +4 -0
- package/dist/esm/models/index.js +4 -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/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 +60 -0
- package/dist/models/MigrationComplexityResponse.js +64 -0
- package/dist/models/VMs.d.ts +8 -0
- package/dist/models/VMs.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/AssessmentApi.md +76 -0
- package/docs/ClusterRequirementsRequest.md +2 -0
- package/docs/ComplexityDiskScoreEntry.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 +41 -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/ComplexityOSScoreEntry.ts +76 -0
- package/src/models/Info.ts +16 -0
- package/src/models/MigrationComplexityRequest.ts +66 -0
- package/src/models/MigrationComplexityResponse.ts +112 -0
- package/src/models/VMs.ts +8 -0
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,60 @@
|
|
|
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 { ComplexityDiskScoreEntry } from './ComplexityDiskScoreEntry.js';
|
|
14
|
+
/**
|
|
15
|
+
* Migration complexity estimation results
|
|
16
|
+
* @export
|
|
17
|
+
* @interface MigrationComplexityResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface MigrationComplexityResponse {
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*
|
|
23
|
+
* @type {Array<ComplexityDiskScoreEntry>}
|
|
24
|
+
* @memberof MigrationComplexityResponse
|
|
25
|
+
*/
|
|
26
|
+
complexityByDisk: Array<ComplexityDiskScoreEntry>;
|
|
27
|
+
/**
|
|
28
|
+
* 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.
|
|
29
|
+
*
|
|
30
|
+
* @type {Array<ComplexityOSScoreEntry>}
|
|
31
|
+
* @memberof MigrationComplexityResponse
|
|
32
|
+
*/
|
|
33
|
+
complexityByOS: Array<ComplexityOSScoreEntry>;
|
|
34
|
+
/**
|
|
35
|
+
* 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.
|
|
36
|
+
*
|
|
37
|
+
* @type {{ [key: string]: number; }}
|
|
38
|
+
* @memberof MigrationComplexityResponse
|
|
39
|
+
*/
|
|
40
|
+
diskSizeRatings: {
|
|
41
|
+
[key: string]: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 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.
|
|
45
|
+
*
|
|
46
|
+
* @type {{ [key: string]: number; }}
|
|
47
|
+
* @memberof MigrationComplexityResponse
|
|
48
|
+
*/
|
|
49
|
+
osRatings: {
|
|
50
|
+
[key: string]: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the MigrationComplexityResponse interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfMigrationComplexityResponse(value: object): value is MigrationComplexityResponse;
|
|
57
|
+
export declare function MigrationComplexityResponseFromJSON(json: any): MigrationComplexityResponse;
|
|
58
|
+
export declare function MigrationComplexityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationComplexityResponse;
|
|
59
|
+
export declare function MigrationComplexityResponseToJSON(json: any): MigrationComplexityResponse;
|
|
60
|
+
export declare function MigrationComplexityResponseToJSONTyped(value?: MigrationComplexityResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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 ComplexityDiskScoreEntry_js_1 = require("./ComplexityDiskScoreEntry.js");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the MigrationComplexityResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfMigrationComplexityResponse(value) {
|
|
27
|
+
if (!('complexityByDisk' in value) || value['complexityByDisk'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('complexityByOS' in value) || value['complexityByOS'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('diskSizeRatings' in value) || value['diskSizeRatings'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('osRatings' in value) || value['osRatings'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function MigrationComplexityResponseFromJSON(json) {
|
|
38
|
+
return MigrationComplexityResponseFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function MigrationComplexityResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'complexityByDisk': (json['complexityByDisk'].map(ComplexityDiskScoreEntry_js_1.ComplexityDiskScoreEntryFromJSON)),
|
|
46
|
+
'complexityByOS': (json['complexityByOS'].map(ComplexityOSScoreEntry_js_1.ComplexityOSScoreEntryFromJSON)),
|
|
47
|
+
'diskSizeRatings': json['diskSizeRatings'],
|
|
48
|
+
'osRatings': json['osRatings'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function MigrationComplexityResponseToJSON(json) {
|
|
52
|
+
return MigrationComplexityResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function MigrationComplexityResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'complexityByDisk': (value['complexityByDisk'].map(ComplexityDiskScoreEntry_js_1.ComplexityDiskScoreEntryToJSON)),
|
|
60
|
+
'complexityByOS': (value['complexityByOS'].map(ComplexityOSScoreEntry_js_1.ComplexityOSScoreEntryToJSON)),
|
|
61
|
+
'diskSizeRatings': value['diskSizeRatings'],
|
|
62
|
+
'osRatings': value['osRatings'],
|
|
63
|
+
};
|
|
64
|
+
}
|
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,8 @@ 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 './ComplexityOSScoreEntry.js';
|
|
9
11
|
export * from './Datastore.js';
|
|
10
12
|
export * from './DiskSizeTierSummary.js';
|
|
11
13
|
export * from './DiskTypeSummary.js';
|
|
@@ -21,6 +23,8 @@ export * from './Ipv4Config.js';
|
|
|
21
23
|
export * from './Job.js';
|
|
22
24
|
export * from './JobStatus.js';
|
|
23
25
|
export * from './Label.js';
|
|
26
|
+
export * from './MigrationComplexityRequest.js';
|
|
27
|
+
export * from './MigrationComplexityResponse.js';
|
|
24
28
|
export * from './MigrationEstimationRequest.js';
|
|
25
29
|
export * from './MigrationEstimationResponse.js';
|
|
26
30
|
export * from './MigrationIssue.js';
|
package/dist/models/index.js
CHANGED
|
@@ -24,6 +24,8 @@ __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("./ComplexityOSScoreEntry.js"), exports);
|
|
27
29
|
__exportStar(require("./Datastore.js"), exports);
|
|
28
30
|
__exportStar(require("./DiskSizeTierSummary.js"), exports);
|
|
29
31
|
__exportStar(require("./DiskTypeSummary.js"), exports);
|
|
@@ -39,6 +41,8 @@ __exportStar(require("./Ipv4Config.js"), exports);
|
|
|
39
41
|
__exportStar(require("./Job.js"), exports);
|
|
40
42
|
__exportStar(require("./JobStatus.js"), exports);
|
|
41
43
|
__exportStar(require("./Label.js"), exports);
|
|
44
|
+
__exportStar(require("./MigrationComplexityRequest.js"), exports);
|
|
45
|
+
__exportStar(require("./MigrationComplexityResponse.js"), exports);
|
|
42
46
|
__exportStar(require("./MigrationEstimationRequest.js"), exports);
|
|
43
47
|
__exportStar(require("./MigrationEstimationResponse.js"), exports);
|
|
44
48
|
__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,37 @@
|
|
|
1
|
+
|
|
2
|
+
# ComplexityOSScoreEntry
|
|
3
|
+
|
|
4
|
+
One entry in the OS complexity breakdown
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`score` | number
|
|
11
|
+
`vmCount` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ComplexityOSScoreEntry } from '@openshift-migration-advisor/planner-sdk'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"score": null,
|
|
21
|
+
"vmCount": null,
|
|
22
|
+
} satisfies ComplexityOSScoreEntry
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as ComplexityOSScoreEntry
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/docs/Info.md
CHANGED
|
@@ -9,6 +9,8 @@ Name | Type
|
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`gitCommit` | string
|
|
11
11
|
`versionName` | string
|
|
12
|
+
`agentGitCommit` | string
|
|
13
|
+
`agentVersionName` | string
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -19,6 +21,8 @@ import type { Info } from '@openshift-migration-advisor/planner-sdk'
|
|
|
19
21
|
const example = {
|
|
20
22
|
"gitCommit": c5a1661465a25b17ceeeb77d1ec40deb57d8da44,
|
|
21
23
|
"versionName": 0.1.4-40-gc5a1661,
|
|
24
|
+
"agentGitCommit": c5a1661465a25b17ceeeb77d1ec40deb57d8da44,
|
|
25
|
+
"agentVersionName": 0.1.4-40-gc5a1661,
|
|
22
26
|
} satisfies Info
|
|
23
27
|
|
|
24
28
|
console.log(example)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# MigrationComplexityRequest
|
|
3
|
+
|
|
4
|
+
Request payload for calculating migration complexity estimation
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`clusterId` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { MigrationComplexityRequest } from '@openshift-migration-advisor/planner-sdk'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"clusterId": domain-c8,
|
|
20
|
+
} satisfies MigrationComplexityRequest
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as MigrationComplexityRequest
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# MigrationComplexityResponse
|
|
3
|
+
|
|
4
|
+
Migration complexity estimation results
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`complexityByDisk` | [Array<ComplexityDiskScoreEntry>](ComplexityDiskScoreEntry.md)
|
|
11
|
+
`complexityByOS` | [Array<ComplexityOSScoreEntry>](ComplexityOSScoreEntry.md)
|
|
12
|
+
`diskSizeRatings` | { [key: string]: number; }
|
|
13
|
+
`osRatings` | { [key: string]: number; }
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { MigrationComplexityResponse } from '@openshift-migration-advisor/planner-sdk'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"complexityByDisk": null,
|
|
23
|
+
"complexityByOS": null,
|
|
24
|
+
"diskSizeRatings": null,
|
|
25
|
+
"osRatings": null,
|
|
26
|
+
} satisfies MigrationComplexityResponse
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as MigrationComplexityResponse
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
package/docs/VMs.md
CHANGED
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`distributionByCpuTier` | { [key: string]: number; }
|
|
17
17
|
`distributionByMemoryTier` | { [key: string]: number; }
|
|
18
18
|
`distributionByNicCount` | { [key: string]: number; }
|
|
19
|
+
`distributionByComplexity` | { [key: string]: number; }
|
|
19
20
|
`ramGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
20
21
|
`diskGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
21
22
|
`diskCount` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
@@ -43,6 +44,7 @@ const example = {
|
|
|
43
44
|
"distributionByCpuTier": null,
|
|
44
45
|
"distributionByMemoryTier": null,
|
|
45
46
|
"distributionByNicCount": null,
|
|
47
|
+
"distributionByComplexity": null,
|
|
46
48
|
"ramGB": null,
|
|
47
49
|
"diskGB": null,
|
|
48
50
|
"diskCount": null,
|
package/package.json
CHANGED
|
@@ -20,6 +20,8 @@ import type {
|
|
|
20
20
|
AssessmentUpdate,
|
|
21
21
|
ClusterRequirementsRequest,
|
|
22
22
|
ClusterRequirementsResponse,
|
|
23
|
+
MigrationComplexityRequest,
|
|
24
|
+
MigrationComplexityResponse,
|
|
23
25
|
MigrationEstimationRequest,
|
|
24
26
|
MigrationEstimationResponse,
|
|
25
27
|
} from '../models/index.js';
|
|
@@ -34,6 +36,10 @@ import {
|
|
|
34
36
|
ClusterRequirementsRequestToJSON,
|
|
35
37
|
ClusterRequirementsResponseFromJSON,
|
|
36
38
|
ClusterRequirementsResponseToJSON,
|
|
39
|
+
MigrationComplexityRequestFromJSON,
|
|
40
|
+
MigrationComplexityRequestToJSON,
|
|
41
|
+
MigrationComplexityResponseFromJSON,
|
|
42
|
+
MigrationComplexityResponseToJSON,
|
|
37
43
|
MigrationEstimationRequestFromJSON,
|
|
38
44
|
MigrationEstimationRequestToJSON,
|
|
39
45
|
MigrationEstimationResponseFromJSON,
|
|
@@ -45,6 +51,11 @@ export interface CalculateAssessmentClusterRequirementsRequest {
|
|
|
45
51
|
clusterRequirementsRequest: ClusterRequirementsRequest;
|
|
46
52
|
}
|
|
47
53
|
|
|
54
|
+
export interface CalculateMigrationComplexityRequest {
|
|
55
|
+
id: string;
|
|
56
|
+
migrationComplexityRequest: MigrationComplexityRequest;
|
|
57
|
+
}
|
|
58
|
+
|
|
48
59
|
export interface CalculateMigrationEstimationRequest {
|
|
49
60
|
id: string;
|
|
50
61
|
migrationEstimationRequest: MigrationEstimationRequest;
|
|
@@ -102,6 +113,30 @@ export interface AssessmentApiInterface {
|
|
|
102
113
|
*/
|
|
103
114
|
calculateAssessmentClusterRequirements(requestParameters: CalculateAssessmentClusterRequirementsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClusterRequirementsResponse>;
|
|
104
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
118
|
+
* @param {string} id ID of the assessment
|
|
119
|
+
* @param {MigrationComplexityRequest} migrationComplexityRequest
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof AssessmentApiInterface
|
|
122
|
+
*/
|
|
123
|
+
calculateMigrationComplexityRequestOpts(requestParameters: CalculateMigrationComplexityRequest): Promise<runtime.RequestOpts>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Calculate migration complexity estimation for an assessment cluster
|
|
127
|
+
* @param {string} id ID of the assessment
|
|
128
|
+
* @param {MigrationComplexityRequest} migrationComplexityRequest
|
|
129
|
+
* @param {*} [options] Override http request option.
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
* @memberof AssessmentApiInterface
|
|
132
|
+
*/
|
|
133
|
+
calculateMigrationComplexityRaw(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationComplexityResponse>>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Calculate migration complexity estimation for an assessment cluster
|
|
137
|
+
*/
|
|
138
|
+
calculateMigrationComplexity(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationComplexityResponse>;
|
|
139
|
+
|
|
105
140
|
/**
|
|
106
141
|
* Creates request options for calculateMigrationEstimation without sending the request
|
|
107
142
|
* @param {string} id ID of the assessment
|
|
@@ -300,6 +335,61 @@ export class AssessmentApi extends runtime.BaseAPI implements AssessmentApiInter
|
|
|
300
335
|
return await response.value();
|
|
301
336
|
}
|
|
302
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
340
|
+
*/
|
|
341
|
+
async calculateMigrationComplexityRequestOpts(requestParameters: CalculateMigrationComplexityRequest): Promise<runtime.RequestOpts> {
|
|
342
|
+
if (requestParameters['id'] == null) {
|
|
343
|
+
throw new runtime.RequiredError(
|
|
344
|
+
'id',
|
|
345
|
+
'Required parameter "id" was null or undefined when calling calculateMigrationComplexity().'
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (requestParameters['migrationComplexityRequest'] == null) {
|
|
350
|
+
throw new runtime.RequiredError(
|
|
351
|
+
'migrationComplexityRequest',
|
|
352
|
+
'Required parameter "migrationComplexityRequest" was null or undefined when calling calculateMigrationComplexity().'
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
const queryParameters: any = {};
|
|
357
|
+
|
|
358
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
359
|
+
|
|
360
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
let urlPath = `/api/v1/assessments/{id}/complexity-estimation`;
|
|
364
|
+
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
365
|
+
|
|
366
|
+
return {
|
|
367
|
+
path: urlPath,
|
|
368
|
+
method: 'POST',
|
|
369
|
+
headers: headerParameters,
|
|
370
|
+
query: queryParameters,
|
|
371
|
+
body: MigrationComplexityRequestToJSON(requestParameters['migrationComplexityRequest']),
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Calculate migration complexity estimation for an assessment cluster
|
|
377
|
+
*/
|
|
378
|
+
async calculateMigrationComplexityRaw(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationComplexityResponse>> {
|
|
379
|
+
const requestOptions = await this.calculateMigrationComplexityRequestOpts(requestParameters);
|
|
380
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
381
|
+
|
|
382
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MigrationComplexityResponseFromJSON(jsonValue));
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Calculate migration complexity estimation for an assessment cluster
|
|
387
|
+
*/
|
|
388
|
+
async calculateMigrationComplexity(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationComplexityResponse> {
|
|
389
|
+
const response = await this.calculateMigrationComplexityRaw(requestParameters, initOverrides);
|
|
390
|
+
return await response.value();
|
|
391
|
+
}
|
|
392
|
+
|
|
303
393
|
/**
|
|
304
394
|
* Creates request options for calculateMigrationEstimation without sending the request
|
|
305
395
|
*/
|
|
@@ -73,6 +73,12 @@ export interface ClusterRequirementsRequest {
|
|
|
73
73
|
* @memberof ClusterRequirementsRequest
|
|
74
74
|
*/
|
|
75
75
|
controlPlaneMemory?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Number of control plane nodes (1 for single node, 3 for HA)
|
|
78
|
+
* @type {ClusterRequirementsRequestControlPlaneNodeCountEnum}
|
|
79
|
+
* @memberof ClusterRequirementsRequest
|
|
80
|
+
*/
|
|
81
|
+
controlPlaneNodeCount?: ClusterRequirementsRequestControlPlaneNodeCountEnum;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
|
|
@@ -97,6 +103,15 @@ export const ClusterRequirementsRequestMemoryOverCommitRatioEnum = {
|
|
|
97
103
|
} as const;
|
|
98
104
|
export type ClusterRequirementsRequestMemoryOverCommitRatioEnum = typeof ClusterRequirementsRequestMemoryOverCommitRatioEnum[keyof typeof ClusterRequirementsRequestMemoryOverCommitRatioEnum];
|
|
99
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export const ClusterRequirementsRequestControlPlaneNodeCountEnum = {
|
|
110
|
+
NUMBER_1: 1,
|
|
111
|
+
NUMBER_3: 3
|
|
112
|
+
} as const;
|
|
113
|
+
export type ClusterRequirementsRequestControlPlaneNodeCountEnum = typeof ClusterRequirementsRequestControlPlaneNodeCountEnum[keyof typeof ClusterRequirementsRequestControlPlaneNodeCountEnum];
|
|
114
|
+
|
|
100
115
|
|
|
101
116
|
/**
|
|
102
117
|
* Check if a given object implements the ClusterRequirementsRequest interface.
|
|
@@ -129,6 +144,7 @@ export function ClusterRequirementsRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
129
144
|
'controlPlaneSchedulable': json['controlPlaneSchedulable'] == null ? undefined : json['controlPlaneSchedulable'],
|
|
130
145
|
'controlPlaneCPU': json['controlPlaneCPU'] == null ? undefined : json['controlPlaneCPU'],
|
|
131
146
|
'controlPlaneMemory': json['controlPlaneMemory'] == null ? undefined : json['controlPlaneMemory'],
|
|
147
|
+
'controlPlaneNodeCount': json['controlPlaneNodeCount'] == null ? undefined : json['controlPlaneNodeCount'],
|
|
132
148
|
};
|
|
133
149
|
}
|
|
134
150
|
|
|
@@ -152,6 +168,7 @@ export function ClusterRequirementsRequestToJSONTyped(value?: ClusterRequirement
|
|
|
152
168
|
'controlPlaneSchedulable': value['controlPlaneSchedulable'],
|
|
153
169
|
'controlPlaneCPU': value['controlPlaneCPU'],
|
|
154
170
|
'controlPlaneMemory': value['controlPlaneMemory'],
|
|
171
|
+
'controlPlaneNodeCount': value['controlPlaneNodeCount'],
|
|
155
172
|
};
|
|
156
173
|
}
|
|
157
174
|
|