@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.
Files changed (56) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +7 -2
  3. package/dist/apis/AssessmentApi.d.ts +38 -1
  4. package/dist/apis/AssessmentApi.js +44 -0
  5. package/dist/esm/apis/AssessmentApi.d.ts +38 -1
  6. package/dist/esm/apis/AssessmentApi.js +45 -1
  7. package/dist/esm/models/ClusterRequirementsRequest.d.ts +14 -0
  8. package/dist/esm/models/ClusterRequirementsRequest.js +9 -0
  9. package/dist/esm/models/ComplexityDiskScoreEntry.d.ts +45 -0
  10. package/dist/esm/models/ComplexityDiskScoreEntry.js +51 -0
  11. package/dist/esm/models/ComplexityOSScoreEntry.d.ts +39 -0
  12. package/dist/esm/models/ComplexityOSScoreEntry.js +47 -0
  13. package/dist/esm/models/Info.d.ts +12 -0
  14. package/dist/esm/models/Info.js +4 -0
  15. package/dist/esm/models/MigrationComplexityRequest.d.ts +32 -0
  16. package/dist/esm/models/MigrationComplexityRequest.js +43 -0
  17. package/dist/esm/models/MigrationComplexityResponse.d.ts +60 -0
  18. package/dist/esm/models/MigrationComplexityResponse.js +57 -0
  19. package/dist/esm/models/VMs.d.ts +8 -0
  20. package/dist/esm/models/VMs.js +2 -0
  21. package/dist/esm/models/index.d.ts +4 -0
  22. package/dist/esm/models/index.js +4 -0
  23. package/dist/models/ClusterRequirementsRequest.d.ts +14 -0
  24. package/dist/models/ClusterRequirementsRequest.js +10 -1
  25. package/dist/models/ComplexityDiskScoreEntry.d.ts +45 -0
  26. package/dist/models/ComplexityDiskScoreEntry.js +58 -0
  27. package/dist/models/ComplexityOSScoreEntry.d.ts +39 -0
  28. package/dist/models/ComplexityOSScoreEntry.js +54 -0
  29. package/dist/models/Info.d.ts +12 -0
  30. package/dist/models/Info.js +4 -0
  31. package/dist/models/MigrationComplexityRequest.d.ts +32 -0
  32. package/dist/models/MigrationComplexityRequest.js +50 -0
  33. package/dist/models/MigrationComplexityResponse.d.ts +60 -0
  34. package/dist/models/MigrationComplexityResponse.js +64 -0
  35. package/dist/models/VMs.d.ts +8 -0
  36. package/dist/models/VMs.js +2 -0
  37. package/dist/models/index.d.ts +4 -0
  38. package/dist/models/index.js +4 -0
  39. package/docs/AssessmentApi.md +76 -0
  40. package/docs/ClusterRequirementsRequest.md +2 -0
  41. package/docs/ComplexityDiskScoreEntry.md +39 -0
  42. package/docs/ComplexityOSScoreEntry.md +37 -0
  43. package/docs/Info.md +4 -0
  44. package/docs/MigrationComplexityRequest.md +35 -0
  45. package/docs/MigrationComplexityResponse.md +41 -0
  46. package/docs/VMs.md +2 -0
  47. package/package.json +1 -1
  48. package/src/apis/AssessmentApi.ts +90 -0
  49. package/src/models/ClusterRequirementsRequest.ts +17 -0
  50. package/src/models/ComplexityDiskScoreEntry.ts +85 -0
  51. package/src/models/ComplexityOSScoreEntry.ts +76 -0
  52. package/src/models/Info.ts +16 -0
  53. package/src/models/MigrationComplexityRequest.ts +66 -0
  54. package/src/models/MigrationComplexityResponse.ts +112 -0
  55. package/src/models/VMs.ts +8 -0
  56. package/src/models/index.ts +4 -0
