@openshift-migration-advisor/agent-sdk 0.8.0-89b5466bbbac → 0.8.0-adc7901d9658
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 +7 -8
- package/dist/apis/DefaultApi.d.ts +0 -35
- package/dist/apis/DefaultApi.js +0 -39
- package/dist/esm/apis/DefaultApi.d.ts +0 -35
- package/dist/esm/apis/DefaultApi.js +0 -39
- package/docs/DefaultApi.md +0 -70
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +0 -72
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @openshift-migration-advisor/agent-sdk@0.8.0-
|
|
1
|
+
# @openshift-migration-advisor/agent-sdk@0.8.0-adc7901d9658
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the raw.githubusercontent.com API.
|
|
4
4
|
|
|
@@ -18,19 +18,19 @@ import {
|
|
|
18
18
|
Configuration,
|
|
19
19
|
DefaultApi,
|
|
20
20
|
} from '@openshift-migration-advisor/agent-sdk';
|
|
21
|
-
import type {
|
|
21
|
+
import type { CreateGroupOperationRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
22
22
|
|
|
23
23
|
async function example() {
|
|
24
24
|
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
25
25
|
const api = new DefaultApi();
|
|
26
26
|
|
|
27
27
|
const body = {
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
} satisfies
|
|
28
|
+
// CreateGroupRequest
|
|
29
|
+
createGroupRequest: ...,
|
|
30
|
+
} satisfies CreateGroupOperationRequest;
|
|
31
31
|
|
|
32
32
|
try {
|
|
33
|
-
const data = await api.
|
|
33
|
+
const data = await api.createGroup(body);
|
|
34
34
|
console.log(data);
|
|
35
35
|
} catch (error) {
|
|
36
36
|
console.error(error);
|
|
@@ -50,7 +50,6 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
50
50
|
|
|
51
51
|
| Class | Method | HTTP request | Description
|
|
52
52
|
| ----- | ------ | ------------ | -------------
|
|
53
|
-
*DefaultApi* | [**addVMToInspection**](docs/DefaultApi.md#addvmtoinspection) | **POST** /vms/{id}/inspection | Add VirtualMachine to inspection queue
|
|
54
53
|
*DefaultApi* | [**createGroup**](docs/DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group
|
|
55
54
|
*DefaultApi* | [**deleteGroup**](docs/DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group
|
|
56
55
|
*DefaultApi* | [**getAgentStatus**](docs/DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status
|
|
@@ -130,7 +129,7 @@ and is automatically generated by the
|
|
|
130
129
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
131
130
|
|
|
132
131
|
- API version: `v1`
|
|
133
|
-
- Package version: `0.8.0-
|
|
132
|
+
- Package version: `0.8.0-adc7901d9658`
|
|
134
133
|
- Generator version: `7.22.0-SNAPSHOT`
|
|
135
134
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
136
135
|
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
13
|
import type { AgentModeRequest, AgentStatus, CollectorStartRequest, CollectorStatus, CreateGroupRequest, GetInventory200Response, Group, GroupListResponse, GroupResponse, InspectorStatus, StartInspectionRequest, UpdateGroupRequest, VcenterCredentials, VddkProperties, VersionInfo, VirtualMachineDetail, VirtualMachineListResponse, VmInspectionStatus } from '../models/index.js';
|
|
14
|
-
export interface AddVMToInspectionRequest {
|
|
15
|
-
id: string;
|
|
16
|
-
}
|
|
17
14
|
export interface CreateGroupOperationRequest {
|
|
18
15
|
createGroupRequest: CreateGroupRequest;
|
|
19
16
|
}
|
|
@@ -77,26 +74,6 @@ export interface UpdateGroupOperationRequest {
|
|
|
77
74
|
* @interface DefaultApiInterface
|
|
78
75
|
*/
|
|
79
76
|
export interface DefaultApiInterface {
|
|
80
|
-
/**
|
|
81
|
-
* Creates request options for addVMToInspection without sending the request
|
|
82
|
-
* @param {string} id
|
|
83
|
-
* @throws {RequiredError}
|
|
84
|
-
* @memberof DefaultApiInterface
|
|
85
|
-
*/
|
|
86
|
-
addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* @summary Add VirtualMachine to inspection queue
|
|
90
|
-
* @param {string} id
|
|
91
|
-
* @param {*} [options] Override http request option.
|
|
92
|
-
* @throws {RequiredError}
|
|
93
|
-
* @memberof DefaultApiInterface
|
|
94
|
-
*/
|
|
95
|
-
addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
|
|
96
|
-
/**
|
|
97
|
-
* Add VirtualMachine to inspection queue
|
|
98
|
-
*/
|
|
99
|
-
addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
|
|
100
77
|
/**
|
|
101
78
|
* Creates request options for createGroup without sending the request
|
|
102
79
|
* @param {CreateGroupRequest} createGroupRequest
|
|
@@ -532,18 +509,6 @@ export interface DefaultApiInterface {
|
|
|
532
509
|
*
|
|
533
510
|
*/
|
|
534
511
|
export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
|
|
535
|
-
/**
|
|
536
|
-
* Creates request options for addVMToInspection without sending the request
|
|
537
|
-
*/
|
|
538
|
-
addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
|
|
539
|
-
/**
|
|
540
|
-
* Add VirtualMachine to inspection queue
|
|
541
|
-
*/
|
|
542
|
-
addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
|
|
543
|
-
/**
|
|
544
|
-
* Add VirtualMachine to inspection queue
|
|
545
|
-
*/
|
|
546
|
-
addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
|
|
547
512
|
/**
|
|
548
513
|
* Creates request options for createGroup without sending the request
|
|
549
514
|
*/
|
package/dist/apis/DefaultApi.js
CHANGED
|
@@ -29,45 +29,6 @@ const index_js_1 = require("../models/index.js");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class DefaultApi extends runtime.BaseAPI {
|
|
32
|
-
/**
|
|
33
|
-
* Creates request options for addVMToInspection without sending the request
|
|
34
|
-
*/
|
|
35
|
-
addVMToInspectionRequestOpts(requestParameters) {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
if (requestParameters['id'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addVMToInspection().');
|
|
39
|
-
}
|
|
40
|
-
const queryParameters = {};
|
|
41
|
-
const headerParameters = {};
|
|
42
|
-
let urlPath = `/vms/{id}/inspection`;
|
|
43
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
44
|
-
return {
|
|
45
|
-
path: urlPath,
|
|
46
|
-
method: 'POST',
|
|
47
|
-
headers: headerParameters,
|
|
48
|
-
query: queryParameters,
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Add VirtualMachine to inspection queue
|
|
54
|
-
*/
|
|
55
|
-
addVMToInspectionRaw(requestParameters, initOverrides) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const requestOptions = yield this.addVMToInspectionRequestOpts(requestParameters);
|
|
58
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
59
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.VmInspectionStatusFromJSON)(jsonValue));
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Add VirtualMachine to inspection queue
|
|
64
|
-
*/
|
|
65
|
-
addVMToInspection(requestParameters, initOverrides) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
const response = yield this.addVMToInspectionRaw(requestParameters, initOverrides);
|
|
68
|
-
return yield response.value();
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
32
|
/**
|
|
72
33
|
* Creates request options for createGroup without sending the request
|
|
73
34
|
*/
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
13
|
import type { AgentModeRequest, AgentStatus, CollectorStartRequest, CollectorStatus, CreateGroupRequest, GetInventory200Response, Group, GroupListResponse, GroupResponse, InspectorStatus, StartInspectionRequest, UpdateGroupRequest, VcenterCredentials, VddkProperties, VersionInfo, VirtualMachineDetail, VirtualMachineListResponse, VmInspectionStatus } from '../models/index.js';
|
|
14
|
-
export interface AddVMToInspectionRequest {
|
|
15
|
-
id: string;
|
|
16
|
-
}
|
|
17
14
|
export interface CreateGroupOperationRequest {
|
|
18
15
|
createGroupRequest: CreateGroupRequest;
|
|
19
16
|
}
|
|
@@ -77,26 +74,6 @@ export interface UpdateGroupOperationRequest {
|
|
|
77
74
|
* @interface DefaultApiInterface
|
|
78
75
|
*/
|
|
79
76
|
export interface DefaultApiInterface {
|
|
80
|
-
/**
|
|
81
|
-
* Creates request options for addVMToInspection without sending the request
|
|
82
|
-
* @param {string} id
|
|
83
|
-
* @throws {RequiredError}
|
|
84
|
-
* @memberof DefaultApiInterface
|
|
85
|
-
*/
|
|
86
|
-
addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* @summary Add VirtualMachine to inspection queue
|
|
90
|
-
* @param {string} id
|
|
91
|
-
* @param {*} [options] Override http request option.
|
|
92
|
-
* @throws {RequiredError}
|
|
93
|
-
* @memberof DefaultApiInterface
|
|
94
|
-
*/
|
|
95
|
-
addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
|
|
96
|
-
/**
|
|
97
|
-
* Add VirtualMachine to inspection queue
|
|
98
|
-
*/
|
|
99
|
-
addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
|
|
100
77
|
/**
|
|
101
78
|
* Creates request options for createGroup without sending the request
|
|
102
79
|
* @param {CreateGroupRequest} createGroupRequest
|
|
@@ -532,18 +509,6 @@ export interface DefaultApiInterface {
|
|
|
532
509
|
*
|
|
533
510
|
*/
|
|
534
511
|
export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
|
|
535
|
-
/**
|
|
536
|
-
* Creates request options for addVMToInspection without sending the request
|
|
537
|
-
*/
|
|
538
|
-
addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
|
|
539
|
-
/**
|
|
540
|
-
* Add VirtualMachine to inspection queue
|
|
541
|
-
*/
|
|
542
|
-
addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
|
|
543
|
-
/**
|
|
544
|
-
* Add VirtualMachine to inspection queue
|
|
545
|
-
*/
|
|
546
|
-
addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
|
|
547
512
|
/**
|
|
548
513
|
* Creates request options for createGroup without sending the request
|
|
549
514
|
*/
|
|
@@ -26,45 +26,6 @@ import { AgentModeRequestToJSON, AgentStatusFromJSON, CollectorStartRequestToJSO
|
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class DefaultApi extends runtime.BaseAPI {
|
|
29
|
-
/**
|
|
30
|
-
* Creates request options for addVMToInspection without sending the request
|
|
31
|
-
*/
|
|
32
|
-
addVMToInspectionRequestOpts(requestParameters) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (requestParameters['id'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addVMToInspection().');
|
|
36
|
-
}
|
|
37
|
-
const queryParameters = {};
|
|
38
|
-
const headerParameters = {};
|
|
39
|
-
let urlPath = `/vms/{id}/inspection`;
|
|
40
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
41
|
-
return {
|
|
42
|
-
path: urlPath,
|
|
43
|
-
method: 'POST',
|
|
44
|
-
headers: headerParameters,
|
|
45
|
-
query: queryParameters,
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Add VirtualMachine to inspection queue
|
|
51
|
-
*/
|
|
52
|
-
addVMToInspectionRaw(requestParameters, initOverrides) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const requestOptions = yield this.addVMToInspectionRequestOpts(requestParameters);
|
|
55
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
56
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Add VirtualMachine to inspection queue
|
|
61
|
-
*/
|
|
62
|
-
addVMToInspection(requestParameters, initOverrides) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const response = yield this.addVMToInspectionRaw(requestParameters, initOverrides);
|
|
65
|
-
return yield response.value();
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
29
|
/**
|
|
69
30
|
* Creates request options for createGroup without sending the request
|
|
70
31
|
*/
|
package/docs/DefaultApi.md
CHANGED
|
@@ -4,7 +4,6 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**addVMToInspection**](DefaultApi.md#addvmtoinspection) | **POST** /vms/{id}/inspection | Add VirtualMachine to inspection queue |
|
|
8
7
|
| [**createGroup**](DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group |
|
|
9
8
|
| [**deleteGroup**](DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group |
|
|
10
9
|
| [**getAgentStatus**](DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status |
|
|
@@ -29,75 +28,6 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
|
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
|
|
32
|
-
## addVMToInspection
|
|
33
|
-
|
|
34
|
-
> VmInspectionStatus addVMToInspection(id)
|
|
35
|
-
|
|
36
|
-
Add VirtualMachine to inspection queue
|
|
37
|
-
|
|
38
|
-
### Example
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import {
|
|
42
|
-
Configuration,
|
|
43
|
-
DefaultApi,
|
|
44
|
-
} from '@openshift-migration-advisor/agent-sdk';
|
|
45
|
-
import type { AddVMToInspectionRequest } from '@openshift-migration-advisor/agent-sdk';
|
|
46
|
-
|
|
47
|
-
async function example() {
|
|
48
|
-
console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
|
|
49
|
-
const api = new DefaultApi();
|
|
50
|
-
|
|
51
|
-
const body = {
|
|
52
|
-
// string
|
|
53
|
-
id: id_example,
|
|
54
|
-
} satisfies AddVMToInspectionRequest;
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
const data = await api.addVMToInspection(body);
|
|
58
|
-
console.log(data);
|
|
59
|
-
} catch (error) {
|
|
60
|
-
console.error(error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Run the test
|
|
65
|
-
example().catch(console.error);
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Parameters
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
| Name | Type | Description | Notes |
|
|
72
|
-
|------------- | ------------- | ------------- | -------------|
|
|
73
|
-
| **id** | `string` | | [Defaults to `undefined`] |
|
|
74
|
-
|
|
75
|
-
### Return type
|
|
76
|
-
|
|
77
|
-
[**VmInspectionStatus**](VmInspectionStatus.md)
|
|
78
|
-
|
|
79
|
-
### Authorization
|
|
80
|
-
|
|
81
|
-
No authorization required
|
|
82
|
-
|
|
83
|
-
### HTTP request headers
|
|
84
|
-
|
|
85
|
-
- **Content-Type**: Not defined
|
|
86
|
-
- **Accept**: `application/json`
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
### HTTP response details
|
|
90
|
-
| Status code | Description | Response headers |
|
|
91
|
-
|-------------|-------------|------------------|
|
|
92
|
-
| **202** | VM added to inspection queue | - |
|
|
93
|
-
| **400** | Inspector not running | - |
|
|
94
|
-
| **404** | VirtualMachine not found | - |
|
|
95
|
-
| **409** | VM already in inspection queue | - |
|
|
96
|
-
| **500** | Internal server error | - |
|
|
97
|
-
|
|
98
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
99
|
-
|
|
100
|
-
|
|
101
31
|
## createGroup
|
|
102
32
|
|
|
103
33
|
> Group createGroup(createGroupRequest)
|
package/package.json
CHANGED
package/src/apis/DefaultApi.ts
CHANGED
|
@@ -73,10 +73,6 @@ import {
|
|
|
73
73
|
VmInspectionStatusToJSON,
|
|
74
74
|
} from '../models/index.js';
|
|
75
75
|
|
|
76
|
-
export interface AddVMToInspectionRequest {
|
|
77
|
-
id: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
76
|
export interface CreateGroupOperationRequest {
|
|
81
77
|
createGroupRequest: CreateGroupRequest;
|
|
82
78
|
}
|
|
@@ -155,29 +151,6 @@ export interface UpdateGroupOperationRequest {
|
|
|
155
151
|
* @interface DefaultApiInterface
|
|
156
152
|
*/
|
|
157
153
|
export interface DefaultApiInterface {
|
|
158
|
-
/**
|
|
159
|
-
* Creates request options for addVMToInspection without sending the request
|
|
160
|
-
* @param {string} id
|
|
161
|
-
* @throws {RequiredError}
|
|
162
|
-
* @memberof DefaultApiInterface
|
|
163
|
-
*/
|
|
164
|
-
addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
*
|
|
168
|
-
* @summary Add VirtualMachine to inspection queue
|
|
169
|
-
* @param {string} id
|
|
170
|
-
* @param {*} [options] Override http request option.
|
|
171
|
-
* @throws {RequiredError}
|
|
172
|
-
* @memberof DefaultApiInterface
|
|
173
|
-
*/
|
|
174
|
-
addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Add VirtualMachine to inspection queue
|
|
178
|
-
*/
|
|
179
|
-
addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
|
|
180
|
-
|
|
181
154
|
/**
|
|
182
155
|
* Creates request options for createGroup without sending the request
|
|
183
156
|
* @param {CreateGroupRequest} createGroupRequest
|
|
@@ -678,51 +651,6 @@ export interface DefaultApiInterface {
|
|
|
678
651
|
*/
|
|
679
652
|
export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
|
|
680
653
|
|
|
681
|
-
/**
|
|
682
|
-
* Creates request options for addVMToInspection without sending the request
|
|
683
|
-
*/
|
|
684
|
-
async addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts> {
|
|
685
|
-
if (requestParameters['id'] == null) {
|
|
686
|
-
throw new runtime.RequiredError(
|
|
687
|
-
'id',
|
|
688
|
-
'Required parameter "id" was null or undefined when calling addVMToInspection().'
|
|
689
|
-
);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
const queryParameters: any = {};
|
|
693
|
-
|
|
694
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
let urlPath = `/vms/{id}/inspection`;
|
|
698
|
-
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
699
|
-
|
|
700
|
-
return {
|
|
701
|
-
path: urlPath,
|
|
702
|
-
method: 'POST',
|
|
703
|
-
headers: headerParameters,
|
|
704
|
-
query: queryParameters,
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Add VirtualMachine to inspection queue
|
|
710
|
-
*/
|
|
711
|
-
async addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>> {
|
|
712
|
-
const requestOptions = await this.addVMToInspectionRequestOpts(requestParameters);
|
|
713
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
714
|
-
|
|
715
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* Add VirtualMachine to inspection queue
|
|
720
|
-
*/
|
|
721
|
-
async addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus> {
|
|
722
|
-
const response = await this.addVMToInspectionRaw(requestParameters, initOverrides);
|
|
723
|
-
return await response.value();
|
|
724
|
-
}
|
|
725
|
-
|
|
726
654
|
/**
|
|
727
655
|
* Creates request options for createGroup without sending the request
|
|
728
656
|
*/
|