@openshift-migration-advisor/agent-sdk 0.16.0 → 0.17.0-65f4a2a64a85

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 +8 -0
  2. package/README.md +13 -9
  3. package/dist/apis/DefaultApi.d.ts +74 -85
  4. package/dist/apis/DefaultApi.js +80 -86
  5. package/dist/esm/apis/DefaultApi.d.ts +74 -85
  6. package/dist/esm/apis/DefaultApi.js +80 -86
  7. package/dist/esm/models/BatchUpdateExclusionRequest.d.ts +38 -0
  8. package/dist/esm/models/BatchUpdateExclusionRequest.js +47 -0
  9. package/dist/esm/models/CollectorStartRequest.d.ts +12 -12
  10. package/dist/esm/models/CollectorStartRequest.js +5 -11
  11. package/dist/esm/models/Datastore.js +1 -1
  12. package/dist/esm/models/ExportInventory400Response.d.ts +32 -0
  13. package/dist/esm/models/ExportInventory400Response.js +41 -0
  14. package/dist/esm/models/ExportInventory500Response.d.ts +32 -0
  15. package/dist/esm/models/ExportInventory500Response.js +41 -0
  16. package/dist/esm/models/Host.js +3 -3
  17. package/dist/esm/models/IssuesBreakdown.d.ts +56 -0
  18. package/dist/esm/models/IssuesBreakdown.js +59 -0
  19. package/dist/esm/models/OsInfo.d.ts +16 -0
  20. package/dist/esm/models/OsInfo.js +11 -0
  21. package/dist/esm/models/VMs.d.ts +7 -0
  22. package/dist/esm/models/VMs.js +3 -0
  23. package/dist/esm/models/index.d.ts +4 -0
  24. package/dist/esm/models/index.js +4 -0
  25. package/dist/esm/runtime.d.ts +1 -0
  26. package/dist/esm/runtime.js +4 -0
  27. package/dist/models/BatchUpdateExclusionRequest.d.ts +38 -0
  28. package/dist/models/BatchUpdateExclusionRequest.js +54 -0
  29. package/dist/models/CollectorStartRequest.d.ts +12 -12
  30. package/dist/models/CollectorStartRequest.js +5 -11
  31. package/dist/models/Datastore.js +1 -1
  32. package/dist/models/ExportInventory400Response.d.ts +32 -0
  33. package/dist/models/ExportInventory400Response.js +48 -0
  34. package/dist/models/ExportInventory500Response.d.ts +32 -0
  35. package/dist/models/ExportInventory500Response.js +48 -0
  36. package/dist/models/Host.js +3 -3
  37. package/dist/models/IssuesBreakdown.d.ts +56 -0
  38. package/dist/models/IssuesBreakdown.js +66 -0
  39. package/dist/models/OsInfo.d.ts +16 -0
  40. package/dist/models/OsInfo.js +12 -0
  41. package/dist/models/VMs.d.ts +7 -0
  42. package/dist/models/VMs.js +3 -0
  43. package/dist/models/index.d.ts +4 -0
  44. package/dist/models/index.js +4 -0
  45. package/dist/runtime.d.ts +1 -0
  46. package/dist/runtime.js +5 -0
  47. package/docs/BatchUpdateExclusionRequest.md +36 -0
  48. package/docs/CollectorStartRequest.md +3 -2
  49. package/docs/DefaultApi.md +139 -139
  50. package/docs/ExportInventory400Response.md +34 -0
  51. package/docs/ExportInventory500Response.md +34 -0
  52. package/docs/IssuesBreakdown.md +42 -0
  53. package/docs/OsInfo.md +2 -0
  54. package/docs/VMs.md +2 -0
  55. package/package.json +1 -1
  56. package/src/apis/DefaultApi.ts +159 -159
  57. package/src/models/BatchUpdateExclusionRequest.ts +75 -0
  58. package/src/models/CollectorStartRequest.ts +17 -20
  59. package/src/models/Datastore.ts +1 -1
  60. package/src/models/ExportInventory400Response.ts +65 -0
  61. package/src/models/ExportInventory500Response.ts +65 -0
  62. package/src/models/Host.ts +3 -3
  63. package/src/models/IssuesBreakdown.ts +102 -0
  64. package/src/models/OsInfo.ts +21 -0
  65. package/src/models/VMs.ts +15 -0
  66. package/src/models/index.ts +4 -0
  67. package/src/runtime.ts +5 -0
  68. package/tsconfig.json +1 -1
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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
+ *
18
+ * @export
19
+ * @interface ExportInventory500Response
20
+ */
21
+ export interface ExportInventory500Response {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ExportInventory500Response
26
+ */
27
+ error?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ExportInventory500Response interface.
32
+ */
33
+ export function instanceOfExportInventory500Response(value: object): value is ExportInventory500Response {
34
+ return true;
35
+ }
36
+
37
+ export function ExportInventory500ResponseFromJSON(json: any): ExportInventory500Response {
38
+ return ExportInventory500ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function ExportInventory500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportInventory500Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'error': json['error'] == null ? undefined : json['error'],
48
+ };
49
+ }
50
+
51
+ export function ExportInventory500ResponseToJSON(json: any): ExportInventory500Response {
52
+ return ExportInventory500ResponseToJSONTyped(json, false);
53
+ }
54
+
55
+ export function ExportInventory500ResponseToJSONTyped(value?: ExportInventory500Response | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'error': value['error'],
63
+ };
64
+ }
65
+
@@ -79,9 +79,9 @@ export function HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): Host
79
79
  'id': json['id'] == null ? undefined : json['id'],
