@openshift-migration-advisor/agent-sdk 0.33.1-84c734aba511 → 0.33.1-d086ee06be70
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 +26 -0
- package/README.md +20 -2
- package/dist/apis/AppliancesApi.d.ts +194 -0
- package/dist/apis/AppliancesApi.js +201 -0
- package/dist/apis/GroupsApi.d.ts +6 -6
- package/dist/apis/RecommendationsApi.d.ts +64 -0
- package/dist/apis/RecommendationsApi.js +74 -0
- package/dist/apis/VirtualMachinesApi.d.ts +6 -6
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AppliancesApi.d.ts +194 -0
- package/dist/esm/apis/AppliancesApi.js +201 -0
- package/dist/esm/apis/GroupsApi.d.ts +6 -6
- package/dist/esm/apis/RecommendationsApi.d.ts +64 -0
- package/dist/esm/apis/RecommendationsApi.js +70 -0
- package/dist/esm/apis/VirtualMachinesApi.d.ts +6 -6
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ApplianceRule.d.ts +90 -0
- package/dist/esm/models/ApplianceRule.js +98 -0
- package/dist/esm/models/ApplianceRuleCondition.d.ts +42 -0
- package/dist/esm/models/ApplianceRuleCondition.js +48 -0
- package/dist/esm/models/ApplianceRuleFunction.d.ts +37 -0
- package/dist/esm/models/ApplianceRuleFunction.js +46 -0
- package/dist/esm/models/ApplianceRuleListResponse.d.ts +31 -0
- package/dist/esm/models/ApplianceRuleListResponse.js +44 -0
- package/dist/esm/models/ApplianceRuleRequest.d.ts +74 -0
- package/dist/esm/models/ApplianceRuleRequest.js +85 -0
- package/dist/esm/models/ComplexityDiskScoreEntry.d.ts +39 -0
- package/dist/esm/models/ComplexityDiskScoreEntry.js +51 -0
- package/dist/esm/models/ComplexityOSNameEntry.d.ts +40 -0
- package/dist/esm/models/ComplexityOSNameEntry.js +51 -0
- package/dist/esm/models/ComplexityOSScoreEntry.d.ts +35 -0
- package/dist/esm/models/ComplexityOSScoreEntry.js +47 -0
- package/dist/esm/models/Datastore.d.ts +9 -0
- package/dist/esm/models/Datastore.js +5 -0
- package/dist/esm/models/DiskGeometryCondition.d.ts +47 -0
- package/dist/esm/models/DiskGeometryCondition.js +58 -0
- package/dist/esm/models/MigrationComplexityRequest.d.ts +30 -0
- package/dist/esm/models/MigrationComplexityRequest.js +41 -0
- package/dist/esm/models/MigrationComplexityResponse.d.ts +58 -0
- package/dist/esm/models/MigrationComplexityResponse.js +62 -0
- package/dist/esm/models/StorageArray.d.ts +42 -0
- package/dist/esm/models/StorageArray.js +47 -0
- package/dist/esm/models/VirtualMachineDatastore.d.ts +9 -0
- package/dist/esm/models/VirtualMachineDatastore.js +5 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/esm/runtime.d.ts +3 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ApplianceRule.d.ts +90 -0
- package/dist/models/ApplianceRule.js +106 -0
- package/dist/models/ApplianceRuleCondition.d.ts +42 -0
- package/dist/models/ApplianceRuleCondition.js +55 -0
- package/dist/models/ApplianceRuleFunction.d.ts +37 -0
- package/dist/models/ApplianceRuleFunction.js +53 -0
- package/dist/models/ApplianceRuleListResponse.d.ts +31 -0
- package/dist/models/ApplianceRuleListResponse.js +51 -0
- package/dist/models/ApplianceRuleRequest.d.ts +74 -0
- package/dist/models/ApplianceRuleRequest.js +93 -0
- package/dist/models/ComplexityDiskScoreEntry.d.ts +39 -0
- package/dist/models/ComplexityDiskScoreEntry.js +58 -0
- package/dist/models/ComplexityOSNameEntry.d.ts +40 -0
- package/dist/models/ComplexityOSNameEntry.js +58 -0
- package/dist/models/ComplexityOSScoreEntry.d.ts +35 -0
- package/dist/models/ComplexityOSScoreEntry.js +54 -0
- package/dist/models/Datastore.d.ts +9 -0
- package/dist/models/Datastore.js +5 -0
- package/dist/models/DiskGeometryCondition.d.ts +47 -0
- package/dist/models/DiskGeometryCondition.js +66 -0
- package/dist/models/MigrationComplexityRequest.d.ts +30 -0
- package/dist/models/MigrationComplexityRequest.js +48 -0
- package/dist/models/MigrationComplexityResponse.d.ts +58 -0
- package/dist/models/MigrationComplexityResponse.js +69 -0
- package/dist/models/StorageArray.d.ts +42 -0
- package/dist/models/StorageArray.js +54 -0
- package/dist/models/VirtualMachineDatastore.d.ts +9 -0
- package/dist/models/VirtualMachineDatastore.js +5 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/dist/runtime.d.ts +3 -1
- package/dist/runtime.js +1 -1
- package/docs/ApplianceRule.md +50 -0
- package/docs/ApplianceRuleCondition.md +39 -0
- package/docs/ApplianceRuleFunction.md +37 -0
- package/docs/ApplianceRuleListResponse.md +34 -0
- package/docs/ApplianceRuleRequest.md +46 -0
- package/docs/AppliancesApi.md +338 -0
- package/docs/ComplexityDiskScoreEntry.md +39 -0
- package/docs/ComplexityOSNameEntry.md +39 -0
- package/docs/ComplexityOSScoreEntry.md +37 -0
- package/docs/Datastore.md +4 -0
- package/docs/DiskGeometryCondition.md +38 -0
- package/docs/GroupsApi.md +4 -4
- package/docs/MigrationComplexityRequest.md +35 -0
- package/docs/MigrationComplexityResponse.md +43 -0
- package/docs/RecommendationsApi.md +79 -0
- package/docs/StorageArray.md +41 -0
- package/docs/VirtualMachineDatastore.md +4 -0
- package/docs/VirtualMachinesApi.md +4 -4
- package/package.json +1 -1
- package/src/apis/AppliancesApi.ts +393 -0
- package/src/apis/GroupsApi.ts +6 -6
- package/src/apis/RecommendationsApi.ts +117 -0
- package/src/apis/VirtualMachinesApi.ts +6 -6
- package/src/apis/index.ts +1 -0
- package/src/models/ApplianceRule.ts +159 -0
- package/src/models/ApplianceRuleCondition.ts +87 -0
- package/src/models/ApplianceRuleFunction.ts +80 -0
- package/src/models/ApplianceRuleListResponse.ts +72 -0
- package/src/models/ApplianceRuleRequest.ts +137 -0
- package/src/models/ComplexityDiskScoreEntry.ts +79 -0
- package/src/models/ComplexityOSNameEntry.ts +80 -0
- package/src/models/ComplexityOSScoreEntry.ts +72 -0
- package/src/models/Datastore.ts +19 -0
- package/src/models/DiskGeometryCondition.ts +90 -0
- package/src/models/MigrationComplexityRequest.ts +63 -0
- package/src/models/MigrationComplexityResponse.ts +119 -0
- package/src/models/StorageArray.ts +81 -0
- package/src/models/VirtualMachineDatastore.ts +20 -0
- package/src/models/index.ts +12 -0
- package/src/runtime.ts +8 -1
|
@@ -0,0 +1,117 @@
|
|
|
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: v2
|
|
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 * as runtime from '../runtime.js';
|
|
16
|
+
import {
|
|
17
|
+
type MigrationComplexityRequest,
|
|
18
|
+
MigrationComplexityRequestFromJSON,
|
|
19
|
+
MigrationComplexityRequestToJSON,
|
|
20
|
+
} from '../models/MigrationComplexityRequest.js';
|
|
21
|
+
import {
|
|
22
|
+
type MigrationComplexityResponse,
|
|
23
|
+
MigrationComplexityResponseFromJSON,
|
|
24
|
+
MigrationComplexityResponseToJSON,
|
|
25
|
+
} from '../models/MigrationComplexityResponse.js';
|
|
26
|
+
|
|
27
|
+
export interface CalculateMigrationComplexityRequest {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
migrationComplexityRequest: MigrationComplexityRequest;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* RecommendationsApi - interface
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface RecommendationsApiInterface
|
|
39
|
+
*/
|
|
40
|
+
export interface RecommendationsApiInterface {
|
|
41
|
+
/**
|
|
42
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
43
|
+
* @param {MigrationComplexityRequest} migrationComplexityRequest
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
* @memberof RecommendationsApiInterface
|
|
46
|
+
*/
|
|
47
|
+
calculateMigrationComplexityRequestOpts(requestParameters: CalculateMigrationComplexityRequest): Promise<runtime.RequestOpts>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Calculate migration complexity estimation for the latest collection
|
|
51
|
+
* @param {MigrationComplexityRequest} migrationComplexityRequest
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
* @memberof RecommendationsApiInterface
|
|
55
|
+
*/
|
|
56
|
+
calculateMigrationComplexityRaw(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationComplexityResponse>>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Calculate migration complexity estimation for the latest collection
|
|
60
|
+
*/
|
|
61
|
+
calculateMigrationComplexity(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationComplexityResponse>;
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
export class RecommendationsApi extends runtime.BaseAPI implements RecommendationsApiInterface {
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Creates request options for calculateMigrationComplexity without sending the request
|
|
72
|
+
*/
|
|
73
|
+
async calculateMigrationComplexityRequestOpts(requestParameters: CalculateMigrationComplexityRequest): Promise<runtime.RequestOpts> {
|
|
74
|
+
if (requestParameters['migrationComplexityRequest'] == null) {
|
|
75
|
+
throw new runtime.RequiredError(
|
|
76
|
+
'migrationComplexityRequest',
|
|
77
|
+
'Required parameter "migrationComplexityRequest" was null or undefined when calling calculateMigrationComplexity().'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const queryParameters: any = {};
|
|
82
|
+
|
|
83
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
84
|
+
|
|
85
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
let urlPath = `/complexity-estimation`;
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
path: urlPath,
|
|
92
|
+
method: 'POST',
|
|
93
|
+
headers: headerParameters,
|
|
94
|
+
query: queryParameters,
|
|
95
|
+
body: MigrationComplexityRequestToJSON(requestParameters['migrationComplexityRequest']),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Calculate migration complexity estimation for the latest collection
|
|
101
|
+
*/
|
|
102
|
+
async calculateMigrationComplexityRaw(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MigrationComplexityResponse>> {
|
|
103
|
+
const requestOptions = await this.calculateMigrationComplexityRequestOpts(requestParameters);
|
|
104
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
105
|
+
|
|
106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MigrationComplexityResponseFromJSON(jsonValue));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Calculate migration complexity estimation for the latest collection
|
|
111
|
+
*/
|
|
112
|
+
async calculateMigrationComplexity(requestParameters: CalculateMigrationComplexityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MigrationComplexityResponse> {
|
|
113
|
+
const response = await this.calculateMigrationComplexityRaw(requestParameters, initOverrides);
|
|
114
|
+
return await response.value();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
@@ -129,7 +129,7 @@ export interface ListLatestVirtualMachinesRequest {
|
|
|
129
129
|
*/
|
|
130
130
|
byExpression?: string;
|
|
131
131
|
/**
|
|
132
|
-
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
132
|
+
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
133
133
|
*/
|
|
134
134
|
sort?: Array<string>;
|
|
135
135
|
/**
|
|
@@ -152,7 +152,7 @@ export interface ListVirtualMachinesRequest {
|
|
|
152
152
|
*/
|
|
153
153
|
byExpression?: string;
|
|
154
154
|
/**
|
|
155
|
-
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
155
|
+
* Sort fields with direction (e.g., "name:asc", "cluster:desc"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
156
156
|
*/
|
|
157
157
|
sort?: Array<string>;
|
|
158
158
|
/**
|
|
@@ -427,7 +427,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
427
427
|
/**
|
|
428
428
|
* Creates request options for listLatestVirtualMachines without sending the request
|
|
429
429
|
* @param {string} [byExpression] Filter by expression
|
|
430
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
430
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
431
431
|
* @param {number} [page] Page number for pagination
|
|
432
432
|
* @param {number} [pageSize] Number of items per page
|
|
433
433
|
* @throws {RequiredError}
|
|
@@ -439,7 +439,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
439
439
|
*
|
|
440
440
|
* @summary List VirtualMachines from the latest collection
|
|
441
441
|
* @param {string} [byExpression] Filter by expression
|
|
442
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
442
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
443
443
|
* @param {number} [page] Page number for pagination
|
|
444
444
|
* @param {number} [pageSize] Number of items per page
|
|
445
445
|
* @param {*} [options] Override http request option.
|
|
@@ -457,7 +457,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
457
457
|
* Creates request options for listVirtualMachines without sending the request
|
|
458
458
|
* @param {string} id Collection ID
|
|
459
459
|
* @param {string} [byExpression] Filter by expression
|
|
460
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
460
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
461
461
|
* @param {number} [page] Page number for pagination
|
|
462
462
|
* @param {number} [pageSize] Number of items per page
|
|
463
463
|
* @throws {RequiredError}
|
|
@@ -470,7 +470,7 @@ export interface VirtualMachinesApiInterface {
|
|
|
470
470
|
* @summary List VirtualMachines in a collection
|
|
471
471
|
* @param {string} id Collection ID
|
|
472
472
|
* @param {string} [byExpression] Filter by expression
|
|
473
|
-
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg.
|
|
473
|
+
* @param {Array<string>} [sort] Sort fields with direction (e.g., \"name:asc\", \"cluster:desc\"). Valid fields are name, vCenterState, cluster, diskSize, memory, issues, cpuUsage, diskUsage, ramUsage, cpuAvg, memAvg, guestOs.
|
|
474
474
|
* @param {number} [page] Page number for pagination
|
|
475
475
|
* @param {number} [pageSize] Number of items per page
|
|
476
476
|
* @param {*} [options] Override http request option.
|
package/src/apis/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './GroupsApi.js';
|
|
|
11
11
|
export * from './ImageUpgradeApi.js';
|
|
12
12
|
export * from './InspectorApi.js';
|
|
13
13
|
export * from './InventoriesApi.js';
|
|
14
|
+
export * from './RecommendationsApi.js';
|
|
14
15
|
export * from './RightsizingApi.js';
|
|
15
16
|
export * from './VersionApi.js';
|
|
16
17
|
export * from './VirtualMachinesApi.js';
|
|
@@ -0,0 +1,159 @@
|
|
|
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: v2
|
|
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 { ApplianceRuleCondition } from './ApplianceRuleCondition.js';
|
|
17
|
+
import {
|
|
18
|
+
ApplianceRuleConditionFromJSON,
|
|
19
|
+
ApplianceRuleConditionFromJSONTyped,
|
|
20
|
+
ApplianceRuleConditionToJSON,
|
|
21
|
+
ApplianceRuleConditionToJSONTyped,
|
|
22
|
+
} from './ApplianceRuleCondition.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ApplianceRule
|
|
28
|
+
*/
|
|
29
|
+
export interface ApplianceRule {
|
|
30
|
+
/**
|
|
31
|
+
* Rule ID
|
|
32
|
+
*/
|
|
33
|
+
id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Appliance product name
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
/**
|
|
39
|
+
* Appliance vendor
|
|
40
|
+
*/
|
|
41
|
+
vendor: string;
|
|
42
|
+
/**
|
|
43
|
+
* Appliance category
|
|
44
|
+
*/
|
|
45
|
+
category: string;
|
|
46
|
+
/**
|
|
47
|
+
* OSV migration verdict
|
|
48
|
+
*/
|
|
49
|
+
osv_verdict: ApplianceRuleOsvVerdictEnum;
|
|
50
|
+
/**
|
|
51
|
+
* Confidence ceiling for this rule
|
|
52
|
+
*/
|
|
53
|
+
max_confidence: ApplianceRuleMaxConfidenceEnum;
|
|
54
|
+
/**
|
|
55
|
+
* Kind of rules either default or custom
|
|
56
|
+
*/
|
|
57
|
+
kind: ApplianceRuleKindEnum;
|
|
58
|
+
/**
|
|
59
|
+
* Number of conditions that must match before the rule fires
|
|
60
|
+
*/
|
|
61
|
+
min_matched: number;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
conditions: Array<ApplianceRuleCondition>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @export
|
|
71
|
+
*/
|
|
72
|
+
export const ApplianceRuleOsvVerdictEnum = {
|
|
73
|
+
Blocked: 'blocked',
|
|
74
|
+
Conditional: 'conditional',
|
|
75
|
+
Supported: 'supported',
|
|
76
|
+
Unknown: 'unknown',
|
|
77
|
+
} as const;
|
|
78
|
+
export type ApplianceRuleOsvVerdictEnum = typeof ApplianceRuleOsvVerdictEnum[keyof typeof ApplianceRuleOsvVerdictEnum];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @export
|
|
82
|
+
*/
|
|
83
|
+
export const ApplianceRuleMaxConfidenceEnum = {
|
|
84
|
+
High: 'high',
|
|
85
|
+
Medium: 'medium',
|
|
86
|
+
Low: 'low',
|
|
87
|
+
} as const;
|
|
88
|
+
export type ApplianceRuleMaxConfidenceEnum = typeof ApplianceRuleMaxConfidenceEnum[keyof typeof ApplianceRuleMaxConfidenceEnum];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @export
|
|
92
|
+
*/
|
|
93
|
+
export const ApplianceRuleKindEnum = {
|
|
94
|
+
Default: 'default',
|
|
95
|
+
Custom: 'custom',
|
|
96
|
+
} as const;
|
|
97
|
+
export type ApplianceRuleKindEnum = typeof ApplianceRuleKindEnum[keyof typeof ApplianceRuleKindEnum];
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Check if a given object implements the ApplianceRule interface.
|
|
102
|
+
*/
|
|
103
|
+
export function instanceOfApplianceRule(value: object): value is ApplianceRule {
|
|
104
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
105
|
+
if (!('vendor' in value) || value['vendor'] === undefined) return false;
|
|
106
|
+
if (!('category' in value) || value['category'] === undefined) return false;
|
|
107
|
+
if (!('osv_verdict' in value) || value['osv_verdict'] === undefined) return false;
|
|
108
|
+
if (!('max_confidence' in value) || value['max_confidence'] === undefined) return false;
|
|
109
|
+
if (!('kind' in value) || value['kind'] === undefined) return false;
|
|
110
|
+
if (!('min_matched' in value) || value['min_matched'] === undefined) return false;
|
|
111
|
+
if (!('conditions' in value) || value['conditions'] === undefined) return false;
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function ApplianceRuleFromJSON(json: any): ApplianceRule {
|
|
116
|
+
return ApplianceRuleFromJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function ApplianceRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRule {
|
|
120
|
+
if (json == null) {
|
|
121
|
+
return json;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
|
|
125
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
126
|
+
'name': json['name'],
|
|
127
|
+
'vendor': json['vendor'],
|
|
128
|
+
'category': json['category'],
|
|
129
|
+
'osv_verdict': json['osv_verdict'],
|
|
130
|
+
'max_confidence': json['max_confidence'],
|
|
131
|
+
'kind': json['kind'],
|
|
132
|
+
'min_matched': json['min_matched'],
|
|
133
|
+
'conditions': ((json['conditions'] as Array<any>).map(ApplianceRuleConditionFromJSON)),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function ApplianceRuleToJSON(json: any): ApplianceRule {
|
|
138
|
+
return ApplianceRuleToJSONTyped(json, false);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function ApplianceRuleToJSONTyped(value?: ApplianceRule | null, ignoreDiscriminator: boolean = false): any {
|
|
142
|
+
if (value == null) {
|
|
143
|
+
return value;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
|
|
148
|
+
'id': value['id'],
|
|
149
|
+
'name': value['name'],
|
|
150
|
+
'vendor': value['vendor'],
|
|
151
|
+
'category': value['category'],
|
|
152
|
+
'osv_verdict': value['osv_verdict'],
|
|
153
|
+
'max_confidence': value['max_confidence'],
|
|
154
|
+
'kind': value['kind'],
|
|
155
|
+
'min_matched': value['min_matched'],
|
|
156
|
+
'conditions': ((value['conditions'] as Array<any>).map(ApplianceRuleConditionToJSON)),
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
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: v2
|
|
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 { ApplianceRuleFunction } from './ApplianceRuleFunction.js';
|
|
17
|
+
import {
|
|
18
|
+
ApplianceRuleFunctionFromJSON,
|
|
19
|
+
ApplianceRuleFunctionFromJSONTyped,
|
|
20
|
+
ApplianceRuleFunctionToJSON,
|
|
21
|
+
ApplianceRuleFunctionToJSONTyped,
|
|
22
|
+
} from './ApplianceRuleFunction.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* One condition. Either a filter expression over VM attributes or a call to a registered predicate function carrying its own payload. Exactly one of expression or function must be set. Condition names must be unique within a rule, and min_matched may not exceed the number of conditions.
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface ApplianceRuleCondition
|
|
29
|
+
*/
|
|
30
|
+
export interface ApplianceRuleCondition {
|
|
31
|
+
/**
|
|
32
|
+
* Condition name, unique within the rule. The name decides how much a match contributes: vapp_product and annotation weigh high, guest_id and mount_preffix medium, nic_count, disk_geometry and nested_hv low, and name weighs so little that matching it alone is not a detection. Any other name is rejected.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Filter DSL expression over the VM attributes appliance rules can match on, e.g. Name ~ /^ORA-/ or NICCount > 3.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
expression?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
_function?: ApplianceRuleFunction;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Check if a given object implements the ApplianceRuleCondition interface.
|
|
49
|
+
*/
|
|
50
|
+
export function instanceOfApplianceRuleCondition(value: object): value is ApplianceRuleCondition {
|
|
51
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ApplianceRuleConditionFromJSON(json: any): ApplianceRuleCondition {
|
|
56
|
+
return ApplianceRuleConditionFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ApplianceRuleConditionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRuleCondition {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
|
|
65
|
+
'name': json['name'],
|
|
66
|
+
'expression': json['expression'] == null ? undefined : json['expression'],
|
|
67
|
+
'_function': json['function'] == null ? undefined : ApplianceRuleFunctionFromJSON(json['function']),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ApplianceRuleConditionToJSON(json: any): ApplianceRuleCondition {
|
|
72
|
+
return ApplianceRuleConditionToJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ApplianceRuleConditionToJSONTyped(value?: ApplianceRuleCondition | null, ignoreDiscriminator: boolean = false): any {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'name': value['name'],
|
|
83
|
+
'expression': value['expression'],
|
|
84
|
+
'function': ApplianceRuleFunctionToJSON(value['_function']),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
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: v2
|
|
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 { DiskGeometryCondition } from './DiskGeometryCondition.js';
|
|
17
|
+
import {
|
|
18
|
+
DiskGeometryConditionFromJSON,
|
|
19
|
+
DiskGeometryConditionFromJSONTyped,
|
|
20
|
+
DiskGeometryConditionToJSON,
|
|
21
|
+
DiskGeometryConditionToJSONTyped,
|
|
22
|
+
} from './DiskGeometryCondition.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A registered predicate selected by name. Exactly one payload field, the one matching name, must be set; the payload is validated server-side against the predicate the name resolves to.
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface ApplianceRuleFunction
|
|
29
|
+
*/
|
|
30
|
+
export interface ApplianceRuleFunction {
|
|
31
|
+
/**
|
|
32
|
+
* Predicate name. disk_geometry is the only one defined; any other name is rejected.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
disk_geometry?: DiskGeometryCondition;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ApplianceRuleFunction interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfApplianceRuleFunction(value: object): value is ApplianceRuleFunction {
|
|
46
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ApplianceRuleFunctionFromJSON(json: any): ApplianceRuleFunction {
|
|
51
|
+
return ApplianceRuleFunctionFromJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ApplianceRuleFunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRuleFunction {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'name': json['name'],
|
|
61
|
+
'disk_geometry': json['disk_geometry'] == null ? undefined : DiskGeometryConditionFromJSON(json['disk_geometry']),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ApplianceRuleFunctionToJSON(json: any): ApplianceRuleFunction {
|
|
66
|
+
return ApplianceRuleFunctionToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ApplianceRuleFunctionToJSONTyped(value?: ApplianceRuleFunction | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'name': value['name'],
|
|
77
|
+
'disk_geometry': DiskGeometryConditionToJSON(value['disk_geometry']),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
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: v2
|
|
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 { ApplianceRule } from './ApplianceRule.js';
|
|
17
|
+
import {
|
|
18
|
+
ApplianceRuleFromJSON,
|
|
19
|
+
ApplianceRuleFromJSONTyped,
|
|
20
|
+
ApplianceRuleToJSON,
|
|
21
|
+
ApplianceRuleToJSONTyped,
|
|
22
|
+
} from './ApplianceRule.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ApplianceRuleListResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface ApplianceRuleListResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
rules: Array<ApplianceRule>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the ApplianceRuleListResponse interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfApplianceRuleListResponse(value: object): value is ApplianceRuleListResponse {
|
|
40
|
+
if (!('rules' in value) || value['rules'] === undefined) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ApplianceRuleListResponseFromJSON(json: any): ApplianceRuleListResponse {
|
|
45
|
+
return ApplianceRuleListResponseFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ApplianceRuleListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRuleListResponse {
|
|
49
|
+
if (json == null) {
|
|
50
|
+
return json;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
|
|
54
|
+
'rules': ((json['rules'] as Array<any>).map(ApplianceRuleFromJSON)),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function ApplianceRuleListResponseToJSON(json: any): ApplianceRuleListResponse {
|
|
59
|
+
return ApplianceRuleListResponseToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ApplianceRuleListResponseToJSONTyped(value?: ApplianceRuleListResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'rules': ((value['rules'] as Array<any>).map(ApplianceRuleToJSON)),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|