@@ -0,0 +1,85 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * OpenShift Migration Advisor API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * One entry in the disk complexity breakdown
18
+ * @export
19
+ * @interface ComplexityDiskScoreEntry
20
+ */
21
+ export interface ComplexityDiskScoreEntry {
22
+ /**
23
+ * Complexity score from 1 to 4, where 1 is the least complex disk footprint and 4 is the most complex. Score 1: <=10 TB provisioned; score 2: <=20 TB; score 3: <=50 TB; score 4: >50 TB.
24
+ *
25
+ * @type {number}
26
+ * @memberof ComplexityDiskScoreEntry
27
+ */
28
+ score: number;
29
+ /**
30
+ * Number of VMs at this complexity score
31
+ * @type {number}
32
+ * @memberof ComplexityDiskScoreEntry
33
+ */
34
+ vmCount: number;
35
+ /**
36
+ * Total provisioned storage in TB for VMs at this score
37
+ * @type {number}
38
+ * @memberof ComplexityDiskScoreEntry
39
+ */
40
+ totalSizeTB: number;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the ComplexityDiskScoreEntry interface.
45
+ */
46
+ export function instanceOfComplexityDiskScoreEntry(value: object): value is ComplexityDiskScoreEntry {
47
+ if (!('score' in value) || value['score'] === undefined) return false;
48
+ if (!('vmCount' in value) || value['vmCount'] === undefined) return false;
49
+ if (!('totalSizeTB' in value) || value['totalSizeTB'] === undefined) return false;
50
+ return true;
51
+ }
52
+
53
+ export function ComplexityDiskScoreEntryFromJSON(json: any): ComplexityDiskScoreEntry {
54
+ return ComplexityDiskScoreEntryFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function ComplexityDiskScoreEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComplexityDiskScoreEntry {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'score': json['score'],
64
+ 'vmCount': json['vmCount'],
65
+ 'totalSizeTB': json['totalSizeTB'],
66
+ };
67
+ }
68
+
69
+ export function ComplexityDiskScoreEntryToJSON(json: any): ComplexityDiskScoreEntry {
70
+ return ComplexityDiskScoreEntryToJSONTyped(json, false);
71
+ }
72
+
73
+ export function ComplexityDiskScoreEntryToJSONTyped(value?: ComplexityDiskScoreEntry | null, ignoreDiscriminator: boolean = false): any {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+
78
+ return {
79
+
80
+ 'score': value['score'],
81
+ 'vmCount': value['vmCount'],
82
+ 'totalSizeTB': value['totalSizeTB'],
83
+ };
84
+ }
85
+
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * OpenShift Migration Advisor API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * One entry in the OS complexity breakdown
18
+ * @export
19
+ * @interface ComplexityOSScoreEntry
20
+ */
21
+ export interface ComplexityOSScoreEntry {
22
+ /**
23
+ * 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.
24
+ *
25
+ * @type {number}
26
+ * @memberof ComplexityOSScoreEntry
27
+ */
28
+ score: number;
29
+ /**
30
+ * Number of VMs at this complexity score
31
+ * @type {number}
32
+ * @memberof ComplexityOSScoreEntry
33
+ */
34
+ vmCount: number;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the ComplexityOSScoreEntry interface.
39
+ */
40
+ export function instanceOfComplexityOSScoreEntry(value: object): value is ComplexityOSScoreEntry {
41
+ if (!('score' in value) || value['score'] === undefined) return false;
42
+ if (!('vmCount' in value) || value['vmCount'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function ComplexityOSScoreEntryFromJSON(json: any): ComplexityOSScoreEntry {
47
+ return ComplexityOSScoreEntryFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function ComplexityOSScoreEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComplexityOSScoreEntry {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'score': json['score'],
57
+ 'vmCount': json['vmCount'],
58
+ };
59
+ }
60
+
61
+ export function ComplexityOSScoreEntryToJSON(json: any): ComplexityOSScoreEntry {
62
+ return ComplexityOSScoreEntryToJSONTyped(json, false);
63
+ }
64
+
65
+ export function ComplexityOSScoreEntryToJSONTyped(value?: ComplexityOSScoreEntry | null, ignoreDiscriminator: boolean = false): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+
70
+ return {
71
+
72
+ 'score': value['score'],
73
+ 'vmCount': value['vmCount'],
74
+ };
75
+ }
76
+
@@ -31,6 +31,18 @@ export interface Info {
31
31
  * @memberof Info
32
32
  */
33
33
  versionName: string;
34
+ /**
35
+ * Agent git commit hash
36
+ * @type {string}
37
+ * @memberof Info
38
+ */
39
+ agentGitCommit?: string | null;
40
+ /**
41
+ * Agent version name, based on git tag
42
+ * @type {string}
43
+ * @memberof Info
44
+ */
45
+ agentVersionName?: string | null;
34
46
  }
35
47
 
36
48
  /**
@@ -54,6 +66,8 @@ export function InfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Info
54
66
 
55
67
  'gitCommit': json['gitCommit'],
56
68
  'versionName': json['versionName'],
69
+ 'agentGitCommit': json['agentGitCommit'] == null ? undefined : json['agentGitCommit'],
70
+ 'agentVersionName': json['agentVersionName'] == null ? undefined : json['agentVersionName'],
57
71
  };
58
72
  }
59
73
 
@@ -70,6 +84,8 @@ export function InfoToJSONTyped(value?: Info | null, ignoreDiscriminator: boolea
70
84
 
71
85
  'gitCommit': value['gitCommit'],
72
86
  'versionName': value['versionName'],
87
+ 'agentGitCommit': value['agentGitCommit'],
88
+ 'agentVersionName': value['agentVersionName'],
73
89
  };
74
90
  }
75
91
 
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * OpenShift Migration Advisor API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ /**
17
+ * Request payload for calculating migration complexity estimation
18
+ * @export
19
+ * @interface MigrationComplexityRequest
20
+ */
21
+ export interface MigrationComplexityRequest {
22
+ /**
23
+ * ID of the cluster to calculate complexity estimation for
24
+ * @type {string}
25
+ * @memberof MigrationComplexityRequest
26
+ */
27
+ clusterId: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the MigrationComplexityRequest interface.
32
+ */
33
+ export function instanceOfMigrationComplexityRequest(value: object): value is MigrationComplexityRequest {
34
+ if (!('clusterId' in value) || value['clusterId'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function MigrationComplexityRequestFromJSON(json: any): MigrationComplexityRequest {
39
+ return MigrationComplexityRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function MigrationComplexityRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationComplexityRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'clusterId': json['clusterId'],
49
+ };
50
+ }
51
+
52
+ export function MigrationComplexityRequestToJSON(json: any): MigrationComplexityRequest {
53
+ return MigrationComplexityRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function MigrationComplexityRequestToJSONTyped(value?: MigrationComplexityRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'clusterId': value['clusterId'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,112 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * OpenShift Migration Advisor API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: undefined
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { ComplexityOSScoreEntry } from './ComplexityOSScoreEntry.js';
17
+ import {
18
+ ComplexityOSScoreEntryFromJSON,
19
+ ComplexityOSScoreEntryFromJSONTyped,
20
+ ComplexityOSScoreEntryToJSON,
21
+ ComplexityOSScoreEntryToJSONTyped,
22
+ } from './ComplexityOSScoreEntry.js';
23
+ import type { ComplexityDiskScoreEntry } from './ComplexityDiskScoreEntry.js';
24
+ import {
25
+ ComplexityDiskScoreEntryFromJSON,
26
+ ComplexityDiskScoreEntryFromJSONTyped,
27
+ ComplexityDiskScoreEntryToJSON,
28
+ ComplexityDiskScoreEntryToJSONTyped,
29
+ } from './ComplexityDiskScoreEntry.js';
30
+
31
+ /**
32
+ * Migration complexity estimation results
33
+ * @export
34
+ * @interface MigrationComplexityResponse
35
+ */
36
+ export interface MigrationComplexityResponse {
37
+ /**
38
+ * 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.
39
+ *
40
+ * @type {Array<ComplexityDiskScoreEntry>}
41
+ * @memberof MigrationComplexityResponse
42
+ */
43
+ complexityByDisk: Array<ComplexityDiskScoreEntry>;
44
+ /**
45
+ * 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.
46
+ *
47
+ * @type {Array<ComplexityOSScoreEntry>}
48
+ * @memberof MigrationComplexityResponse
49
+ */
50
+ complexityByOS: Array<ComplexityOSScoreEntry>;
51
+ /**
52
+ * 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.
53
+ *
54
+ * @type {{ [key: string]: number; }}
55
+ * @memberof MigrationComplexityResponse
56
+ */
57
+ diskSizeRatings: { [key: string]: number; };
58
+ /**
59
+ * 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.
60
+ *
61
+ * @type {{ [key: string]: number; }}
62
+ * @memberof MigrationComplexityResponse
63
+ */
64
+ osRatings: { [key: string]: number; };
65
+ }
66
+
67
+ /**
68
+ * Check if a given object implements the MigrationComplexityResponse interface.
69
+ */
70
+ export function instanceOfMigrationComplexityResponse(value: object): value is MigrationComplexityResponse {
71
+ if (!('complexityByDisk' in value) || value['complexityByDisk'] === undefined) return false;
72
+ if (!('complexityByOS' in value) || value['complexityByOS'] === undefined) return false;
73
+ if (!('diskSizeRatings' in value) || value['diskSizeRatings'] === undefined) return false;
74
+ if (!('osRatings' in value) || value['osRatings'] === undefined) return false;
75
+ return true;
76
+ }
77
+
78
+ export function MigrationComplexityResponseFromJSON(json: any): MigrationComplexityResponse {
79
+ return MigrationComplexityResponseFromJSONTyped(json, false);
80
+ }
81
+
82
+ export function MigrationComplexityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationComplexityResponse {
83
+ if (json == null) {
84
+ return json;
85
+ }
86
+ return {
87
+
88
+ 'complexityByDisk': ((json['complexityByDisk'] as Array<any>).map(ComplexityDiskScoreEntryFromJSON)),
89
+ 'complexityByOS': ((json['complexityByOS'] as Array<any>).map(ComplexityOSScoreEntryFromJSON)),
90
+ 'diskSizeRatings': json['diskSizeRatings'],
91
+ 'osRatings': json['osRatings'],
92
+ };
93
+ }
94
+
95
+ export function MigrationComplexityResponseToJSON(json: any): MigrationComplexityResponse {
96
+ return MigrationComplexityResponseToJSONTyped(json, false);
97
+ }
98
+
99
+ export function MigrationComplexityResponseToJSONTyped(value?: MigrationComplexityResponse | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value;
102
+ }
103
+
104
+ return {
105
+
106
+ 'complexityByDisk': ((value['complexityByDisk'] as Array<any>).map(ComplexityDiskScoreEntryToJSON)),
107
+ 'complexityByOS': ((value['complexityByOS'] as Array<any>).map(ComplexityOSScoreEntryToJSON)),
108
+ 'diskSizeRatings': value['diskSizeRatings'],
109
+ 'osRatings': value['osRatings'],
110
+ };
111
+ }
112
+
package/src/models/VMs.ts CHANGED
@@ -115,6 +115,12 @@ export interface VMs {
115
115
  * @memberof VMs
116
116
  */
117
117
  distributionByNicCount?: { [key: string]: number; };
118
+ /**
119
+ * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
120
+ * @type {{ [key: string]: number; }}
121
+ * @memberof VMs
122
+ */
123
+ distributionByComplexity?: { [key: string]: number; };
118
124
  /**
119
125
  *
120
126
  * @type {VMResourceBreakdown}
@@ -208,6 +214,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
208
214
  'distributionByCpuTier': json['distributionByCpuTier'] == null ? undefined : json['distributionByCpuTier'],
209
215
  'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
210
216
  'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
217
+ 'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
211
218
  'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
212
219
  'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
213
220
  'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
@@ -241,6 +248,7 @@ export function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator: boolean
241
248
  'distributionByCpuTier': value['distributionByCpuTier'],
242
249
  'distributionByMemoryTier': value['distributionByMemoryTier'],
243
250
  'distributionByNicCount': value['distributionByNicCount'],
251
+ 'distributionByComplexity': value['distributionByComplexity'],
244
252
  'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
245
253
  'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
246
254
  'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
@@ -8,6 +8,8 @@ export * from './AssessmentUpdate.js';
8
8
  export * from './ClusterRequirementsRequest.js';
9
9
  export * from './ClusterRequirementsResponse.js';
10
10
  export * from './ClusterSizing.js';
11
+ export * from './ComplexityDiskScoreEntry.js';
12
+ export * from './ComplexityOSScoreEntry.js';
11
13
  export * from './Datastore.js';
12
14
  export * from './DiskSizeTierSummary.js';
13
15
  export * from './DiskTypeSummary.js';
@@ -23,6 +25,8 @@ export * from './Ipv4Config.js';
23
25
  export * from './Job.js';
24
26
  export * from './JobStatus.js';
25
27
  export * from './Label.js';
28
+ export * from './MigrationComplexityRequest.js';
29
+ export * from './MigrationComplexityResponse.js';
26
30
  export * from './MigrationEstimationRequest.js';
27
31
  export * from './MigrationEstimationResponse.js';
28
32
  export * from './MigrationIssue.js';