80
80
  'vendor': json['vendor'],
81
81
  'model': json['model'],
82
- 'cpuCores': json['cpuCores'] == null ? undefined : json['cpuCores'],
83
- 'cpuSockets': json['cpuSockets'] == null ? undefined : json['cpuSockets'],
84
- 'memoryMB': json['memoryMB'] == null ? undefined : json['memoryMB'],
82
+ 'cpuCores': json['cpuCores'] === undefined ? undefined : json['cpuCores'] === null ? null : json['cpuCores'],
83
+ 'cpuSockets': json['cpuSockets'] === undefined ? undefined : json['cpuSockets'] === null ? null : json['cpuSockets'],
84
+ 'memoryMB': json['memoryMB'] === undefined ? undefined : json['memoryMB'] === null ? null : json['memoryMB'],
85
85
  };
86
86
  }
87
87
 
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Assisted Migration Agent API
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: v1
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
+ *
18
+ * @export
19
+ * @interface IssuesBreakdown
20
+ */
21
+ export interface IssuesBreakdown {
22
+ /**
23
+ * Number of VMs with at least one Critical issue
24
+ * @type {number}
25
+ * @memberof IssuesBreakdown
26
+ */
27
+ critical: number;
28
+ /**
29
+ * Number of VMs with at least one Warning issue
30
+ * @type {number}
31
+ * @memberof IssuesBreakdown
32
+ */
33
+ warning: number;
34
+ /**
35
+ * Number of VMs with at least one Information issue
36
+ * @type {number}
37
+ * @memberof IssuesBreakdown
38
+ */
39
+ information: number;
40
+ /**
41
+ * Number of VMs with at least one Advisory issue
42
+ * @type {number}
43
+ * @memberof IssuesBreakdown
44
+ */
45
+ advisory: number;
46
+ /**
47
+ * Number of VMs with at least one Error issue
48
+ * @type {number}
49
+ * @memberof IssuesBreakdown
50
+ */
51
+ error: number;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the IssuesBreakdown interface.
56
+ */
57
+ export function instanceOfIssuesBreakdown(value: object): value is IssuesBreakdown {
58
+ if (!('critical' in value) || value['critical'] === undefined) return false;
59
+ if (!('warning' in value) || value['warning'] === undefined) return false;
60
+ if (!('information' in value) || value['information'] === undefined) return false;
61
+ if (!('advisory' in value) || value['advisory'] === undefined) return false;
62
+ if (!('error' in value) || value['error'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function IssuesBreakdownFromJSON(json: any): IssuesBreakdown {
67
+ return IssuesBreakdownFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function IssuesBreakdownFromJSONTyped(json: any, ignoreDiscriminator: boolean): IssuesBreakdown {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'critical': json['critical'],
77
+ 'warning': json['warning'],
78
+ 'information': json['information'],
79
+ 'advisory': json['advisory'],
80
+ 'error': json['error'],
81
+ };
82
+ }
83
+
84
+ export function IssuesBreakdownToJSON(json: any): IssuesBreakdown {
85
+ return IssuesBreakdownToJSONTyped(json, false);
86
+ }
87
+
88
+ export function IssuesBreakdownToJSONTyped(value?: IssuesBreakdown | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'critical': value['critical'],
96
+ 'warning': value['warning'],
97
+ 'information': value['information'],
98
+ 'advisory': value['advisory'],
99
+ 'error': value['error'],
100
+ };
101
+ }
102
+
@@ -31,6 +31,12 @@ export interface OsInfo {
31
31
  * @memberof OsInfo
32
32
  */
33
33
  supported: boolean;
34
+ /**
35
+ * OS support tier per Red Hat KCS article 4234591
36
+ * @type {OsInfoSupportTierEnum}
37
+ * @memberof OsInfo
38
+ */
39
+ supportTier?: OsInfoSupportTierEnum;
34
40
  /**
35
41
  * Recommended OS upgrade for MTV unsupported OS that can be upgraded to a supported OS
36
42
  * @type {string}
@@ -39,6 +45,19 @@ export interface OsInfo {
39
45
  upgradeRecommendation?: string;
40
46
  }
41
47
 
48
+
49
+ /**
50
+ * @export
51
+ */
52
+ export const OsInfoSupportTierEnum = {
53
+ Certified: 'certified',
54
+ VendorSupported: 'vendor_supported',
55
+ CommunitySupported: 'community_supported',
56
+ SpecialHandling: 'special_handling'
57
+ } as const;
58
+ export type OsInfoSupportTierEnum = typeof OsInfoSupportTierEnum[keyof typeof OsInfoSupportTierEnum];
59
+
60
+
42
61
  /**
43
62
  * Check if a given object implements the OsInfo interface.
44
63
  */
@@ -60,6 +79,7 @@ export function OsInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): Os
60
79
 
61
80
  'count': json['count'],
62
81
  'supported': json['supported'],
82
+ 'supportTier': json['supportTier'] == null ? undefined : json['supportTier'],
63
83
  'upgradeRecommendation': json['upgradeRecommendation'] == null ? undefined : json['upgradeRecommendation'],
64
84
  };
65
85
  }
@@ -77,6 +97,7 @@ export function OsInfoToJSONTyped(value?: OsInfo | null, ignoreDiscriminator: bo
77
97
 
78
98
  'count': value['count'],
79
99
  'supported': value['supported'],
100
+ 'supportTier': value['supportTier'],
80
101
  'upgradeRecommendation': value['upgradeRecommendation'],
81
102
  };
82
103
  }
