@openshift-migration-advisor/agent-sdk 0.33.1-d63d5073ca08 → 0.33.1-e1c90d7b1b79
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 +14 -0
- package/README.md +14 -2
- package/dist/apis/AppliancesApi.d.ts +194 -0
- package/dist/apis/AppliancesApi.js +201 -0
- package/dist/esm/apis/AppliancesApi.d.ts +194 -0
- package/dist/esm/apis/AppliancesApi.js +201 -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/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/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 +7 -0
- package/dist/esm/models/index.js +7 -0
- 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/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/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 +7 -0
- package/dist/models/index.js +7 -0
- 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/Datastore.md +4 -0
- package/docs/DiskGeometryCondition.md +38 -0
- package/docs/StorageArray.md +41 -0
- package/docs/VirtualMachineDatastore.md +4 -0
- package/package.json +1 -1
- package/src/apis/AppliancesApi.ts +393 -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/Datastore.ts +19 -0
- package/src/models/DiskGeometryCondition.ts +90 -0
- package/src/models/StorageArray.ts +81 -0
- package/src/models/VirtualMachineDatastore.ts +20 -0
- package/src/models/index.ts +7 -0
|
@@ -11,12 +11,43 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
13
|
import { type ApplianceListResponse } from '../models/ApplianceListResponse.js';
|
|
14
|
+
import { type ApplianceRule } from '../models/ApplianceRule.js';
|
|
15
|
+
import { type ApplianceRuleListResponse } from '../models/ApplianceRuleListResponse.js';
|
|
16
|
+
import { type ApplianceRuleRequest } from '../models/ApplianceRuleRequest.js';
|
|
17
|
+
export interface CreateApplianceRuleRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
applianceRuleRequest: ApplianceRuleRequest;
|
|
22
|
+
}
|
|
23
|
+
export interface DeleteApplianceRuleRequest {
|
|
24
|
+
/**
|
|
25
|
+
* Rule ID
|
|
26
|
+
*/
|
|
27
|
+
ruleId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface GetApplianceRuleRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Rule ID
|
|
32
|
+
*/
|
|
33
|
+
ruleId: string;
|
|
34
|
+
}
|
|
14
35
|
export interface ListAppliancesRequest {
|
|
15
36
|
/**
|
|
16
37
|
* Collection ID
|
|
17
38
|
*/
|
|
18
39
|
id: string;
|
|
19
40
|
}
|
|
41
|
+
export interface UpdateApplianceRuleRequest {
|
|
42
|
+
/**
|
|
43
|
+
* Rule ID
|
|
44
|
+
*/
|
|
45
|
+
ruleId: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
applianceRuleRequest: ApplianceRuleRequest;
|
|
50
|
+
}
|
|
20
51
|
/**
|
|
21
52
|
* AppliancesApi - interface
|
|
22
53
|
*
|
|
@@ -24,6 +55,84 @@ export interface ListAppliancesRequest {
|
|
|
24
55
|
* @interface AppliancesApiInterface
|
|
25
56
|
*/
|
|
26
57
|
export interface AppliancesApiInterface {
|
|
58
|
+
/**
|
|
59
|
+
* Creates request options for createApplianceRule without sending the request
|
|
60
|
+
* @param {ApplianceRuleRequest} applianceRuleRequest
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof AppliancesApiInterface
|
|
63
|
+
*/
|
|
64
|
+
createApplianceRuleRequestOpts(requestParameters: CreateApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @summary Create an appliance rule
|
|
68
|
+
* @param {ApplianceRuleRequest} applianceRuleRequest
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof AppliancesApiInterface
|
|
72
|
+
*/
|
|
73
|
+
createApplianceRuleRaw(requestParameters: CreateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRule>>;
|
|
74
|
+
/**
|
|
75
|
+
* Create an appliance rule
|
|
76
|
+
*/
|
|
77
|
+
createApplianceRule(requestParameters: CreateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRule>;
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for deleteApplianceRule without sending the request
|
|
80
|
+
* @param {string} ruleId Rule ID
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
* @memberof AppliancesApiInterface
|
|
83
|
+
*/
|
|
84
|
+
deleteApplianceRuleRequestOpts(requestParameters: DeleteApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @summary Delete an appliance rule
|
|
88
|
+
* @param {string} ruleId Rule ID
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
* @memberof AppliancesApiInterface
|
|
92
|
+
*/
|
|
93
|
+
deleteApplianceRuleRaw(requestParameters: DeleteApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
94
|
+
/**
|
|
95
|
+
* Delete an appliance rule
|
|
96
|
+
*/
|
|
97
|
+
deleteApplianceRule(requestParameters: DeleteApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Creates request options for getApplianceRule without sending the request
|
|
100
|
+
* @param {string} ruleId Rule ID
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
* @memberof AppliancesApiInterface
|
|
103
|
+
*/
|
|
104
|
+
getApplianceRuleRequestOpts(requestParameters: GetApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @summary Get an appliance rule
|
|
108
|
+
* @param {string} ruleId Rule ID
|
|
109
|
+
* @param {*} [options] Override http request option.
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
* @memberof AppliancesApiInterface
|
|
112
|
+
*/
|
|
113
|
+
getApplianceRuleRaw(requestParameters: GetApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRule>>;
|
|
114
|
+
/**
|
|
115
|
+
* Get an appliance rule
|
|
116
|
+
*/
|
|
117
|
+
getApplianceRule(requestParameters: GetApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRule>;
|
|
118
|
+
/**
|
|
119
|
+
* Creates request options for listApplianceRules without sending the request
|
|
120
|
+
* @throws {RequiredError}
|
|
121
|
+
* @memberof AppliancesApiInterface
|
|
122
|
+
*/
|
|
123
|
+
listApplianceRulesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @summary List appliance rules
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
* @memberof AppliancesApiInterface
|
|
130
|
+
*/
|
|
131
|
+
listApplianceRulesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRuleListResponse>>;
|
|
132
|
+
/**
|
|
133
|
+
* List appliance rules
|
|
134
|
+
*/
|
|
135
|
+
listApplianceRules(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRuleListResponse>;
|
|
27
136
|
/**
|
|
28
137
|
* Creates request options for listAppliances without sending the request
|
|
29
138
|
* @param {string} id Collection ID
|
|
@@ -44,11 +153,82 @@ export interface AppliancesApiInterface {
|
|
|
44
153
|
* List detected appliances in a collection
|
|
45
154
|
*/
|
|
46
155
|
listAppliances(requestParameters: ListAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceListResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for updateApplianceRule without sending the request
|
|
158
|
+
* @param {string} ruleId Rule ID
|
|
159
|
+
* @param {ApplianceRuleRequest} applianceRuleRequest
|
|
160
|
+
* @throws {RequiredError}
|
|
161
|
+
* @memberof AppliancesApiInterface
|
|
162
|
+
*/
|
|
163
|
+
updateApplianceRuleRequestOpts(requestParameters: UpdateApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
164
|
+
/**
|
|
165
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
166
|
+
* @summary Replace an appliance rule
|
|
167
|
+
* @param {string} ruleId Rule ID
|
|
168
|
+
* @param {ApplianceRuleRequest} applianceRuleRequest
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
* @memberof AppliancesApiInterface
|
|
172
|
+
*/
|
|
173
|
+
updateApplianceRuleRaw(requestParameters: UpdateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRule>>;
|
|
174
|
+
/**
|
|
175
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
176
|
+
* Replace an appliance rule
|
|
177
|
+
*/
|
|
178
|
+
updateApplianceRule(requestParameters: UpdateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRule>;
|
|
47
179
|
}
|
|
48
180
|
/**
|
|
49
181
|
*
|
|
50
182
|
*/
|
|
51
183
|
export declare class AppliancesApi extends runtime.BaseAPI implements AppliancesApiInterface {
|
|
184
|
+
/**
|
|
185
|
+
* Creates request options for createApplianceRule without sending the request
|
|
186
|
+
*/
|
|
187
|
+
createApplianceRuleRequestOpts(requestParameters: CreateApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
188
|
+
/**
|
|
189
|
+
* Create an appliance rule
|
|
190
|
+
*/
|
|
191
|
+
createApplianceRuleRaw(requestParameters: CreateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRule>>;
|
|
192
|
+
/**
|
|
193
|
+
* Create an appliance rule
|
|
194
|
+
*/
|
|
195
|
+
createApplianceRule(requestParameters: CreateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRule>;
|
|
196
|
+
/**
|
|
197
|
+
* Creates request options for deleteApplianceRule without sending the request
|
|
198
|
+
*/
|
|
199
|
+
deleteApplianceRuleRequestOpts(requestParameters: DeleteApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
200
|
+
/**
|
|
201
|
+
* Delete an appliance rule
|
|
202
|
+
*/
|
|
203
|
+
deleteApplianceRuleRaw(requestParameters: DeleteApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
204
|
+
/**
|
|
205
|
+
* Delete an appliance rule
|
|
206
|
+
*/
|
|
207
|
+
deleteApplianceRule(requestParameters: DeleteApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
208
|
+
/**
|
|
209
|
+
* Creates request options for getApplianceRule without sending the request
|
|
210
|
+
*/
|
|
211
|
+
getApplianceRuleRequestOpts(requestParameters: GetApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
212
|
+
/**
|
|
213
|
+
* Get an appliance rule
|
|
214
|
+
*/
|
|
215
|
+
getApplianceRuleRaw(requestParameters: GetApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRule>>;
|
|
216
|
+
/**
|
|
217
|
+
* Get an appliance rule
|
|
218
|
+
*/
|
|
219
|
+
getApplianceRule(requestParameters: GetApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRule>;
|
|
220
|
+
/**
|
|
221
|
+
* Creates request options for listApplianceRules without sending the request
|
|
222
|
+
*/
|
|
223
|
+
listApplianceRulesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
224
|
+
/**
|
|
225
|
+
* List appliance rules
|
|
226
|
+
*/
|
|
227
|
+
listApplianceRulesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRuleListResponse>>;
|
|
228
|
+
/**
|
|
229
|
+
* List appliance rules
|
|
230
|
+
*/
|
|
231
|
+
listApplianceRules(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRuleListResponse>;
|
|
52
232
|
/**
|
|
53
233
|
* Creates request options for listAppliances without sending the request
|
|
54
234
|
*/
|
|
@@ -61,4 +241,18 @@ export declare class AppliancesApi extends runtime.BaseAPI implements Appliances
|
|
|
61
241
|
* List detected appliances in a collection
|
|
62
242
|
*/
|
|
63
243
|
listAppliances(requestParameters: ListAppliancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceListResponse>;
|
|
244
|
+
/**
|
|
245
|
+
* Creates request options for updateApplianceRule without sending the request
|
|
246
|
+
*/
|
|
247
|
+
updateApplianceRuleRequestOpts(requestParameters: UpdateApplianceRuleRequest): Promise<runtime.RequestOpts>;
|
|
248
|
+
/**
|
|
249
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
250
|
+
* Replace an appliance rule
|
|
251
|
+
*/
|
|
252
|
+
updateApplianceRuleRaw(requestParameters: UpdateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApplianceRule>>;
|
|
253
|
+
/**
|
|
254
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
255
|
+
* Replace an appliance rule
|
|
256
|
+
*/
|
|
257
|
+
updateApplianceRule(requestParameters: UpdateApplianceRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApplianceRule>;
|
|
64
258
|
}
|
|
@@ -22,10 +22,165 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime.js';
|
|
24
24
|
import { ApplianceListResponseFromJSON, } from '../models/ApplianceListResponse.js';
|
|
25
|
+
import { ApplianceRuleFromJSON, } from '../models/ApplianceRule.js';
|
|
26
|
+
import { ApplianceRuleListResponseFromJSON, } from '../models/ApplianceRuleListResponse.js';
|
|
27
|
+
import { ApplianceRuleRequestToJSON, } from '../models/ApplianceRuleRequest.js';
|
|
25
28
|
/**
|
|
26
29
|
*
|
|
27
30
|
*/
|
|
28
31
|
export class AppliancesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for createApplianceRule without sending the request
|
|
34
|
+
*/
|
|
35
|
+
createApplianceRuleRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['applianceRuleRequest'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('applianceRuleRequest', 'Required parameter "applianceRuleRequest" was null or undefined when calling createApplianceRule().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
let urlPath = `/appliances/rules`;
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
body: ApplianceRuleRequestToJSON(requestParameters['applianceRuleRequest']),
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create an appliance rule
|
|
55
|
+
*/
|
|
56
|
+
createApplianceRuleRaw(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = yield this.createApplianceRuleRequestOpts(requestParameters);
|
|
59
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleFromJSON(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Create an appliance rule
|
|
65
|
+
*/
|
|
66
|
+
createApplianceRule(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const response = yield this.createApplianceRuleRaw(requestParameters, initOverrides);
|
|
69
|
+
return yield response.value();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Creates request options for deleteApplianceRule without sending the request
|
|
74
|
+
*/
|
|
75
|
+
deleteApplianceRuleRequestOpts(requestParameters) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (requestParameters['ruleId'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('ruleId', 'Required parameter "ruleId" was null or undefined when calling deleteApplianceRule().');
|
|
79
|
+
}
|
|
80
|
+
const queryParameters = {};
|
|
81
|
+
const headerParameters = {};
|
|
82
|
+
let urlPath = `/appliances/rules/{ruleId}`;
|
|
83
|
+
urlPath = urlPath.replace('{ruleId}', encodeURIComponent(String(requestParameters['ruleId'])));
|
|
84
|
+
return {
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'DELETE',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Delete an appliance rule
|
|
94
|
+
*/
|
|
95
|
+
deleteApplianceRuleRaw(requestParameters, initOverrides) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const requestOptions = yield this.deleteApplianceRuleRequestOpts(requestParameters);
|
|
98
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
99
|
+
return new runtime.VoidApiResponse(response);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Delete an appliance rule
|
|
104
|
+
*/
|
|
105
|
+
deleteApplianceRule(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
yield this.deleteApplianceRuleRaw(requestParameters, initOverrides);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates request options for getApplianceRule without sending the request
|
|
112
|
+
*/
|
|
113
|
+
getApplianceRuleRequestOpts(requestParameters) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
if (requestParameters['ruleId'] == null) {
|
|
116
|
+
throw new runtime.RequiredError('ruleId', 'Required parameter "ruleId" was null or undefined when calling getApplianceRule().');
|
|
117
|
+
}
|
|
118
|
+
const queryParameters = {};
|
|
119
|
+
const headerParameters = {};
|
|
120
|
+
let urlPath = `/appliances/rules/{ruleId}`;
|
|
121
|
+
urlPath = urlPath.replace('{ruleId}', encodeURIComponent(String(requestParameters['ruleId'])));
|
|
122
|
+
return {
|
|
123
|
+
path: urlPath,
|
|
124
|
+
method: 'GET',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get an appliance rule
|
|
132
|
+
*/
|
|
133
|
+
getApplianceRuleRaw(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const requestOptions = yield this.getApplianceRuleRequestOpts(requestParameters);
|
|
136
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleFromJSON(jsonValue));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get an appliance rule
|
|
142
|
+
*/
|
|
143
|
+
getApplianceRule(requestParameters, initOverrides) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
const response = yield this.getApplianceRuleRaw(requestParameters, initOverrides);
|
|
146
|
+
return yield response.value();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Creates request options for listApplianceRules without sending the request
|
|
151
|
+
*/
|
|
152
|
+
listApplianceRulesRequestOpts() {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
const queryParameters = {};
|
|
155
|
+
const headerParameters = {};
|
|
156
|
+
let urlPath = `/appliances/rules`;
|
|
157
|
+
return {
|
|
158
|
+
path: urlPath,
|
|
159
|
+
method: 'GET',
|
|
160
|
+
headers: headerParameters,
|
|
161
|
+
query: queryParameters,
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* List appliance rules
|
|
167
|
+
*/
|
|
168
|
+
listApplianceRulesRaw(initOverrides) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const requestOptions = yield this.listApplianceRulesRequestOpts();
|
|
171
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleListResponseFromJSON(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* List appliance rules
|
|
177
|
+
*/
|
|
178
|
+
listApplianceRules(initOverrides) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
const response = yield this.listApplianceRulesRaw(initOverrides);
|
|
181
|
+
return yield response.value();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
29
184
|
/**
|
|
30
185
|
* Creates request options for listAppliances without sending the request
|
|
31
186
|
*/
|
|
@@ -65,4 +220,50 @@ export class AppliancesApi extends runtime.BaseAPI {
|
|
|
65
220
|
return yield response.value();
|
|
66
221
|
});
|
|
67
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Creates request options for updateApplianceRule without sending the request
|
|
225
|
+
*/
|
|
226
|
+
updateApplianceRuleRequestOpts(requestParameters) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
if (requestParameters['ruleId'] == null) {
|
|
229
|
+
throw new runtime.RequiredError('ruleId', 'Required parameter "ruleId" was null or undefined when calling updateApplianceRule().');
|
|
230
|
+
}
|
|
231
|
+
if (requestParameters['applianceRuleRequest'] == null) {
|
|
232
|
+
throw new runtime.RequiredError('applianceRuleRequest', 'Required parameter "applianceRuleRequest" was null or undefined when calling updateApplianceRule().');
|
|
233
|
+
}
|
|
234
|
+
const queryParameters = {};
|
|
235
|
+
const headerParameters = {};
|
|
236
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
237
|
+
let urlPath = `/appliances/rules/{ruleId}`;
|
|
238
|
+
urlPath = urlPath.replace('{ruleId}', encodeURIComponent(String(requestParameters['ruleId'])));
|
|
239
|
+
return {
|
|
240
|
+
path: urlPath,
|
|
241
|
+
method: 'PUT',
|
|
242
|
+
headers: headerParameters,
|
|
243
|
+
query: queryParameters,
|
|
244
|
+
body: ApplianceRuleRequestToJSON(requestParameters['applianceRuleRequest']),
|
|
245
|
+
};
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
250
|
+
* Replace an appliance rule
|
|
251
|
+
*/
|
|
252
|
+
updateApplianceRuleRaw(requestParameters, initOverrides) {
|
|
253
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
const requestOptions = yield this.updateApplianceRuleRequestOpts(requestParameters);
|
|
255
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
256
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ApplianceRuleFromJSON(jsonValue));
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Full replacement of the rule with this id, including its conditions. When no rule has this id a new rule is created and the response carries the server assigned id, which differs from the id in the path.
|
|
261
|
+
* Replace an appliance rule
|
|
262
|
+
*/
|
|
263
|
+
updateApplianceRule(requestParameters, initOverrides) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
const response = yield this.updateApplianceRuleRaw(requestParameters, initOverrides);
|
|
266
|
+
return yield response.value();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
68
269
|
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assisted Migration Agent API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v2
|
|
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
|
+
import type { ApplianceRuleCondition } from './ApplianceRuleCondition.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ApplianceRule
|
|
17
|
+
*/
|
|
18
|
+
export interface ApplianceRule {
|
|
19
|
+
/**
|
|
20
|
+
* Rule ID
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Appliance product name
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* Appliance vendor
|
|
29
|
+
*/
|
|
30
|
+
vendor: string;
|
|
31
|
+
/**
|
|
32
|
+
* Appliance category
|
|
33
|
+
*/
|
|
34
|
+
category: string;
|
|
35
|
+
/**
|
|
36
|
+
* OSV migration verdict
|
|
37
|
+
*/
|
|
38
|
+
osv_verdict: ApplianceRuleOsvVerdictEnum;
|
|
39
|
+
/**
|
|
40
|
+
* Confidence ceiling for this rule
|
|
41
|
+
*/
|
|
42
|
+
max_confidence: ApplianceRuleMaxConfidenceEnum;
|
|
43
|
+
/**
|
|
44
|
+
* Kind of rules either default or custom
|
|
45
|
+
*/
|
|
46
|
+
kind: ApplianceRuleKindEnum;
|
|
47
|
+
/**
|
|
48
|
+
* Number of conditions that must match before the rule fires
|
|
49
|
+
*/
|
|
50
|
+
min_matched: number;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
conditions: Array<ApplianceRuleCondition>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @export
|
|
58
|
+
*/
|
|
59
|
+
export declare const ApplianceRuleOsvVerdictEnum: {
|
|
60
|
+
readonly Blocked: "blocked";
|
|
61
|
+
readonly Conditional: "conditional";
|
|
62
|
+
readonly Supported: "supported";
|
|
63
|
+
readonly Unknown: "unknown";
|
|
64
|
+
};
|
|
65
|
+
export type ApplianceRuleOsvVerdictEnum = typeof ApplianceRuleOsvVerdictEnum[keyof typeof ApplianceRuleOsvVerdictEnum];
|
|
66
|
+
/**
|
|
67
|
+
* @export
|
|
68
|
+
*/
|
|
69
|
+
export declare const ApplianceRuleMaxConfidenceEnum: {
|
|
70
|
+
readonly High: "high";
|
|
71
|
+
readonly Medium: "medium";
|
|
72
|
+
readonly Low: "low";
|
|
73
|
+
};
|
|
74
|
+
export type ApplianceRuleMaxConfidenceEnum = typeof ApplianceRuleMaxConfidenceEnum[keyof typeof ApplianceRuleMaxConfidenceEnum];
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export declare const ApplianceRuleKindEnum: {
|
|
79
|
+
readonly Default: "default";
|
|
80
|
+
readonly Custom: "custom";
|
|
81
|
+
};
|
|
82
|
+
export type ApplianceRuleKindEnum = typeof ApplianceRuleKindEnum[keyof typeof ApplianceRuleKindEnum];
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the ApplianceRule interface.
|
|
85
|
+
*/
|
|
86
|
+
export declare function instanceOfApplianceRule(value: object): value is ApplianceRule;
|
|
87
|
+
export declare function ApplianceRuleFromJSON(json: any): ApplianceRule;
|
|
88
|
+
export declare function ApplianceRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRule;
|
|
89
|
+
export declare function ApplianceRuleToJSON(json: any): ApplianceRule;
|
|
90
|
+
export declare function ApplianceRuleToJSONTyped(value?: ApplianceRule | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
import { ApplianceRuleConditionFromJSON, ApplianceRuleConditionToJSON, } from './ApplianceRuleCondition.js';
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const ApplianceRuleOsvVerdictEnum = {
|
|
19
|
+
Blocked: 'blocked',
|
|
20
|
+
Conditional: 'conditional',
|
|
21
|
+
Supported: 'supported',
|
|
22
|
+
Unknown: 'unknown',
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const ApplianceRuleMaxConfidenceEnum = {
|
|
28
|
+
High: 'high',
|
|
29
|
+
Medium: 'medium',
|
|
30
|
+
Low: 'low',
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const ApplianceRuleKindEnum = {
|
|
36
|
+
Default: 'default',
|
|
37
|
+
Custom: 'custom',
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the ApplianceRule interface.
|
|
41
|
+
*/
|
|
42
|
+
export function instanceOfApplianceRule(value) {
|
|
43
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('vendor' in value) || value['vendor'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('category' in value) || value['category'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('osv_verdict' in value) || value['osv_verdict'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('max_confidence' in value) || value['max_confidence'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
if (!('kind' in value) || value['kind'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
if (!('min_matched' in value) || value['min_matched'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('conditions' in value) || value['conditions'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
export function ApplianceRuleFromJSON(json) {
|
|
62
|
+
return ApplianceRuleFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
export function ApplianceRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
70
|
+
'name': json['name'],
|
|
71
|
+
'vendor': json['vendor'],
|
|
72
|
+
'category': json['category'],
|
|
73
|
+
'osv_verdict': json['osv_verdict'],
|
|
74
|
+
'max_confidence': json['max_confidence'],
|
|
75
|
+
'kind': json['kind'],
|
|
76
|
+
'min_matched': json['min_matched'],
|
|
77
|
+
'conditions': (json['conditions'].map(ApplianceRuleConditionFromJSON)),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export function ApplianceRuleToJSON(json) {
|
|
81
|
+
return ApplianceRuleToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
export function ApplianceRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
'id': value['id'],
|
|
89
|
+
'name': value['name'],
|
|
90
|
+
'vendor': value['vendor'],
|
|
91
|
+
'category': value['category'],
|
|
92
|
+
'osv_verdict': value['osv_verdict'],
|
|
93
|
+
'max_confidence': value['max_confidence'],
|
|
94
|
+
'kind': value['kind'],
|
|
95
|
+
'min_matched': value['min_matched'],
|
|
96
|
+
'conditions': (value['conditions'].map(ApplianceRuleConditionToJSON)),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assisted Migration Agent API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v2
|
|
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
|
+
import type { ApplianceRuleFunction } from './ApplianceRuleFunction.js';
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ApplianceRuleCondition
|
|
18
|
+
*/
|
|
19
|
+
export interface ApplianceRuleCondition {
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Filter DSL expression over the VM attributes appliance rules can match on, e.g. Name ~ /^ORA-/ or NICCount > 3.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
expression?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
_function?: ApplianceRuleFunction;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the ApplianceRuleCondition interface.
|
|
37
|
+
*/
|
|
38
|
+
export declare function instanceOfApplianceRuleCondition(value: object): value is ApplianceRuleCondition;
|
|
39
|
+
export declare function ApplianceRuleConditionFromJSON(json: any): ApplianceRuleCondition;
|
|
40
|
+
export declare function ApplianceRuleConditionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplianceRuleCondition;
|
|
41
|
+
export declare function ApplianceRuleConditionToJSON(json: any): ApplianceRuleCondition;
|
|
42
|
+
export declare function ApplianceRuleConditionToJSONTyped(value?: ApplianceRuleCondition | null, ignoreDiscriminator?: boolean): any;
|