@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.
Files changed (68) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +8 -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/ComplexityOSNameEntry.d.ts +46 -0
  12. package/dist/esm/models/ComplexityOSNameEntry.js +51 -0
  13. package/dist/esm/models/ComplexityOSScoreEntry.d.ts +39 -0
  14. package/dist/esm/models/ComplexityOSScoreEntry.js +47 -0
  15. package/dist/esm/models/Info.d.ts +12 -0
  16. package/dist/esm/models/Info.js +4 -0
  17. package/dist/esm/models/MigrationComplexityRequest.d.ts +32 -0
  18. package/dist/esm/models/MigrationComplexityRequest.js +43 -0
  19. package/dist/esm/models/MigrationComplexityResponse.d.ts +68 -0
  20. package/dist/esm/models/MigrationComplexityResponse.js +62 -0
  21. package/dist/esm/models/Source.d.ts +12 -0
  22. package/dist/esm/models/Source.js +4 -0
  23. package/dist/esm/models/VMs.d.ts +8 -0
  24. package/dist/esm/models/VMs.js +2 -0
  25. package/dist/esm/models/index.d.ts +5 -0
  26. package/dist/esm/models/index.js +5 -0
  27. package/dist/models/ClusterRequirementsRequest.d.ts +14 -0
  28. package/dist/models/ClusterRequirementsRequest.js +10 -1
  29. package/dist/models/ComplexityDiskScoreEntry.d.ts +45 -0
  30. package/dist/models/ComplexityDiskScoreEntry.js +58 -0
  31. package/dist/models/ComplexityOSNameEntry.d.ts +46 -0
  32. package/dist/models/ComplexityOSNameEntry.js +58 -0
  33. package/dist/models/ComplexityOSScoreEntry.d.ts +39 -0
  34. package/dist/models/ComplexityOSScoreEntry.js +54 -0
  35. package/dist/models/Info.d.ts +12 -0
  36. package/dist/models/Info.js +4 -0
  37. package/dist/models/MigrationComplexityRequest.d.ts +32 -0
  38. package/dist/models/MigrationComplexityRequest.js +50 -0
  39. package/dist/models/MigrationComplexityResponse.d.ts +68 -0
  40. package/dist/models/MigrationComplexityResponse.js +69 -0
  41. package/dist/models/Source.d.ts +12 -0
  42. package/dist/models/Source.js +4 -0
  43. package/dist/models/VMs.d.ts +8 -0
  44. package/dist/models/VMs.js +2 -0
  45. package/dist/models/index.d.ts +5 -0
  46. package/dist/models/index.js +5 -0
  47. package/docs/AssessmentApi.md +76 -0
  48. package/docs/ClusterRequirementsRequest.md +2 -0
  49. package/docs/ComplexityDiskScoreEntry.md +39 -0
  50. package/docs/ComplexityOSNameEntry.md +39 -0
  51. package/docs/ComplexityOSScoreEntry.md +37 -0
  52. package/docs/Info.md +4 -0
  53. package/docs/MigrationComplexityRequest.md +35 -0
  54. package/docs/MigrationComplexityResponse.md +43 -0
  55. package/docs/Source.md +4 -0
  56. package/docs/VMs.md +2 -0
  57. package/package.json +1 -1
  58. package/src/apis/AssessmentApi.ts +90 -0
  59. package/src/models/ClusterRequirementsRequest.ts +17 -0
  60. package/src/models/ComplexityDiskScoreEntry.ts +85 -0
  61. package/src/models/ComplexityOSNameEntry.ts +86 -0
  62. package/src/models/ComplexityOSScoreEntry.ts +76 -0
  63. package/src/models/Info.ts +16 -0
  64. package/src/models/MigrationComplexityRequest.ts +66 -0
  65. package/src/models/MigrationComplexityResponse.ts +129 -0
  66. package/src/models/Source.ts +16 -0
  67. package/src/models/VMs.ts +8 -0
  68. package/src/models/index.ts +5 -0