package/src/models/VMs.ts CHANGED
@@ -27,6 +27,13 @@ import {
27
27
  OsInfoToJSON,
28
28
  OsInfoToJSONTyped,
29
29
  } from './OsInfo.js';
30
+ import type { IssuesBreakdown } from './IssuesBreakdown.js';
31
+ import {
32
+ IssuesBreakdownFromJSON,
33
+ IssuesBreakdownFromJSONTyped,
34
+ IssuesBreakdownToJSON,
35
+ IssuesBreakdownToJSONTyped,
36
+ } from './IssuesBreakdown.js';
30
37
  import type { DiskSizeTierSummary } from './DiskSizeTierSummary.js';
31
38
  import {
32
39
  DiskSizeTierSummaryFromJSON,
@@ -190,6 +197,12 @@ export interface VMs {
190
197
  * @memberof VMs
191
198
  */
192
199
  migrationWarnings: Array<MigrationIssue>;
200
+ /**
201
+ *
202
+ * @type {IssuesBreakdown}
203
+ * @memberof VMs
204
+ */
205
+ issuesBreakdown?: IssuesBreakdown;
193
206
  }
194
207
 
195
208
  /**
@@ -240,6 +253,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
240
253
  'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
241
254
  'notMigratableReasons': ((json['notMigratableReasons'] as Array<any>).map(MigrationIssueFromJSON)),
242
255
  'migrationWarnings': ((json['migrationWarnings'] as Array<any>).map(MigrationIssueFromJSON)),
256
+ 'issuesBreakdown': json['issuesBreakdown'] == null ? undefined : IssuesBreakdownFromJSON(json['issuesBreakdown']),
243
257
  };
244
258
  }
245
259
 
@@ -276,6 +290,7 @@ export function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator: boolean
276
290
  'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)),
277
291
  'notMigratableReasons': ((value['notMigratableReasons'] as Array<any>).map(MigrationIssueToJSON)),
278
292
  'migrationWarnings': ((value['migrationWarnings'] as Array<any>).map(MigrationIssueToJSON)),
293
+ 'issuesBreakdown': IssuesBreakdownToJSON(value['issuesBreakdown']),
279
294
  };
280
295
  }
281
296
 
@@ -5,6 +5,7 @@ export * from './AgentStatus.js';
5
5
  export * from './ApplicationListResponse.js';
6
6
  export * from './ApplicationOverview.js';
7
7
  export * from './ApplicationVM.js';
8
+ export * from './BatchUpdateExclusionRequest.js';
8
9
  export * from './BenchmarkRun.js';
9
10
  export * from './CapabilityStatus.js';
10
11
  export * from './CapabilityStatusCapabilities.js';
@@ -21,6 +22,8 @@ export * from './DeleteLabelGloballyResponse.js';
21
22
  export * from './DiskSizeTierSummary.js';
22
23
  export * from './DiskTypeSummary.js';
23
24
  export * from './EstimateRange.js';
25
+ export * from './ExportInventory400Response.js';
26
+ export * from './ExportInventory500Response.js';
24
27
  export * from './ForecastStats.js';
25
28
  export * from './ForecasterDatastoresRequest.js';
26
29
  export * from './ForecasterPairStatus.js';
@@ -37,6 +40,7 @@ export * from './Infra.js';
37
40
  export * from './InspectorStatus.js';
38
41
  export * from './Inventory.js';
39
42
  export * from './InventoryData.js';
43
+ export * from './IssuesBreakdown.js';
40
44
  export * from './MigrationIssue.js';
41
45
  export * from './Network.js';
42
46
  export * from './OperationCapability.js';
package/src/runtime.ts CHANGED
@@ -367,6 +367,11 @@ export function mapValues(data: any, fn: (item: any) => any) {
367
367
  return result;
368
368
  }
369
369
 
370
+ // Pass-through serializer for `any`-typed properties in form data. See #1877.
371
+ export function anyToJSON(value: any): any {
372
+ return value;
373
+ }
374
+
370
375
  export function canConsumeForm(consumes: Consume[]): boolean {
371
376
  for (const consume of consumes) {
372
377
  if (consume.contentType?.startsWith('multipart/form-data') == true) {
package/tsconfig.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "declaration": true,
4
4
  "target": "es6",
5
5
  "module": "commonjs",
6
- "moduleResolution": "node",
7
6
  "outDir": "dist",
7
+ "rootDir": "src",
8
8
  "typeRoots": [
9
9
  "node_modules/@types"
10
10
  ]