@openshift-migration-advisor/planner-sdk 0.32.0 → 0.33.1
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 +2 -0
- package/README.md +4 -2
- package/dist/apis/AssessmentApi.d.ts +58 -6
- package/dist/apis/AssessmentApi.js +53 -6
- package/dist/apis/ImageApi.d.ts +14 -0
- package/dist/apis/ImageApi.js +11 -1
- package/dist/esm/apis/AssessmentApi.d.ts +58 -6
- package/dist/esm/apis/AssessmentApi.js +53 -6
- package/dist/esm/apis/ImageApi.d.ts +14 -0
- package/dist/esm/apis/ImageApi.js +10 -0
- package/dist/esm/models/Host.d.ts +16 -0
- package/dist/esm/models/Host.js +8 -0
- package/dist/esm/models/Info.d.ts +4 -0
- package/dist/esm/models/Info.js +2 -0
- package/dist/esm/models/SourceType.d.ts +26 -0
- package/dist/esm/models/SourceType.js +44 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/esm/runtime.js +4 -3
- package/dist/models/Host.d.ts +16 -0
- package/dist/models/Host.js +8 -0
- package/dist/models/Info.d.ts +4 -0
- package/dist/models/Info.js +2 -0
- package/dist/models/SourceType.d.ts +26 -0
- package/dist/models/SourceType.js +52 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/runtime.js +4 -3
- package/docs/AssessmentApi.md +88 -3
- package/docs/Host.md +8 -0
- package/docs/ImageApi.md +5 -2
- package/docs/Info.md +2 -0
- package/docs/SourceType.md +32 -0
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +116 -8
- package/src/apis/ImageApi.ts +19 -0
- package/src/models/Host.ts +24 -0
- package/src/models/Info.ts +6 -0
- package/src/models/SourceType.ts +54 -0
- package/src/models/index.ts +1 -0
- package/src/runtime.ts +3 -3
package/dist/esm/models/Info.js
CHANGED
|
@@ -33,6 +33,7 @@ export function InfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
33
|
'versionName': json['versionName'],
|
|
34
34
|
'agentGitCommit': json['agentGitCommit'] === undefined ? undefined : json['agentGitCommit'] === null ? null : json['agentGitCommit'],
|
|
35
35
|
'agentVersionName': json['agentVersionName'] === undefined ? undefined : json['agentVersionName'] === null ? null : json['agentVersionName'],
|
|
36
|
+
'minApplianceVersion': json['minApplianceVersion'] === undefined ? undefined : json['minApplianceVersion'] === null ? null : json['minApplianceVersion'],
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
export function InfoToJSON(json) {
|
|
@@ -47,5 +48,6 @@ export function InfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
47
48
|
'versionName': value['versionName'],
|
|
48
49
|
'agentGitCommit': value['agentGitCommit'],
|
|
49
50
|
'agentVersionName': value['agentVersionName'],
|
|
51
|
+
'minApplianceVersion': value['minApplianceVersion'],
|
|
50
52
|
};
|
|
51
53
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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: v1alpha1
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const SourceType: {
|
|
17
|
+
readonly Inventory: "inventory";
|
|
18
|
+
readonly Rvtools: "rvtools";
|
|
19
|
+
readonly Source: "source";
|
|
20
|
+
};
|
|
21
|
+
export type SourceType = typeof SourceType[keyof typeof SourceType];
|
|
22
|
+
export declare function instanceOfSourceType(value: any): boolean;
|
|
23
|
+
export declare function SourceTypeFromJSON(json: any): SourceType;
|
|
24
|
+
export declare function SourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceType;
|
|
25
|
+
export declare function SourceTypeToJSON(value?: SourceType | null): any;
|
|
26
|
+
export declare function SourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SourceType;
|
|
@@ -0,0 +1,44 @@
|
|
|
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: v1alpha1
|
|
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
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const SourceType = {
|
|
19
|
+
Inventory: 'inventory',
|
|
20
|
+
Rvtools: 'rvtools',
|
|
21
|
+
Source: 'source',
|
|
22
|
+
};
|
|
23
|
+
export function instanceOfSourceType(value) {
|
|
24
|
+
for (const key in SourceType) {
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(SourceType, key)) {
|
|
26
|
+
if (SourceType[key] === value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
export function SourceTypeFromJSON(json) {
|
|
34
|
+
return SourceTypeFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function SourceTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
export function SourceTypeToJSON(value) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
export function SourceTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
@@ -82,6 +82,7 @@ export * from './Snapshot.js';
|
|
|
82
82
|
export * from './Source.js';
|
|
83
83
|
export * from './SourceCreate.js';
|
|
84
84
|
export * from './SourceInfra.js';
|
|
85
|
+
export * from './SourceType.js';
|
|
85
86
|
export * from './SourceUpdate.js';
|
|
86
87
|
export * from './StandaloneClusterRequirementsRequest.js';
|
|
87
88
|
export * from './StandaloneClusterRequirementsResponse.js';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -84,6 +84,7 @@ export * from './Snapshot.js';
|
|
|
84
84
|
export * from './Source.js';
|
|
85
85
|
export * from './SourceCreate.js';
|
|
86
86
|
export * from './SourceInfra.js';
|
|
87
|
+
export * from './SourceType.js';
|
|
87
88
|
export * from './SourceUpdate.js';
|
|
88
89
|
export * from './StandaloneClusterRequirementsRequest.js';
|
|
89
90
|
export * from './StandaloneClusterRequirementsResponse.js';
|
package/dist/esm/runtime.js
CHANGED
|
@@ -419,7 +419,7 @@ export function parseContentDispositionFilename(headers) {
|
|
|
419
419
|
function decodeExtValue(value) {
|
|
420
420
|
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
421
421
|
try {
|
|
422
|
-
return match ? decodeURIComponent(match[1]) : undefined;
|
|
422
|
+
return (match === null || match === void 0 ? void 0 : match[1]) !== undefined ? decodeURIComponent(match[1]) : undefined;
|
|
423
423
|
}
|
|
424
424
|
catch (_a) {
|
|
425
425
|
return undefined;
|
|
@@ -431,13 +431,14 @@ function decodeExtValue(value) {
|
|
|
431
431
|
* backslash escapes resolved, and the first occurrence of a name wins.
|
|
432
432
|
*/
|
|
433
433
|
function parseHeaderParameters(value) {
|
|
434
|
+
var _a, _b;
|
|
434
435
|
const params = new Map();
|
|
435
436
|
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
436
437
|
let match;
|
|
437
438
|
while ((match = parameter.exec(value)) !== null) {
|
|
438
|
-
const name = match[1].toLowerCase();
|
|
439
|
+
const name = ((_a = match[1]) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
439
440
|
if (!params.has(name)) {
|
|
440
|
-
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
441
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : ((_b = match[3]) !== null && _b !== void 0 ? _b : '').trim());
|
|
441
442
|
}
|
|
442
443
|
}
|
|
443
444
|
return params;
|
package/dist/models/Host.d.ts
CHANGED
|
@@ -29,6 +29,22 @@ export interface Host {
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
model: string;
|
|
32
|
+
/**
|
|
33
|
+
* Source datacenter name, when available.
|
|
34
|
+
*/
|
|
35
|
+
datacenter?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Source cluster name; omitted for standalone hosts.
|
|
38
|
+
*/
|
|
39
|
+
cluster?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Source-reported CPU model, when available.
|
|
42
|
+
*/
|
|
43
|
+
cpuModel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Source-reported host hardware serial or service tag, when available.
|
|
46
|
+
*/
|
|
47
|
+
serialNumber?: string;
|
|
32
48
|
/**
|
|
33
49
|
* Number of CPU cores
|
|
34
50
|
*/
|
package/dist/models/Host.js
CHANGED
|
@@ -41,6 +41,10 @@ function HostFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
'id': json['id'] == null ? undefined : json['id'],
|
|
42
42
|
'vendor': json['vendor'],
|
|
43
43
|
'model': json['model'],
|
|
44
|
+
'datacenter': json['datacenter'] == null ? undefined : json['datacenter'],
|
|
45
|
+
'cluster': json['cluster'] == null ? undefined : json['cluster'],
|
|
46
|
+
'cpuModel': json['cpuModel'] == null ? undefined : json['cpuModel'],
|
|
47
|
+
'serialNumber': json['serialNumber'] == null ? undefined : json['serialNumber'],
|
|
44
48
|
'cpuCores': json['cpuCores'] === undefined ? undefined : json['cpuCores'] === null ? null : json['cpuCores'],
|
|
45
49
|
'cpuSockets': json['cpuSockets'] === undefined ? undefined : json['cpuSockets'] === null ? null : json['cpuSockets'],
|
|
46
50
|
'memoryMB': json['memoryMB'] === undefined ? undefined : json['memoryMB'] === null ? null : json['memoryMB'],
|
|
@@ -61,6 +65,10 @@ function HostToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
61
65
|
'id': value['id'],
|
|
62
66
|
'vendor': value['vendor'],
|
|
63
67
|
'model': value['model'],
|
|
68
|
+
'datacenter': value['datacenter'],
|
|
69
|
+
'cluster': value['cluster'],
|
|
70
|
+
'cpuModel': value['cpuModel'],
|
|
71
|
+
'serialNumber': value['serialNumber'],
|
|
64
72
|
'cpuCores': value['cpuCores'],
|
|
65
73
|
'cpuSockets': value['cpuSockets'],
|
|
66
74
|
'memoryMB': value['memoryMB'],
|
package/dist/models/Info.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ export interface Info {
|
|
|
31
31
|
* Agent version name, based on git tag
|
|
32
32
|
*/
|
|
33
33
|
agentVersionName?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* The oldest appliance version the served image supports in-place updates from; empty when no minimum is set
|
|
36
|
+
*/
|
|
37
|
+
minApplianceVersion?: string | null;
|
|
34
38
|
}
|
|
35
39
|
/**
|
|
36
40
|
* Check if a given object implements the Info interface.
|
package/dist/models/Info.js
CHANGED
|
@@ -40,6 +40,7 @@ function InfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
40
|
'versionName': json['versionName'],
|
|
41
41
|
'agentGitCommit': json['agentGitCommit'] === undefined ? undefined : json['agentGitCommit'] === null ? null : json['agentGitCommit'],
|
|
42
42
|
'agentVersionName': json['agentVersionName'] === undefined ? undefined : json['agentVersionName'] === null ? null : json['agentVersionName'],
|
|
43
|
+
'minApplianceVersion': json['minApplianceVersion'] === undefined ? undefined : json['minApplianceVersion'] === null ? null : json['minApplianceVersion'],
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
function InfoToJSON(json) {
|
|
@@ -54,5 +55,6 @@ function InfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
54
55
|
'versionName': value['versionName'],
|
|
55
56
|
'agentGitCommit': value['agentGitCommit'],
|
|
56
57
|
'agentVersionName': value['agentVersionName'],
|
|
58
|
+
'minApplianceVersion': value['minApplianceVersion'],
|
|
57
59
|
};
|
|
58
60
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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: v1alpha1
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const SourceType: {
|
|
17
|
+
readonly Inventory: "inventory";
|
|
18
|
+
readonly Rvtools: "rvtools";
|
|
19
|
+
readonly Source: "source";
|
|
20
|
+
};
|
|
21
|
+
export type SourceType = typeof SourceType[keyof typeof SourceType];
|
|
22
|
+
export declare function instanceOfSourceType(value: any): boolean;
|
|
23
|
+
export declare function SourceTypeFromJSON(json: any): SourceType;
|
|
24
|
+
export declare function SourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceType;
|
|
25
|
+
export declare function SourceTypeToJSON(value?: SourceType | null): any;
|
|
26
|
+
export declare function SourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SourceType;
|
|
@@ -0,0 +1,52 @@
|
|
|
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: v1alpha1
|
|
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.SourceType = void 0;
|
|
17
|
+
exports.instanceOfSourceType = instanceOfSourceType;
|
|
18
|
+
exports.SourceTypeFromJSON = SourceTypeFromJSON;
|
|
19
|
+
exports.SourceTypeFromJSONTyped = SourceTypeFromJSONTyped;
|
|
20
|
+
exports.SourceTypeToJSON = SourceTypeToJSON;
|
|
21
|
+
exports.SourceTypeToJSONTyped = SourceTypeToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.SourceType = {
|
|
27
|
+
Inventory: 'inventory',
|
|
28
|
+
Rvtools: 'rvtools',
|
|
29
|
+
Source: 'source',
|
|
30
|
+
};
|
|
31
|
+
function instanceOfSourceType(value) {
|
|
32
|
+
for (const key in exports.SourceType) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(exports.SourceType, key)) {
|
|
34
|
+
if (exports.SourceType[key] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function SourceTypeFromJSON(json) {
|
|
42
|
+
return SourceTypeFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function SourceTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
function SourceTypeToJSON(value) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
function SourceTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export * from './Snapshot.js';
|
|
|
82
82
|
export * from './Source.js';
|
|
83
83
|
export * from './SourceCreate.js';
|
|
84
84
|
export * from './SourceInfra.js';
|
|
85
|
+
export * from './SourceType.js';
|
|
85
86
|
export * from './SourceUpdate.js';
|
|
86
87
|
export * from './StandaloneClusterRequirementsRequest.js';
|
|
87
88
|
export * from './StandaloneClusterRequirementsResponse.js';
|
package/dist/models/index.js
CHANGED
|
@@ -100,6 +100,7 @@ __exportStar(require("./Snapshot.js"), exports);
|
|
|
100
100
|
__exportStar(require("./Source.js"), exports);
|
|
101
101
|
__exportStar(require("./SourceCreate.js"), exports);
|
|
102
102
|
__exportStar(require("./SourceInfra.js"), exports);
|
|
103
|
+
__exportStar(require("./SourceType.js"), exports);
|
|
103
104
|
__exportStar(require("./SourceUpdate.js"), exports);
|
|
104
105
|
__exportStar(require("./StandaloneClusterRequirementsRequest.js"), exports);
|
|
105
106
|
__exportStar(require("./StandaloneClusterRequirementsResponse.js"), exports);
|
package/dist/runtime.js
CHANGED
|
@@ -440,7 +440,7 @@ function parseContentDispositionFilename(headers) {
|
|
|
440
440
|
function decodeExtValue(value) {
|
|
441
441
|
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
442
442
|
try {
|
|
443
|
-
return match ? decodeURIComponent(match[1]) : undefined;
|
|
443
|
+
return (match === null || match === void 0 ? void 0 : match[1]) !== undefined ? decodeURIComponent(match[1]) : undefined;
|
|
444
444
|
}
|
|
445
445
|
catch (_a) {
|
|
446
446
|
return undefined;
|
|
@@ -452,13 +452,14 @@ function decodeExtValue(value) {
|
|
|
452
452
|
* backslash escapes resolved, and the first occurrence of a name wins.
|
|
453
453
|
*/
|
|
454
454
|
function parseHeaderParameters(value) {
|
|
455
|
+
var _a, _b;
|
|
455
456
|
const params = new Map();
|
|
456
457
|
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
457
458
|
let match;
|
|
458
459
|
while ((match = parameter.exec(value)) !== null) {
|
|
459
|
-
const name = match[1].toLowerCase();
|
|
460
|
+
const name = ((_a = match[1]) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
460
461
|
if (!params.has(name)) {
|
|
461
|
-
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
462
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : ((_b = match[3]) !== null && _b !== void 0 ? _b : '').trim());
|
|
462
463
|
}
|
|
463
464
|
}
|
|
464
465
|
return params;
|
package/docs/AssessmentApi.md
CHANGED
|
@@ -23,6 +23,7 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
23
23
|
| [**shareAssessment**](AssessmentApi.md#shareassessment) | **POST** /api/v1/assessments/{id}/share | |
|
|
24
24
|
| [**unshareAssessment**](AssessmentApi.md#unshareassessment) | **DELETE** /api/v1/assessments/{id}/share | |
|
|
25
25
|
| [**updateAssessment**](AssessmentApi.md#updateassessment) | **PUT** /api/v1/assessments/{id} | |
|
|
26
|
+
| [**updateAssessmentV2**](AssessmentApi.md#updateassessmentv2) | **PATCH** /api/v2/assessments/{id} | |
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
@@ -1046,7 +1047,7 @@ No authorization required
|
|
|
1046
1047
|
|
|
1047
1048
|
## listAssessmentsV2
|
|
1048
1049
|
|
|
1049
|
-
> Array<AssessmentV2Summary> listAssessmentsV2()
|
|
1050
|
+
> Array<AssessmentV2Summary> listAssessmentsV2(sourceType)
|
|
1050
1051
|
|
|
1051
1052
|
|
|
1052
1053
|
|
|
@@ -1065,8 +1066,13 @@ async function example() {
|
|
|
1065
1066
|
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
1066
1067
|
const api = new AssessmentApi();
|
|
1067
1068
|
|
|
1069
|
+
const body = {
|
|
1070
|
+
// SourceType | Filter assessments by their source type (optional)
|
|
1071
|
+
sourceType: ...,
|
|
1072
|
+
} satisfies ListAssessmentsV2Request;
|
|
1073
|
+
|
|
1068
1074
|
try {
|
|
1069
|
-
const data = await api.listAssessmentsV2();
|
|
1075
|
+
const data = await api.listAssessmentsV2(body);
|
|
1070
1076
|
console.log(data);
|
|
1071
1077
|
} catch (error) {
|
|
1072
1078
|
console.error(error);
|
|
@@ -1079,7 +1085,10 @@ example().catch(console.error);
|
|
|
1079
1085
|
|
|
1080
1086
|
### Parameters
|
|
1081
1087
|
|
|
1082
|
-
|
|
1088
|
+
|
|
1089
|
+
| Name | Type | Description | Notes |
|
|
1090
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1091
|
+
| **sourceType** | `SourceType` | Filter assessments by their source type | [Optional] [Defaults to `undefined`] [Enum: inventory, rvtools, source] |
|
|
1083
1092
|
|
|
1084
1093
|
### Return type
|
|
1085
1094
|
|
|
@@ -1099,6 +1108,7 @@ No authorization required
|
|
|
1099
1108
|
| Status code | Description | Response headers |
|
|
1100
1109
|
|-------------|-------------|------------------|
|
|
1101
1110
|
| **200** | OK | - |
|
|
1111
|
+
| **400** | Bad Request | - |
|
|
1102
1112
|
| **401** | Unauthorized | - |
|
|
1103
1113
|
| **500** | Internal error | - |
|
|
1104
1114
|
|
|
@@ -1398,3 +1408,78 @@ No authorization required
|
|
|
1398
1408
|
|
|
1399
1409
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1400
1410
|
|
|
1411
|
+
|
|
1412
|
+
## updateAssessmentV2
|
|
1413
|
+
|
|
1414
|
+
> AssessmentV2 updateAssessmentV2(id, assessmentUpdate)
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
Update the assessment name
|
|
1419
|
+
|
|
1420
|
+
### Example
|
|
1421
|
+
|
|
1422
|
+
```ts
|
|
1423
|
+
import {
|
|
1424
|
+
Configuration,
|
|
1425
|
+
AssessmentApi,
|
|
1426
|
+
} from '@openshift-migration-advisor/planner-sdk';
|
|
1427
|
+
import type { UpdateAssessmentV2Request } from '@openshift-migration-advisor/planner-sdk';
|
|
1428
|
+
|
|
1429
|
+
async function example() {
|
|
1430
|
+
console.log("🚀 Testing @openshift-migration-advisor/planner-sdk SDK...");
|
|
1431
|
+
const api = new AssessmentApi();
|
|
1432
|
+
|
|
1433
|
+
const body = {
|
|
1434
|
+
// string | ID of the assessment
|
|
1435
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1436
|
+
// AssessmentUpdate
|
|
1437
|
+
assessmentUpdate: ...,
|
|
1438
|
+
} satisfies UpdateAssessmentV2Request;
|
|
1439
|
+
|
|
1440
|
+
try {
|
|
1441
|
+
const data = await api.updateAssessmentV2(body);
|
|
1442
|
+
console.log(data);
|
|
1443
|
+
} catch (error) {
|
|
1444
|
+
console.error(error);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
// Run the test
|
|
1449
|
+
example().catch(console.error);
|
|
1450
|
+
```
|
|
1451
|
+
|
|
1452
|
+
### Parameters
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
| Name | Type | Description | Notes |
|
|
1456
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1457
|
+
| **id** | `string` | ID of the assessment | [Defaults to `undefined`] |
|
|
1458
|
+
| **assessmentUpdate** | [AssessmentUpdate](AssessmentUpdate.md) | | |
|
|
1459
|
+
|
|
1460
|
+
### Return type
|
|
1461
|
+
|
|
1462
|
+
[**AssessmentV2**](AssessmentV2.md)
|
|
1463
|
+
|
|
1464
|
+
### Authorization
|
|
1465
|
+
|
|
1466
|
+
No authorization required
|
|
1467
|
+
|
|
1468
|
+
### HTTP request headers
|
|
1469
|
+
|
|
1470
|
+
- **Content-Type**: `application/json`
|
|
1471
|
+
- **Accept**: `application/json`
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
### HTTP response details
|
|
1475
|
+
| Status code | Description | Response headers |
|
|
1476
|
+
|-------------|-------------|------------------|
|
|
1477
|
+
| **200** | OK | - |
|
|
1478
|
+
| **400** | Bad Request | - |
|
|
1479
|
+
| **401** | Unauthorized | - |
|
|
1480
|
+
| **403** | Forbidden | - |
|
|
1481
|
+
| **404** | NotFound | - |
|
|
1482
|
+
| **500** | Internal Server Error | - |
|
|
1483
|
+
|
|
1484
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1485
|
+
|
package/docs/Host.md
CHANGED
|
@@ -9,6 +9,10 @@ Name | Type
|
|
|
9
9
|
`id` | string
|
|
10
10
|
`vendor` | string
|
|
11
11
|
`model` | string
|
|
12
|
+
`datacenter` | string
|
|
13
|
+
`cluster` | string
|
|
14
|
+
`cpuModel` | string
|
|
15
|
+
`serialNumber` | string
|
|
12
16
|
`cpuCores` | number
|
|
13
17
|
`cpuSockets` | number
|
|
14
18
|
`memoryMB` | number
|
|
@@ -27,6 +31,10 @@ const example = {
|
|
|
27
31
|
"id": null,
|
|
28
32
|
"vendor": null,
|
|
29
33
|
"model": null,
|
|
34
|
+
"datacenter": null,
|
|
35
|
+
"cluster": null,
|
|
36
|
+
"cpuModel": null,
|
|
37
|
+
"serialNumber": null,
|
|
30
38
|
"cpuCores": null,
|
|
31
39
|
"cpuSockets": null,
|
|
32
40
|
"memoryMB": null,
|
package/docs/ImageApi.md
CHANGED
|
@@ -11,7 +11,7 @@ All URIs are relative to *https://raw.githubusercontent.com*
|
|
|
11
11
|
|
|
12
12
|
## getSourceDownloadURL
|
|
13
13
|
|
|
14
|
-
> PresignedUrl getSourceDownloadURL(id)
|
|
14
|
+
> PresignedUrl getSourceDownloadURL(id, image)
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -33,6 +33,8 @@ async function example() {
|
|
|
33
33
|
const body = {
|
|
34
34
|
// string | Source id
|
|
35
35
|
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
36
|
+
// 'ova' | 'appliance' | Which image to link; the OVA or the appliance image tar for a disconnected update (optional)
|
|
37
|
+
image: image_example,
|
|
36
38
|
} satisfies GetSourceDownloadURLRequest;
|
|
37
39
|
|
|
38
40
|
try {
|
|
@@ -53,6 +55,7 @@ example().catch(console.error);
|
|
|
53
55
|
| Name | Type | Description | Notes |
|
|
54
56
|
|------------- | ------------- | ------------- | -------------|
|
|
55
57
|
| **id** | `string` | Source id | [Defaults to `undefined`] |
|
|
58
|
+
| **image** | `ova`, `appliance` | Which image to link; the OVA or the appliance image tar for a disconnected update | [Optional] [Defaults to `'ova'`] [Enum: ova, appliance] |
|
|
56
59
|
|
|
57
60
|
### Return type
|
|
58
61
|
|
|
@@ -71,7 +74,7 @@ No authorization required
|
|
|
71
74
|
### HTTP response details
|
|
72
75
|
| Status code | Description | Response headers |
|
|
73
76
|
|-------------|-------------|------------------|
|
|
74
|
-
| **200** | URL to download
|
|
77
|
+
| **200** | URL to download the image | - |
|
|
75
78
|
| **400** | Bad Request | - |
|
|
76
79
|
| **401** | Unauthorized | - |
|
|
77
80
|
| **403** | Forbidden | - |
|
package/docs/Info.md
CHANGED
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`versionName` | string
|
|
12
12
|
`agentGitCommit` | string
|
|
13
13
|
`agentVersionName` | string
|
|
14
|
+
`minApplianceVersion` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ const example = {
|
|
|
23
24
|
"versionName": 0.1.4-40-gc5a1661,
|
|
24
25
|
"agentGitCommit": c5a1661465a25b17ceeeb77d1ec40deb57d8da44,
|
|
25
26
|
"agentVersionName": 0.1.4-40-gc5a1661,
|
|
27
|
+
"minApplianceVersion": null,
|
|
26
28
|
} satisfies Info
|
|
27
29
|
|
|
28
30
|
console.log(example)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
# SourceType
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import type { SourceType } from '@openshift-migration-advisor/planner-sdk'
|
|
14
|
+
|
|
15
|
+
// TODO: Update the object below with actual values
|
|
16
|
+
const example = {
|
|
17
|
+
} satisfies SourceType
|
|
18
|
+
|
|
19
|
+
console.log(example)
|
|
20
|
+
|
|
21
|
+
// Convert the instance to a JSON string
|
|
22
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
23
|
+
console.log(exampleJSON)
|
|
24
|
+
|
|
25
|
+
// Parse the JSON string back to an object
|
|
26
|
+
const exampleParsed = JSON.parse(exampleJSON) as SourceType
|
|
27
|
+
console.log(exampleParsed)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
31
|
+
|
|
32
|
+
|