@@ -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,129 @@
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 { ComplexityOSNameEntry } from './ComplexityOSNameEntry.js';
24
+ import {
25
+ ComplexityOSNameEntryFromJSON,
26
+ ComplexityOSNameEntryFromJSONTyped,
27
+ ComplexityOSNameEntryToJSON,
28
+ ComplexityOSNameEntryToJSONTyped,
29
+ } from './ComplexityOSNameEntry.js';
30
+ import type { ComplexityDiskScoreEntry } from './ComplexityDiskScoreEntry.js';
31
+ import {
32
+ ComplexityDiskScoreEntryFromJSON,
33
+ ComplexityDiskScoreEntryFromJSONTyped,
34
+ ComplexityDiskScoreEntryToJSON,
35
+ ComplexityDiskScoreEntryToJSONTyped,
36
+ } from './ComplexityDiskScoreEntry.js';
37
+
38
+ /**
39
+ * Migration complexity estimation results
40
+ * @export
41
+ * @interface MigrationComplexityResponse
42
+ */
43
+ export interface MigrationComplexityResponse {
44
+ /**
45
+ * 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.
46
+ *
47
+ * @type {Array<ComplexityDiskScoreEntry>}
48
+ * @memberof MigrationComplexityResponse
49
+ */
50
+ complexityByDisk: Array<ComplexityDiskScoreEntry>;
51
+ /**
52
+ * 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.
53
+ *
54
+ * @type {Array<ComplexityOSScoreEntry>}
55
+ * @memberof MigrationComplexityResponse
56
+ */
57
+ complexityByOS: Array<ComplexityOSScoreEntry>;
58
+ /**
59
+ * 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.
60
+ *
61
+ * @type {{ [key: string]: number; }}
62
+ * @memberof MigrationComplexityResponse
63
+ */
64
+ diskSizeRatings: { [key: string]: number; };
65
+ /**
66
+ * 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.
67
+ *
68
+ * @type {{ [key: string]: number; }}
69
+ * @memberof MigrationComplexityResponse
70
+ */
71
+ osRatings: { [key: string]: number; };
72
+ /**
73
+ * 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.
74
+ *
75
+ * @type {Array<ComplexityOSNameEntry>}
76
+ * @memberof MigrationComplexityResponse
77
+ */
78
+ complexityByOSName: Array<ComplexityOSNameEntry>;
79
+ }
80
+
81
+ /**
82
+ * Check if a given object implements the MigrationComplexityResponse interface.
83
+ */
84
+ export function instanceOfMigrationComplexityResponse(value: object): value is MigrationComplexityResponse {
85
+ if (!('complexityByDisk' in value) || value['complexityByDisk'] === undefined) return false;
86
+ if (!('complexityByOS' in value) || value['complexityByOS'] === undefined) return false;
87
+ if (!('diskSizeRatings' in value) || value['diskSizeRatings'] === undefined) return false;
88
+ if (!('osRatings' in value) || value['osRatings'] === undefined) return false;
89
+ if (!('complexityByOSName' in value) || value['complexityByOSName'] === undefined) return false;
90
+ return true;
91
+ }
92
+
93
+ export function MigrationComplexityResponseFromJSON(json: any): MigrationComplexityResponse {
94
+ return MigrationComplexityResponseFromJSONTyped(json, false);
95
+ }
96
+
97
+ export function MigrationComplexityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MigrationComplexityResponse {
98
+ if (json == null) {
99
+ return json;
100
+ }
101
+ return {
102
+
103
+ 'complexityByDisk': ((json['complexityByDisk'] as Array<any>).map(ComplexityDiskScoreEntryFromJSON)),
104
+ 'complexityByOS': ((json['complexityByOS'] as Array<any>).map(ComplexityOSScoreEntryFromJSON)),
105
+ 'diskSizeRatings': json['diskSizeRatings'],
106
+ 'osRatings': json['osRatings'],
107
+ 'complexityByOSName': ((json['complexityByOSName'] as Array<any>).map(ComplexityOSNameEntryFromJSON)),
108
+ };
109
+ }
110
+
111
+ export function MigrationComplexityResponseToJSON(json: any): MigrationComplexityResponse {
112
+ return MigrationComplexityResponseToJSONTyped(json, false);
113
+ }
114
+
115
+ export function MigrationComplexityResponseToJSONTyped(value?: MigrationComplexityResponse | null, ignoreDiscriminator: boolean = false): any {
116
+ if (value == null) {
117
+ return value;
118
+ }
119
+
120
+ return {
121
+
122
+ 'complexityByDisk': ((value['complexityByDisk'] as Array<any>).map(ComplexityDiskScoreEntryToJSON)),
123
+ 'complexityByOS': ((value['complexityByOS'] as Array<any>).map(ComplexityOSScoreEntryToJSON)),
124
+ 'diskSizeRatings': value['diskSizeRatings'],
125
+ 'osRatings': value['osRatings'],
126
+ 'complexityByOSName': ((value['complexityByOSName'] as Array<any>).map(ComplexityOSNameEntryToJSON)),
127
+ };
128
+ }
129
+
@@ -102,6 +102,18 @@ export interface Source {
102
102
  * @memberof Source
103
103
  */
104
104
  infra?: SourceInfra;
105
+ /**
106
+ * Agent version (version tag) stored when OVA was downloaded
107
+ * @type {string}
108
+ * @memberof Source
109
+ */
110
+ agentVersion?: string | null;
111
+ /**
112
+ * Warning message if stored agent version differs from current agent version
113
+ * @type {string}
114
+ * @memberof Source
115
+ */
116
+ agentVersionWarning?: string | null;
105
117
  }
