@openshift-migration-advisor/agent-sdk 0.22.0 → 0.23.0-73966e8843b6
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/README.md +2 -2
- package/dist/apis/InventoriesApi.d.ts +22 -6
- package/dist/apis/InventoriesApi.js +17 -7
- package/dist/esm/apis/InventoriesApi.d.ts +22 -6
- package/dist/esm/apis/InventoriesApi.js +16 -6
- package/dist/esm/models/Group.d.ts +4 -0
- package/dist/esm/models/Group.js +2 -0
- package/dist/esm/models/VMs.d.ts +4 -0
- package/dist/esm/models/VMs.js +2 -0
- package/dist/models/Group.d.ts +4 -0
- package/dist/models/Group.js +2 -0
- package/dist/models/VMs.d.ts +4 -0
- package/dist/models/VMs.js +2 -0
- package/docs/Group.md +2 -0
- package/docs/InventoriesApi.md +13 -5
- package/docs/VMs.md +2 -0
- package/package.json +1 -1
- package/src/apis/InventoriesApi.ts +30 -8
- package/src/models/Group.ts +6 -0
- package/src/models/VMs.ts +6 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @openshift-migration-advisor/agent-sdk@0.
|
|
1
|
+
# @openshift-migration-advisor/agent-sdk@0.23.0-73966e8843b6
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the raw.githubusercontent.com API.
|
|
4
4
|
|
|
@@ -198,7 +198,7 @@ and is automatically generated by the
|
|
|
198
198
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
199
199
|
|
|
200
200
|
- API version: `v2`
|
|
201
|
-
- Package version: `0.
|
|
201
|
+
- Package version: `0.23.0-73966e8843b6`
|
|
202
202
|
- Generator version: `7.26.0-SNAPSHOT`
|
|
203
203
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
204
204
|
|
|
@@ -17,6 +17,12 @@ export interface GetInventoryRequest {
|
|
|
17
17
|
*/
|
|
18
18
|
id: string;
|
|
19
19
|
}
|
|
20
|
+
export interface GetLatestInventoryRequest {
|
|
21
|
+
/**
|
|
22
|
+
* Selects which inventories to return. "main" (default) returns only the main inventory as JSON. "all" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
23
|
+
*/
|
|
24
|
+
scope?: GetLatestInventoryScopeEnum;
|
|
25
|
+
}
|
|
20
26
|
/**
|
|
21
27
|
* InventoriesApi - interface
|
|
22
28
|
*
|
|
@@ -46,22 +52,24 @@ export interface InventoriesApiInterface {
|
|
|
46
52
|
getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
47
53
|
/**
|
|
48
54
|
* Creates request options for getLatestInventory without sending the request
|
|
55
|
+
* @param {'main' | 'all'} [scope] Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
49
56
|
* @throws {RequiredError}
|
|
50
57
|
* @memberof InventoriesApiInterface
|
|
51
58
|
*/
|
|
52
|
-
getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
|
|
59
|
+
getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
|
|
53
60
|
/**
|
|
54
61
|
*
|
|
55
62
|
* @summary Get inventory from the latest collection
|
|
63
|
+
* @param {'main' | 'all'} [scope] Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
56
64
|
* @param {*} [options] Override http request option.
|
|
57
65
|
* @throws {RequiredError}
|
|
58
66
|
* @memberof InventoriesApiInterface
|
|
59
67
|
*/
|
|
60
|
-
getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
68
|
+
getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
61
69
|
/**
|
|
62
70
|
* Get inventory from the latest collection
|
|
63
71
|
*/
|
|
64
|
-
getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
72
|
+
getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
65
73
|
}
|
|
66
74
|
/**
|
|
67
75
|
*
|
|
@@ -82,13 +90,21 @@ export declare class InventoriesApi extends runtime.BaseAPI implements Inventori
|
|
|
82
90
|
/**
|
|
83
91
|
* Creates request options for getLatestInventory without sending the request
|
|
84
92
|
*/
|
|
85
|
-
getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
|
|
93
|
+
getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
|
|
86
94
|
/**
|
|
87
95
|
* Get inventory from the latest collection
|
|
88
96
|
*/
|
|
89
|
-
getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
97
|
+
getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
90
98
|
/**
|
|
91
99
|
* Get inventory from the latest collection
|
|
92
100
|
*/
|
|
93
|
-
getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
101
|
+
getLatestInventory(requestParameters?: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
94
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* @export
|
|
105
|
+
*/
|
|
106
|
+
export declare const GetLatestInventoryScopeEnum: {
|
|
107
|
+
readonly Main: "main";
|
|
108
|
+
readonly All: "all";
|
|
109
|
+
};
|
|
110
|
+
export type GetLatestInventoryScopeEnum = typeof GetLatestInventoryScopeEnum[keyof typeof GetLatestInventoryScopeEnum];
|
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.InventoriesApi = void 0;
|
|
25
|
+
exports.GetLatestInventoryScopeEnum = exports.InventoriesApi = void 0;
|
|
26
26
|
const runtime = require("../runtime.js");
|
|
27
27
|
const Inventory_js_1 = require("../models/Inventory.js");
|
|
28
28
|
/**
|
|
@@ -71,9 +71,12 @@ class InventoriesApi extends runtime.BaseAPI {
|
|
|
71
71
|
/**
|
|
72
72
|
* Creates request options for getLatestInventory without sending the request
|
|
73
73
|
*/
|
|
74
|
-
getLatestInventoryRequestOpts() {
|
|
74
|
+
getLatestInventoryRequestOpts(requestParameters) {
|
|
75
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
76
|
const queryParameters = {};
|
|
77
|
+
if (requestParameters['scope'] != null) {
|
|
78
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
79
|
+
}
|
|
77
80
|
const headerParameters = {};
|
|
78
81
|
let urlPath = `/inventory`;
|
|
79
82
|
return {
|
|
@@ -87,9 +90,9 @@ class InventoriesApi extends runtime.BaseAPI {
|
|
|
87
90
|
/**
|
|
88
91
|
* Get inventory from the latest collection
|
|
89
92
|
*/
|
|
90
|
-
getLatestInventoryRaw(initOverrides) {
|
|
93
|
+
getLatestInventoryRaw(requestParameters, initOverrides) {
|
|
91
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
const requestOptions = yield this.getLatestInventoryRequestOpts();
|
|
95
|
+
const requestOptions = yield this.getLatestInventoryRequestOpts(requestParameters);
|
|
93
96
|
const response = yield this.request(requestOptions, initOverrides);
|
|
94
97
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Inventory_js_1.InventoryFromJSON)(jsonValue));
|
|
95
98
|
});
|
|
@@ -97,11 +100,18 @@ class InventoriesApi extends runtime.BaseAPI {
|
|
|
97
100
|
/**
|
|
98
101
|
* Get inventory from the latest collection
|
|
99
102
|
*/
|
|
100
|
-
getLatestInventory(
|
|
101
|
-
return __awaiter(this,
|
|
102
|
-
const response = yield this.getLatestInventoryRaw(initOverrides);
|
|
103
|
+
getLatestInventory() {
|
|
104
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
105
|
+
const response = yield this.getLatestInventoryRaw(requestParameters, initOverrides);
|
|
103
106
|
return yield response.value();
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
exports.InventoriesApi = InventoriesApi;
|
|
111
|
+
/**
|
|
112
|
+
* @export
|
|
113
|
+
*/
|
|
114
|
+
exports.GetLatestInventoryScopeEnum = {
|
|
115
|
+
Main: 'main',
|
|
116
|
+
All: 'all',
|
|
117
|
+
};
|
|
@@ -17,6 +17,12 @@ export interface GetInventoryRequest {
|
|
|
17
17
|
*/
|
|
18
18
|
id: string;
|
|
19
19
|
}
|
|
20
|
+
export interface GetLatestInventoryRequest {
|
|
21
|
+
/**
|
|
22
|
+
* Selects which inventories to return. "main" (default) returns only the main inventory as JSON. "all" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
23
|
+
*/
|
|
24
|
+
scope?: GetLatestInventoryScopeEnum;
|
|
25
|
+
}
|
|
20
26
|
/**
|
|
21
27
|
* InventoriesApi - interface
|
|
22
28
|
*
|
|
@@ -46,22 +52,24 @@ export interface InventoriesApiInterface {
|
|
|
46
52
|
getInventory(requestParameters: GetInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
47
53
|
/**
|
|
48
54
|
* Creates request options for getLatestInventory without sending the request
|
|
55
|
+
* @param {'main' | 'all'} [scope] Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
49
56
|
* @throws {RequiredError}
|
|
50
57
|
* @memberof InventoriesApiInterface
|
|
51
58
|
*/
|
|
52
|
-
getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
|
|
59
|
+
getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
|
|
53
60
|
/**
|
|
54
61
|
*
|
|
55
62
|
* @summary Get inventory from the latest collection
|
|
63
|
+
* @param {'main' | 'all'} [scope] Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
56
64
|
* @param {*} [options] Override http request option.
|
|
57
65
|
* @throws {RequiredError}
|
|
58
66
|
* @memberof InventoriesApiInterface
|
|
59
67
|
*/
|
|
60
|
-
getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
68
|
+
getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
61
69
|
/**
|
|
62
70
|
* Get inventory from the latest collection
|
|
63
71
|
*/
|
|
64
|
-
getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
72
|
+
getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
65
73
|
}
|
|
66
74
|
/**
|
|
67
75
|
*
|
|
@@ -82,13 +90,21 @@ export declare class InventoriesApi extends runtime.BaseAPI implements Inventori
|
|
|
82
90
|
/**
|
|
83
91
|
* Creates request options for getLatestInventory without sending the request
|
|
84
92
|
*/
|
|
85
|
-
getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
|
|
93
|
+
getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
|
|
86
94
|
/**
|
|
87
95
|
* Get inventory from the latest collection
|
|
88
96
|
*/
|
|
89
|
-
getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
97
|
+
getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
90
98
|
/**
|
|
91
99
|
* Get inventory from the latest collection
|
|
92
100
|
*/
|
|
93
|
-
getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
101
|
+
getLatestInventory(requestParameters?: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
94
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* @export
|
|
105
|
+
*/
|
|
106
|
+
export declare const GetLatestInventoryScopeEnum: {
|
|
107
|
+
readonly Main: "main";
|
|
108
|
+
readonly All: "all";
|
|
109
|
+
};
|
|
110
|
+
export type GetLatestInventoryScopeEnum = typeof GetLatestInventoryScopeEnum[keyof typeof GetLatestInventoryScopeEnum];
|
|
@@ -68,9 +68,12 @@ export class InventoriesApi extends runtime.BaseAPI {
|
|
|
68
68
|
/**
|
|
69
69
|
* Creates request options for getLatestInventory without sending the request
|
|
70
70
|
*/
|
|
71
|
-
getLatestInventoryRequestOpts() {
|
|
71
|
+
getLatestInventoryRequestOpts(requestParameters) {
|
|
72
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
73
|
const queryParameters = {};
|
|
74
|
+
if (requestParameters['scope'] != null) {
|
|
75
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
76
|
+
}
|
|
74
77
|
const headerParameters = {};
|
|
75
78
|
let urlPath = `/inventory`;
|
|
76
79
|
return {
|
|
@@ -84,9 +87,9 @@ export class InventoriesApi extends runtime.BaseAPI {
|
|
|
84
87
|
/**
|
|
85
88
|
* Get inventory from the latest collection
|
|
86
89
|
*/
|
|
87
|
-
getLatestInventoryRaw(initOverrides) {
|
|
90
|
+
getLatestInventoryRaw(requestParameters, initOverrides) {
|
|
88
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
const requestOptions = yield this.getLatestInventoryRequestOpts();
|
|
92
|
+
const requestOptions = yield this.getLatestInventoryRequestOpts(requestParameters);
|
|
90
93
|
const response = yield this.request(requestOptions, initOverrides);
|
|
91
94
|
return new runtime.JSONApiResponse(response, (jsonValue) => InventoryFromJSON(jsonValue));
|
|
92
95
|
});
|
|
@@ -94,10 +97,17 @@ export class InventoriesApi extends runtime.BaseAPI {
|
|
|
94
97
|
/**
|
|
95
98
|
* Get inventory from the latest collection
|
|
96
99
|
*/
|
|
97
|
-
getLatestInventory(
|
|
98
|
-
return __awaiter(this,
|
|
99
|
-
const response = yield this.getLatestInventoryRaw(initOverrides);
|
|
100
|
+
getLatestInventory() {
|
|
101
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
102
|
+
const response = yield this.getLatestInventoryRaw(requestParameters, initOverrides);
|
|
100
103
|
return yield response.value();
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* @export
|
|
109
|
+
*/
|
|
110
|
+
export const GetLatestInventoryScopeEnum = {
|
|
111
|
+
Main: 'main',
|
|
112
|
+
All: 'all',
|
|
113
|
+
};
|
package/dist/esm/models/Group.js
CHANGED
|
@@ -36,6 +36,7 @@ export function GroupFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
'name': json['name'],
|
|
37
37
|
'description': json['description'] == null ? undefined : json['description'],
|
|
38
38
|
'filter': json['filter'],
|
|
39
|
+
'vmCount': json['vmCount'] == null ? undefined : json['vmCount'],
|
|
39
40
|
'createdAt': json['createdAt'] == null ? undefined : (parseDateTime(json['createdAt'])),
|
|
40
41
|
'updatedAt': json['updatedAt'] == null ? undefined : (parseDateTime(json['updatedAt'])),
|
|
41
42
|
};
|
|
@@ -52,6 +53,7 @@ export function GroupToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
52
53
|
'name': value['name'],
|
|
53
54
|
'description': value['description'],
|
|
54
55
|
'filter': value['filter'],
|
|
56
|
+
'vmCount': value['vmCount'],
|
|
55
57
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
56
58
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : serializeDateTime(value['updatedAt']),
|
|
57
59
|
};
|
package/dist/esm/models/VMs.d.ts
CHANGED
package/dist/esm/models/VMs.js
CHANGED
|
@@ -55,6 +55,7 @@ export function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
55
55
|
'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
|
|
56
56
|
'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'],
|
|
57
57
|
'totalWithRDM': json['totalWithRDM'] == null ? undefined : json['totalWithRDM'],
|
|
58
|
+
'totalWithFaultTolerance': json['totalWithFaultTolerance'] == null ? undefined : json['totalWithFaultTolerance'],
|
|
58
59
|
'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']),
|
|
59
60
|
'diskSizeTier': json['diskSizeTier'] == null ? undefined : (mapValues(json['diskSizeTier'], DiskSizeTierSummaryFromJSON)),
|
|
60
61
|
'diskComplexityTier': json['diskComplexityTier'] == null ? undefined : (mapValues(json['diskComplexityTier'], DiskSizeTierSummaryFromJSON)),
|
|
@@ -89,6 +90,7 @@ export function VMsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
89
90
|
'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
|
|
90
91
|
'totalWithSharedDisks': value['totalWithSharedDisks'],
|
|
91
92
|
'totalWithRDM': value['totalWithRDM'],
|
|
93
|
+
'totalWithFaultTolerance': value['totalWithFaultTolerance'],
|
|
92
94
|
'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']),
|
|
93
95
|
'diskSizeTier': value['diskSizeTier'] == null ? undefined : (mapValues(value['diskSizeTier'], DiskSizeTierSummaryToJSON)),
|
|
94
96
|
'diskComplexityTier': value['diskComplexityTier'] == null ? undefined : (mapValues(value['diskComplexityTier'], DiskSizeTierSummaryToJSON)),
|
package/dist/models/Group.d.ts
CHANGED
package/dist/models/Group.js
CHANGED
|
@@ -43,6 +43,7 @@ function GroupFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
43
|
'name': json['name'],
|
|
44
44
|
'description': json['description'] == null ? undefined : json['description'],
|
|
45
45
|
'filter': json['filter'],
|
|
46
|
+
'vmCount': json['vmCount'] == null ? undefined : json['vmCount'],
|
|
46
47
|
'createdAt': json['createdAt'] == null ? undefined : ((0, runtime_js_1.parseDateTime)(json['createdAt'])),
|
|
47
48
|
'updatedAt': json['updatedAt'] == null ? undefined : ((0, runtime_js_1.parseDateTime)(json['updatedAt'])),
|
|
48
49
|
};
|
|
@@ -59,6 +60,7 @@ function GroupToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
59
60
|
'name': value['name'],
|
|
60
61
|
'description': value['description'],
|
|
61
62
|
'filter': value['filter'],
|
|
63
|
+
'vmCount': value['vmCount'],
|
|
62
64
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : (0, runtime_js_1.serializeDateTime)(value['createdAt']),
|
|
63
65
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : (0, runtime_js_1.serializeDateTime)(value['updatedAt']),
|
|
64
66
|
};
|
package/dist/models/VMs.d.ts
CHANGED
package/dist/models/VMs.js
CHANGED
|
@@ -62,6 +62,7 @@ function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
62
|
'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
|
|
63
63
|
'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'],
|
|
64
64
|
'totalWithRDM': json['totalWithRDM'] == null ? undefined : json['totalWithRDM'],
|
|
65
|
+
'totalWithFaultTolerance': json['totalWithFaultTolerance'] == null ? undefined : json['totalWithFaultTolerance'],
|
|
65
66
|
'cpuCores': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['cpuCores']),
|
|
66
67
|
'diskSizeTier': json['diskSizeTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['diskSizeTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
|
|
67
68
|
'diskComplexityTier': json['diskComplexityTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['diskComplexityTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
|
|
@@ -96,6 +97,7 @@ function VMsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
96
97
|
'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
|
|
97
98
|
'totalWithSharedDisks': value['totalWithSharedDisks'],
|
|
98
99
|
'totalWithRDM': value['totalWithRDM'],
|
|
100
|
+
'totalWithFaultTolerance': value['totalWithFaultTolerance'],
|
|
99
101
|
'cpuCores': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['cpuCores']),
|
|
100
102
|
'diskSizeTier': value['diskSizeTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['diskSizeTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
|
|
101
103
|
'diskComplexityTier': value['diskComplexityTier'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['diskComplexityTier'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
|
package/docs/Group.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`description` | string
|
|
12
12
|
`filter` | string
|
|
13
|
+
`vmCount` | number
|
|
13
14
|
`createdAt` | Date
|
|
14
15
|
`updatedAt` | Date
|
|
15
16
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"name": null,
|
|
25
26
|
"description": null,
|
|
26
27
|
"filter": memory >= 8GB and cluster = 'prod',
|
|
28
|
+
"vmCount": null,
|
|
27
29
|
"createdAt": null,
|
|
28
30
|
"updatedAt": null,
|
|
29
31
|
} satisfies Group
|
package/docs/InventoriesApi.md
CHANGED
|
@@ -78,7 +78,7 @@ No authorization required
|
|
|
78
78
|
|
|
79
79
|
## getLatestInventory
|
|
80
80
|
|
|
81
|
-
> Inventory getLatestInventory()
|
|
81
|
+
> Inventory getLatestInventory(scope)
|
|
82
82
|
|
|
83
83
|
Get inventory from the latest collection
|
|
84
84
|
|
|
@@ -95,8 +95,13 @@ async function example() {
|
|
|
95
95
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
96
96
|
const api = new InventoriesApi();
|
|
97
97
|
|
|
98
|
+
const body = {
|
|
99
|
+
// 'main' | 'all' | Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments. (optional)
|
|
100
|
+
scope: scope_example,
|
|
101
|
+
} satisfies GetLatestInventoryRequest;
|
|
102
|
+
|
|
98
103
|
try {
|
|
99
|
-
const data = await api.getLatestInventory();
|
|
104
|
+
const data = await api.getLatestInventory(body);
|
|
100
105
|
console.log(data);
|
|
101
106
|
} catch (error) {
|
|
102
107
|
console.error(error);
|
|
@@ -109,7 +114,10 @@ example().catch(console.error);
|
|
|
109
114
|
|
|
110
115
|
### Parameters
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
|
|
118
|
+
| Name | Type | Description | Notes |
|
|
119
|
+
|------------- | ------------- | ------------- | -------------|
|
|
120
|
+
| **scope** | `main`, `all` | Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments. | [Optional] [Defaults to `'main'`] [Enum: main, all] |
|
|
113
121
|
|
|
114
122
|
### Return type
|
|
115
123
|
|
|
@@ -122,13 +130,13 @@ No authorization required
|
|
|
122
130
|
### HTTP request headers
|
|
123
131
|
|
|
124
132
|
- **Content-Type**: Not defined
|
|
125
|
-
- **Accept**: `application/json`
|
|
133
|
+
- **Accept**: `application/json`, `application/zip`
|
|
126
134
|
|
|
127
135
|
|
|
128
136
|
### HTTP response details
|
|
129
137
|
| Status code | Description | Response headers |
|
|
130
138
|
|-------------|-------------|------------------|
|
|
131
|
-
| **200** | Collected inventory | - |
|
|
139
|
+
| **200** | Collected inventory. JSON when scope is \"main\"; a ZIP archive when scope is \"all\". | - |
|
|
132
140
|
| **404** | No collections or inventory not found | - |
|
|
133
141
|
| **500** | Internal server error | - |
|
|
134
142
|
|
package/docs/VMs.md
CHANGED
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`totalMigratableWithWarnings` | number
|
|
12
12
|
`totalWithSharedDisks` | number
|
|
13
13
|
`totalWithRDM` | number
|
|
14
|
+
`totalWithFaultTolerance` | number
|
|
14
15
|
`cpuCores` | [VMResourceBreakdown](VMResourceBreakdown.md)
|
|
15
16
|
`diskSizeTier` | [{ [key: string]: DiskSizeTierSummary; }](DiskSizeTierSummary.md)
|
|
16
17
|
`diskComplexityTier` | [{ [key: string]: DiskSizeTierSummary; }](DiskSizeTierSummary.md)
|
|
@@ -43,6 +44,7 @@ const example = {
|
|
|
43
44
|
"totalMigratableWithWarnings": null,
|
|
44
45
|
"totalWithSharedDisks": null,
|
|
45
46
|
"totalWithRDM": null,
|
|
47
|
+
"totalWithFaultTolerance": null,
|
|
46
48
|
"cpuCores": null,
|
|
47
49
|
"diskSizeTier": null,
|
|
48
50
|
"diskComplexityTier": null,
|
package/package.json
CHANGED
|
@@ -26,6 +26,13 @@ export interface GetInventoryRequest {
|
|
|
26
26
|
id: string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export interface GetLatestInventoryRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Selects which inventories to return. "main" (default) returns only the main inventory as JSON. "all" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
32
|
+
*/
|
|
33
|
+
scope?: GetLatestInventoryScopeEnum;
|
|
34
|
+
}
|
|
35
|
+
|
|
29
36
|
/**
|
|
30
37
|
* InventoriesApi - interface
|
|
31
38
|
*
|
|
@@ -58,24 +65,26 @@ export interface InventoriesApiInterface {
|
|
|
58
65
|
|
|
59
66
|
/**
|
|
60
67
|
* Creates request options for getLatestInventory without sending the request
|
|
68
|
+
* @param {'main' | 'all'} [scope] Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
61
69
|
* @throws {RequiredError}
|
|
62
70
|
* @memberof InventoriesApiInterface
|
|
63
71
|
*/
|
|
64
|
-
getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts>;
|
|
72
|
+
getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts>;
|
|
65
73
|
|
|
66
74
|
/**
|
|
67
75
|
*
|
|
68
76
|
* @summary Get inventory from the latest collection
|
|
77
|
+
* @param {'main' | 'all'} [scope] Selects which inventories to return. \"main\" (default) returns only the main inventory as JSON. \"all\" returns a ZIP bundle containing the main inventory (inventory.json) and every group subset inventory (subsets/<groupId>.json), for manual upload in disconnected environments.
|
|
69
78
|
* @param {*} [options] Override http request option.
|
|
70
79
|
* @throws {RequiredError}
|
|
71
80
|
* @memberof InventoriesApiInterface
|
|
72
81
|
*/
|
|
73
|
-
getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
82
|
+
getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>>;
|
|
74
83
|
|
|
75
84
|
/**
|
|
76
85
|
* Get inventory from the latest collection
|
|
77
86
|
*/
|
|
78
|
-
getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
87
|
+
getLatestInventory(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory>;
|
|
79
88
|
|
|
80
89
|
}
|
|
81
90
|
|
|
@@ -132,9 +141,13 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
|
|
|
132
141
|
/**
|
|
133
142
|
* Creates request options for getLatestInventory without sending the request
|
|
134
143
|
*/
|
|
135
|
-
async getLatestInventoryRequestOpts(): Promise<runtime.RequestOpts> {
|
|
144
|
+
async getLatestInventoryRequestOpts(requestParameters: GetLatestInventoryRequest): Promise<runtime.RequestOpts> {
|
|
136
145
|
const queryParameters: any = {};
|
|
137
146
|
|
|
147
|
+
if (requestParameters['scope'] != null) {
|
|
148
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
149
|
+
}
|
|
150
|
+
|
|
138
151
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
139
152
|
|
|
140
153
|
|
|
@@ -151,8 +164,8 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
|
|
|
151
164
|
/**
|
|
152
165
|
* Get inventory from the latest collection
|
|
153
166
|
*/
|
|
154
|
-
async getLatestInventoryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>> {
|
|
155
|
-
const requestOptions = await this.getLatestInventoryRequestOpts();
|
|
167
|
+
async getLatestInventoryRaw(requestParameters: GetLatestInventoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Inventory>> {
|
|
168
|
+
const requestOptions = await this.getLatestInventoryRequestOpts(requestParameters);
|
|
156
169
|
const response = await this.request(requestOptions, initOverrides);
|
|
157
170
|
|
|
158
171
|
return new runtime.JSONApiResponse(response, (jsonValue) => InventoryFromJSON(jsonValue));
|
|
@@ -161,9 +174,18 @@ export class InventoriesApi extends runtime.BaseAPI implements InventoriesApiInt
|
|
|
161
174
|
/**
|
|
162
175
|
* Get inventory from the latest collection
|
|
163
176
|
*/
|
|
164
|
-
async getLatestInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory> {
|
|
165
|
-
const response = await this.getLatestInventoryRaw(initOverrides);
|
|
177
|
+
async getLatestInventory(requestParameters: GetLatestInventoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Inventory> {
|
|
178
|
+
const response = await this.getLatestInventoryRaw(requestParameters, initOverrides);
|
|
166
179
|
return await response.value();
|
|
167
180
|
}
|
|
168
181
|
|
|
169
182
|
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @export
|
|
186
|
+
*/
|
|
187
|
+
export const GetLatestInventoryScopeEnum = {
|
|
188
|
+
Main: 'main',
|
|
189
|
+
All: 'all',
|
|
190
|
+
} as const;
|
|
191
|
+
export type GetLatestInventoryScopeEnum = typeof GetLatestInventoryScopeEnum[keyof typeof GetLatestInventoryScopeEnum];
|
package/src/models/Group.ts
CHANGED
|
@@ -35,6 +35,10 @@ export interface Group {
|
|
|
35
35
|
* Filter expression (pkg/filter DSL)
|
|
36
36
|
*/
|
|
37
37
|
filter: string;
|
|
38
|
+
/**
|
|
39
|
+
* Number of VMs matching the group filter
|
|
40
|
+
*/
|
|
41
|
+
vmCount?: number;
|
|
38
42
|
/**
|
|
39
43
|
*
|
|
40
44
|
*/
|
|
@@ -69,6 +73,7 @@ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Gro
|
|
|
69
73
|
'name': json['name'],
|
|
70
74
|
'description': json['description'] == null ? undefined : json['description'],
|
|
71
75
|
'filter': json['filter'],
|
|
76
|
+
'vmCount': json['vmCount'] == null ? undefined : json['vmCount'],
|
|
72
77
|
'createdAt': json['createdAt'] == null ? undefined : (parseDateTime(json['createdAt'])),
|
|
73
78
|
'updatedAt': json['updatedAt'] == null ? undefined : (parseDateTime(json['updatedAt'])),
|
|
74
79
|
};
|
|
@@ -89,6 +94,7 @@ export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: bool
|
|
|
89
94
|
'name': value['name'],
|
|
90
95
|
'description': value['description'],
|
|
91
96
|
'filter': value['filter'],
|
|
97
|
+
'vmCount': value['vmCount'],
|
|
92
98
|
'createdAt': value['createdAt'] == null ? value['createdAt'] : serializeDateTime(value['createdAt']),
|
|
93
99
|
'updatedAt': value['updatedAt'] == null ? value['updatedAt'] : serializeDateTime(value['updatedAt']),
|
|
94
100
|
};
|
package/src/models/VMs.ts
CHANGED
|
@@ -82,6 +82,10 @@ export interface VMs {
|
|
|
82
82
|
* Number of VMs that have at least one raw device mapping (RDM) disk
|
|
83
83
|
*/
|
|
84
84
|
totalWithRDM?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Number of VMs that have Fault Tolerance enabled
|
|
87
|
+
*/
|
|
88
|
+
totalWithFaultTolerance?: number;
|
|
85
89
|
/**
|
|
86
90
|
*
|
|
87
91
|
*/
|
|
@@ -194,6 +198,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
|
|
|
194
198
|
'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
|
|
195
199
|
'totalWithSharedDisks': json['totalWithSharedDisks'] == null ? undefined : json['totalWithSharedDisks'],
|
|
196
200
|
'totalWithRDM': json['totalWithRDM'] == null ? undefined : json['totalWithRDM'],
|
|
201
|
+
'totalWithFaultTolerance': json['totalWithFaultTolerance'] == null ? undefined : json['totalWithFaultTolerance'],
|
|
197
202
|
'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']),
|
|
198
203
|
'diskSizeTier': json['diskSizeTier'] == null ? undefined : (mapValues(json['diskSizeTier'], DiskSizeTierSummaryFromJSON)),
|
|
199
204
|
'diskComplexityTier': json['diskComplexityTier'] == null ? undefined : (mapValues(json['diskComplexityTier'], DiskSizeTierSummaryFromJSON)),
|
|
@@ -232,6 +237,7 @@ export function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator: boolean
|
|
|
232
237
|
'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
|
|
233
238
|
'totalWithSharedDisks': value['totalWithSharedDisks'],
|
|
234
239
|
'totalWithRDM': value['totalWithRDM'],
|
|
240
|
+
'totalWithFaultTolerance': value['totalWithFaultTolerance'],
|
|
235
241
|
'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']),
|
|
236
242
|
'diskSizeTier': value['diskSizeTier'] == null ? undefined : (mapValues(value['diskSizeTier'], DiskSizeTierSummaryToJSON)),
|
|
237
243
|
'diskComplexityTier': value['diskComplexityTier'] == null ? undefined : (mapValues(value['diskComplexityTier'], DiskSizeTierSummaryToJSON)),
|