106
118
 
107
119
  /**
@@ -135,6 +147,8 @@ export function SourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): So
135
147
  'agent': json['agent'] == null ? undefined : AgentFromJSON(json['agent']),
136
148
  'labels': json['labels'] == null ? undefined : ((json['labels'] as Array<any>).map(LabelFromJSON)),
137
149
  'infra': json['infra'] == null ? undefined : SourceInfraFromJSON(json['infra']),
150
+ 'agentVersion': json['agentVersion'] == null ? undefined : json['agentVersion'],
151
+ 'agentVersionWarning': json['agentVersionWarning'] == null ? undefined : json['agentVersionWarning'],
138
152
  };
139
153
  }
140
154
 
@@ -158,6 +172,8 @@ export function SourceToJSONTyped(value?: Source | null, ignoreDiscriminator: bo
158
172
  'agent': AgentToJSON(value['agent']),
159
173
  'labels': value['labels'] == null ? undefined : ((value['labels'] as Array<any>).map(LabelToJSON)),
160
174
  'infra': SourceInfraToJSON(value['infra']),
175
+ 'agentVersion': value['agentVersion'],
176
+ 'agentVersionWarning': value['agentVersionWarning'],
161
177
  };
162
178
  }
163
179
 
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,9 @@ 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 './ComplexityOSNameEntry.js';
13
+ export * from './ComplexityOSScoreEntry.js';
11
14
  export * from './Datastore.js';
12
15
  export * from './DiskSizeTierSummary.js';
13
16
  export * from './DiskTypeSummary.js';
@@ -23,6 +26,8 @@ export * from './Ipv4Config.js';
23
26
  export * from './Job.js';
24
27
  export * from './JobStatus.js';
25
28
  export * from './Label.js';
29
+ export * from './MigrationComplexityRequest.js';
30
+ export * from './MigrationComplexityResponse.js';
26
31
  export * from './MigrationEstimationRequest.js';
27
32
  export * from './MigrationEstimationResponse.js';
28
33
  export * from './MigrationIssue.js';