@openshift-migration-advisor/agent-sdk 0.8.0-0a190192e598 → 0.8.0-7c64128a18e3

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 CHANGED
@@ -1,4 +1,4 @@
1
- # @openshift-migration-advisor/agent-sdk@0.8.0-0a190192e598
1
+ # @openshift-migration-advisor/agent-sdk@0.8.0-7c64128a18e3
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 { AddVMsToInspectionRequest } from '@openshift-migration-advisor/agent-sdk';
21
+ import type { AddVMToInspectionRequest } 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
- // Array<string>
29
- requestBody: ["vm-1236","vm-1237"],
30
- } satisfies AddVMsToInspectionRequest;
28
+ // string
29
+ id: id_example,
30
+ } satisfies AddVMToInspectionRequest;
31
31
 
32
32
  try {
33
- const data = await api.addVMsToInspection(body);
33
+ const data = await api.addVMToInspection(body);
34
34
  console.log(data);
35
35
  } catch (error) {
36
36
  console.error(error);
@@ -50,26 +50,25 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
50
50
 
51
51
  | Class | Method | HTTP request | Description
52
52
  | ----- | ------ | ------------ | -------------
53
- *DefaultApi* | [**addVMsToInspection**](docs/DefaultApi.md#addvmstoinspection) | **PATCH** /vms/inspector | Add more VMs to inspection queue
53
+ *DefaultApi* | [**addVMToInspection**](docs/DefaultApi.md#addvmtoinspection) | **POST** /vms/{id}/inspection | Add VirtualMachine to inspection queue
54
54
  *DefaultApi* | [**createGroup**](docs/DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group
55
55
  *DefaultApi* | [**deleteGroup**](docs/DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group
56
56
  *DefaultApi* | [**getAgentStatus**](docs/DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status
57
57
  *DefaultApi* | [**getCollectorStatus**](docs/DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status
58
58
  *DefaultApi* | [**getGroup**](docs/DefaultApi.md#getgroup) | **GET** /groups/{id} | Get group by ID with its VMs
59
- *DefaultApi* | [**getInspectorStatus**](docs/DefaultApi.md#getinspectorstatus) | **GET** /vms/inspector | Get inspector status
59
+ *DefaultApi* | [**getInspectorStatus**](docs/DefaultApi.md#getinspectorstatus) | **GET** /inspector | Get inspector status
60
60
  *DefaultApi* | [**getInventory**](docs/DefaultApi.md#getinventory) | **GET** /inventory | Get collected inventory
61
61
  *DefaultApi* | [**getVM**](docs/DefaultApi.md#getvm) | **GET** /vms/{id} | Get details about a vm
62
- *DefaultApi* | [**getVMInspectionStatus**](docs/DefaultApi.md#getvminspectionstatus) | **GET** /vms/{id}/inspector | Get inspection status for a specific VirtualMachine
63
62
  *DefaultApi* | [**getVMs**](docs/DefaultApi.md#getvms) | **GET** /vms | Get list of VMs with filtering and pagination
64
63
  *DefaultApi* | [**getVddkStatus**](docs/DefaultApi.md#getvddkstatus) | **GET** /vddk | Get VDDK status
65
64
  *DefaultApi* | [**getVersion**](docs/DefaultApi.md#getversion) | **GET** /version | Get agent version information
66
65
  *DefaultApi* | [**listGroups**](docs/DefaultApi.md#listgroups) | **GET** /groups | List all groups
67
- *DefaultApi* | [**removeVMFromInspection**](docs/DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspector | Remove VirtualMachine from inspection queue
66
+ *DefaultApi* | [**removeVMFromInspection**](docs/DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspection | Remove VirtualMachine from inspection queue
68
67
  *DefaultApi* | [**setAgentMode**](docs/DefaultApi.md#setagentmode) | **POST** /agent | Change agent mode
69
68
  *DefaultApi* | [**startCollector**](docs/DefaultApi.md#startcollector) | **POST** /collector | Start inventory collection
70
- *DefaultApi* | [**startInspection**](docs/DefaultApi.md#startinspection) | **POST** /vms/inspector | Start inspection for VMs
69
+ *DefaultApi* | [**startInspection**](docs/DefaultApi.md#startinspection) | **POST** /inspector | Start inspection for VMs
71
70
  *DefaultApi* | [**stopCollector**](docs/DefaultApi.md#stopcollector) | **DELETE** /collector | Stop collection
72
- *DefaultApi* | [**stopInspection**](docs/DefaultApi.md#stopinspection) | **DELETE** /vms/inspector | Stop inspector entirely
71
+ *DefaultApi* | [**stopInspection**](docs/DefaultApi.md#stopinspection) | **DELETE** /inspector | Stop inspector entirely
73
72
  *DefaultApi* | [**updateGroup**](docs/DefaultApi.md#updategroupoperation) | **PATCH** /groups/{id} | Update group
74
73
  *DefaultApi* | [**vddkPost**](docs/DefaultApi.md#vddkpost) | **POST** /vddk | Upload VDDK tarball
75
74
 
@@ -128,7 +127,7 @@ and is automatically generated by the
128
127
  [OpenAPI Generator](https://openapi-generator.tech) project:
129
128
 
130
129
  - API version: `v1`
131
- - Package version: `0.8.0-0a190192e598`
130
+ - Package version: `0.8.0-7c64128a18e3`
132
131
  - Generator version: `7.21.0-SNAPSHOT`
133
132
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
134
133
 
@@ -11,8 +11,8 @@
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
13
  import type { AgentModeRequest, AgentStatus, CollectorStartRequest, CollectorStatus, CreateGroupRequest, GetInventory200Response, Group, GroupListResponse, GroupResponse, InspectorStartRequest, InspectorStatus, UpdateGroupRequest, VddkProperties, VersionInfo, VirtualMachineDetail, VirtualMachineListResponse, VmInspectionStatus } from '../models/index.js';
14
- export interface AddVMsToInspectionRequest {
15
- requestBody: Array<string>;
14
+ export interface AddVMToInspectionRequest {
15
+ id: string;
16
16
  }
17
17
  export interface CreateGroupOperationRequest {
18
18
  createGroupRequest: CreateGroupRequest;
@@ -33,9 +33,6 @@ export interface GetInventoryRequest {
33
33
  export interface GetVMRequest {
34
34
  id: string;
35
35
  }
36
- export interface GetVMInspectionStatusRequest {
37
- id: string;
38
- }
39
36
  export interface GetVMsRequest {
40
37
  byExpression?: string;
41
38
  sort?: Array<string>;
@@ -74,25 +71,25 @@ export interface VddkPostRequest {
74
71
  */
75
72
  export interface DefaultApiInterface {
76
73
  /**
77
- * Creates request options for addVMsToInspection without sending the request
78
- * @param {Array<string>} requestBody
74
+ * Creates request options for addVMToInspection without sending the request
75
+ * @param {string} id
79
76
  * @throws {RequiredError}
80
77
  * @memberof DefaultApiInterface
81
78
  */
82
- addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts>;
79
+ addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
83
80
  /**
84
81
  *
85
- * @summary Add more VMs to inspection queue
86
- * @param {Array<string>} requestBody
82
+ * @summary Add VirtualMachine to inspection queue
83
+ * @param {string} id
87
84
  * @param {*} [options] Override http request option.
88
85
  * @throws {RequiredError}
89
86
  * @memberof DefaultApiInterface
90
87
  */
91
- addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>>;
88
+ addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
92
89
  /**
93
- * Add more VMs to inspection queue
90
+ * Add VirtualMachine to inspection queue
94
91
  */
95
- addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus>;
92
+ addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
96
93
  /**
97
94
  * Creates request options for createGroup without sending the request
98
95
  * @param {CreateGroupRequest} createGroupRequest
@@ -255,26 +252,6 @@ export interface DefaultApiInterface {
255
252
  * Get details about a vm
256
253
  */
257
254
  getVM(requestParameters: GetVMRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineDetail>;
258
- /**
259
- * Creates request options for getVMInspectionStatus without sending the request
260
- * @param {string} id VirtualMachine ID
261
- * @throws {RequiredError}
262
- * @memberof DefaultApiInterface
263
- */
264
- getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts>;
265
- /**
266
- *
267
- * @summary Get inspection status for a specific VirtualMachine
268
- * @param {string} id VirtualMachine ID
269
- * @param {*} [options] Override http request option.
270
- * @throws {RequiredError}
271
- * @memberof DefaultApiInterface
272
- */
273
- getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
274
- /**
275
- * Get inspection status for a specific VirtualMachine
276
- */
277
- getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
278
255
  /**
279
256
  * Creates request options for getVMs without sending the request
280
257
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
@@ -525,17 +502,17 @@ export interface DefaultApiInterface {
525
502
  */
526
503
  export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
527
504
  /**
528
- * Creates request options for addVMsToInspection without sending the request
505
+ * Creates request options for addVMToInspection without sending the request
529
506
  */
530
- addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts>;
507
+ addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
531
508
  /**
532
- * Add more VMs to inspection queue
509
+ * Add VirtualMachine to inspection queue
533
510
  */
534
- addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>>;
511
+ addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
535
512
  /**
536
- * Add more VMs to inspection queue
513
+ * Add VirtualMachine to inspection queue
537
514
  */
538
- addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus>;
515
+ addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
539
516
  /**
540
517
  * Creates request options for createGroup without sending the request
541
518
  */
@@ -632,18 +609,6 @@ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInt
632
609
  * Get details about a vm
633
610
  */
634
611
  getVM(requestParameters: GetVMRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineDetail>;
635
- /**
636
- * Creates request options for getVMInspectionStatus without sending the request
637
- */
638
- getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts>;
639
- /**
640
- * Get inspection status for a specific VirtualMachine
641
- */
642
- getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
643
- /**
644
- * Get inspection status for a specific VirtualMachine
645
- */
646
- getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
647
612
  /**
648
613
  * Creates request options for getVMs without sending the request
649
614
  */
@@ -30,42 +30,41 @@ const index_js_1 = require("../models/index.js");
30
30
  */
31
31
  class DefaultApi extends runtime.BaseAPI {
32
32
  /**
33
- * Creates request options for addVMsToInspection without sending the request
33
+ * Creates request options for addVMToInspection without sending the request
34
34
  */
35
- addVMsToInspectionRequestOpts(requestParameters) {
35
+ addVMToInspectionRequestOpts(requestParameters) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
- if (requestParameters['requestBody'] == null) {
38
- throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling addVMsToInspection().');
37
+ if (requestParameters['id'] == null) {
38
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addVMToInspection().');
39
39
  }
40
40
  const queryParameters = {};
41
41
  const headerParameters = {};
42
- headerParameters['Content-Type'] = 'application/json';
43
- let urlPath = `/vms/inspector`;
42
+ let urlPath = `/vms/{id}/inspection`;
43
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
44
44
  return {
45
45
  path: urlPath,
46
- method: 'PATCH',
46
+ method: 'POST',
47
47
  headers: headerParameters,
48
48
  query: queryParameters,
49
- body: requestParameters['requestBody'],
50
49
  };
51
50
  });
52
51
  }
53
52
  /**
54
- * Add more VMs to inspection queue
53
+ * Add VirtualMachine to inspection queue
55
54
  */
56
- addVMsToInspectionRaw(requestParameters, initOverrides) {
55
+ addVMToInspectionRaw(requestParameters, initOverrides) {
57
56
  return __awaiter(this, void 0, void 0, function* () {
58
- const requestOptions = yield this.addVMsToInspectionRequestOpts(requestParameters);
57
+ const requestOptions = yield this.addVMToInspectionRequestOpts(requestParameters);
59
58
  const response = yield this.request(requestOptions, initOverrides);
60
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.InspectorStatusFromJSON)(jsonValue));
59
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.VmInspectionStatusFromJSON)(jsonValue));
61
60
  });
62
61
  }
63
62
  /**
64
- * Add more VMs to inspection queue
63
+ * Add VirtualMachine to inspection queue
65
64
  */
66
- addVMsToInspection(requestParameters, initOverrides) {
65
+ addVMToInspection(requestParameters, initOverrides) {
67
66
  return __awaiter(this, void 0, void 0, function* () {
68
- const response = yield this.addVMsToInspectionRaw(requestParameters, initOverrides);
67
+ const response = yield this.addVMToInspectionRaw(requestParameters, initOverrides);
69
68
  return yield response.value();
70
69
  });
71
70
  }
@@ -272,7 +271,7 @@ class DefaultApi extends runtime.BaseAPI {
272
271
  return __awaiter(this, void 0, void 0, function* () {
273
272
  const queryParameters = {};
274
273
  const headerParameters = {};
275
- let urlPath = `/vms/inspector`;
274
+ let urlPath = `/inspector`;
276
275
  return {
277
276
  path: urlPath,
278
277
  method: 'GET',
@@ -380,45 +379,6 @@ class DefaultApi extends runtime.BaseAPI {
380
379
  return yield response.value();
381
380
  });
382
381
  }
383
- /**
384
- * Creates request options for getVMInspectionStatus without sending the request
385
- */
386
- getVMInspectionStatusRequestOpts(requestParameters) {
387
- return __awaiter(this, void 0, void 0, function* () {
388
- if (requestParameters['id'] == null) {
389
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getVMInspectionStatus().');
390
- }
391
- const queryParameters = {};
392
- const headerParameters = {};
393
- let urlPath = `/vms/{id}/inspector`;
394
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
395
- return {
396
- path: urlPath,
397
- method: 'GET',
398
- headers: headerParameters,
399
- query: queryParameters,
400
- };
401
- });
402
- }
403
- /**
404
- * Get inspection status for a specific VirtualMachine
405
- */
406
- getVMInspectionStatusRaw(requestParameters, initOverrides) {
407
- return __awaiter(this, void 0, void 0, function* () {
408
- const requestOptions = yield this.getVMInspectionStatusRequestOpts(requestParameters);
409
- const response = yield this.request(requestOptions, initOverrides);
410
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_js_1.VmInspectionStatusFromJSON)(jsonValue));
411
- });
412
- }
413
- /**
414
- * Get inspection status for a specific VirtualMachine
415
- */
416
- getVMInspectionStatus(requestParameters, initOverrides) {
417
- return __awaiter(this, void 0, void 0, function* () {
418
- const response = yield this.getVMInspectionStatusRaw(requestParameters, initOverrides);
419
- return yield response.value();
420
- });
421
- }
422
382
  /**
423
383
  * Creates request options for getVMs without sending the request
424
384
  */
@@ -590,7 +550,7 @@ class DefaultApi extends runtime.BaseAPI {
590
550
  }
591
551
  const queryParameters = {};
592
552
  const headerParameters = {};
593
- let urlPath = `/vms/{id}/inspector`;
553
+ let urlPath = `/vms/{id}/inspection`;
594
554
  urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
595
555
  return {
596
556
  path: urlPath,
@@ -710,7 +670,7 @@ class DefaultApi extends runtime.BaseAPI {
710
670
  const queryParameters = {};
711
671
  const headerParameters = {};
712
672
  headerParameters['Content-Type'] = 'application/json';
713
- let urlPath = `/vms/inspector`;
673
+ let urlPath = `/inspector`;
714
674
  return {
715
675
  path: urlPath,
716
676
  method: 'POST',
@@ -780,7 +740,7 @@ class DefaultApi extends runtime.BaseAPI {
780
740
  return __awaiter(this, void 0, void 0, function* () {
781
741
  const queryParameters = {};
782
742
  const headerParameters = {};
783
- let urlPath = `/vms/inspector`;
743
+ let urlPath = `/inspector`;
784
744
  return {
785
745
  path: urlPath,
786
746
  method: 'DELETE',
@@ -11,8 +11,8 @@
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
13
  import type { AgentModeRequest, AgentStatus, CollectorStartRequest, CollectorStatus, CreateGroupRequest, GetInventory200Response, Group, GroupListResponse, GroupResponse, InspectorStartRequest, InspectorStatus, UpdateGroupRequest, VddkProperties, VersionInfo, VirtualMachineDetail, VirtualMachineListResponse, VmInspectionStatus } from '../models/index.js';
14
- export interface AddVMsToInspectionRequest {
15
- requestBody: Array<string>;
14
+ export interface AddVMToInspectionRequest {
15
+ id: string;
16
16
  }
17
17
  export interface CreateGroupOperationRequest {
18
18
  createGroupRequest: CreateGroupRequest;
@@ -33,9 +33,6 @@ export interface GetInventoryRequest {
33
33
  export interface GetVMRequest {
34
34
  id: string;
35
35
  }
36
- export interface GetVMInspectionStatusRequest {
37
- id: string;
38
- }
39
36
  export interface GetVMsRequest {
40
37
  byExpression?: string;
41
38
  sort?: Array<string>;
@@ -74,25 +71,25 @@ export interface VddkPostRequest {
74
71
  */
75
72
  export interface DefaultApiInterface {
76
73
  /**
77
- * Creates request options for addVMsToInspection without sending the request
78
- * @param {Array<string>} requestBody
74
+ * Creates request options for addVMToInspection without sending the request
75
+ * @param {string} id
79
76
  * @throws {RequiredError}
80
77
  * @memberof DefaultApiInterface
81
78
  */
82
- addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts>;
79
+ addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
83
80
  /**
84
81
  *
85
- * @summary Add more VMs to inspection queue
86
- * @param {Array<string>} requestBody
82
+ * @summary Add VirtualMachine to inspection queue
83
+ * @param {string} id
87
84
  * @param {*} [options] Override http request option.
88
85
  * @throws {RequiredError}
89
86
  * @memberof DefaultApiInterface
90
87
  */
91
- addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>>;
88
+ addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
92
89
  /**
93
- * Add more VMs to inspection queue
90
+ * Add VirtualMachine to inspection queue
94
91
  */
95
- addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus>;
92
+ addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
96
93
  /**
97
94
  * Creates request options for createGroup without sending the request
98
95
  * @param {CreateGroupRequest} createGroupRequest
@@ -255,26 +252,6 @@ export interface DefaultApiInterface {
255
252
  * Get details about a vm
256
253
  */
257
254
  getVM(requestParameters: GetVMRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineDetail>;
258
- /**
259
- * Creates request options for getVMInspectionStatus without sending the request
260
- * @param {string} id VirtualMachine ID
261
- * @throws {RequiredError}
262
- * @memberof DefaultApiInterface
263
- */
264
- getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts>;
265
- /**
266
- *
267
- * @summary Get inspection status for a specific VirtualMachine
268
- * @param {string} id VirtualMachine ID
269
- * @param {*} [options] Override http request option.
270
- * @throws {RequiredError}
271
- * @memberof DefaultApiInterface
272
- */
273
- getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
274
- /**
275
- * Get inspection status for a specific VirtualMachine
276
- */
277
- getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
278
255
  /**
279
256
  * Creates request options for getVMs without sending the request
280
257
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
@@ -525,17 +502,17 @@ export interface DefaultApiInterface {
525
502
  */
526
503
  export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
527
504
  /**
528
- * Creates request options for addVMsToInspection without sending the request
505
+ * Creates request options for addVMToInspection without sending the request
529
506
  */
530
- addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts>;
507
+ addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
531
508
  /**
532
- * Add more VMs to inspection queue
509
+ * Add VirtualMachine to inspection queue
533
510
  */
534
- addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>>;
511
+ addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
535
512
  /**
536
- * Add more VMs to inspection queue
513
+ * Add VirtualMachine to inspection queue
537
514
  */
538
- addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus>;
515
+ addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
539
516
  /**
540
517
  * Creates request options for createGroup without sending the request
541
518
  */
@@ -632,18 +609,6 @@ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInt
632
609
  * Get details about a vm
633
610
  */
634
611
  getVM(requestParameters: GetVMRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineDetail>;
635
- /**
636
- * Creates request options for getVMInspectionStatus without sending the request
637
- */
638
- getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts>;
639
- /**
640
- * Get inspection status for a specific VirtualMachine
641
- */
642
- getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
643
- /**
644
- * Get inspection status for a specific VirtualMachine
645
- */
646
- getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
647
612
  /**
648
613
  * Creates request options for getVMs without sending the request
649
614
  */
@@ -27,42 +27,41 @@ import { AgentModeRequestToJSON, AgentStatusFromJSON, CollectorStartRequestToJSO
27
27
  */
28
28
  export class DefaultApi extends runtime.BaseAPI {
29
29
  /**
30
- * Creates request options for addVMsToInspection without sending the request
30
+ * Creates request options for addVMToInspection without sending the request
31
31
  */
32
- addVMsToInspectionRequestOpts(requestParameters) {
32
+ addVMToInspectionRequestOpts(requestParameters) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
- if (requestParameters['requestBody'] == null) {
35
- throw new runtime.RequiredError('requestBody', 'Required parameter "requestBody" was null or undefined when calling addVMsToInspection().');
34
+ if (requestParameters['id'] == null) {
35
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addVMToInspection().');
36
36
  }
37
37
  const queryParameters = {};
38
38
  const headerParameters = {};
39
- headerParameters['Content-Type'] = 'application/json';
40
- let urlPath = `/vms/inspector`;
39
+ let urlPath = `/vms/{id}/inspection`;
40
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
41
41
  return {
42
42
  path: urlPath,
43
- method: 'PATCH',
43
+ method: 'POST',
44
44
  headers: headerParameters,
45
45
  query: queryParameters,
46
- body: requestParameters['requestBody'],
47
46
  };
48
47
  });
49
48
  }
50
49
  /**
51
- * Add more VMs to inspection queue
50
+ * Add VirtualMachine to inspection queue
52
51
  */
53
- addVMsToInspectionRaw(requestParameters, initOverrides) {
52
+ addVMToInspectionRaw(requestParameters, initOverrides) {
54
53
  return __awaiter(this, void 0, void 0, function* () {
55
- const requestOptions = yield this.addVMsToInspectionRequestOpts(requestParameters);
54
+ const requestOptions = yield this.addVMToInspectionRequestOpts(requestParameters);
56
55
  const response = yield this.request(requestOptions, initOverrides);
57
- return new runtime.JSONApiResponse(response, (jsonValue) => InspectorStatusFromJSON(jsonValue));
56
+ return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
58
57
  });
59
58
  }
60
59
  /**
61
- * Add more VMs to inspection queue
60
+ * Add VirtualMachine to inspection queue
62
61
  */
63
- addVMsToInspection(requestParameters, initOverrides) {
62
+ addVMToInspection(requestParameters, initOverrides) {
64
63
  return __awaiter(this, void 0, void 0, function* () {
65
- const response = yield this.addVMsToInspectionRaw(requestParameters, initOverrides);
64
+ const response = yield this.addVMToInspectionRaw(requestParameters, initOverrides);
66
65
  return yield response.value();
67
66
  });
68
67
  }
@@ -269,7 +268,7 @@ export class DefaultApi extends runtime.BaseAPI {
269
268
  return __awaiter(this, void 0, void 0, function* () {
270
269
  const queryParameters = {};
271
270
  const headerParameters = {};
272
- let urlPath = `/vms/inspector`;
271
+ let urlPath = `/inspector`;
273
272
  return {
274
273
  path: urlPath,
275
274
  method: 'GET',
@@ -377,45 +376,6 @@ export class DefaultApi extends runtime.BaseAPI {
377
376
  return yield response.value();
378
377
  });
379
378
  }
380
- /**
381
- * Creates request options for getVMInspectionStatus without sending the request
382
- */
383
- getVMInspectionStatusRequestOpts(requestParameters) {
384
- return __awaiter(this, void 0, void 0, function* () {
385
- if (requestParameters['id'] == null) {
386
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getVMInspectionStatus().');
387
- }
388
- const queryParameters = {};
389
- const headerParameters = {};
390
- let urlPath = `/vms/{id}/inspector`;
391
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
392
- return {
393
- path: urlPath,
394
- method: 'GET',
395
- headers: headerParameters,
396
- query: queryParameters,
397
- };
398
- });
399
- }
400
- /**
401
- * Get inspection status for a specific VirtualMachine
402
- */
403
- getVMInspectionStatusRaw(requestParameters, initOverrides) {
404
- return __awaiter(this, void 0, void 0, function* () {
405
- const requestOptions = yield this.getVMInspectionStatusRequestOpts(requestParameters);
406
- const response = yield this.request(requestOptions, initOverrides);
407
- return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
408
- });
409
- }
410
- /**
411
- * Get inspection status for a specific VirtualMachine
412
- */
413
- getVMInspectionStatus(requestParameters, initOverrides) {
414
- return __awaiter(this, void 0, void 0, function* () {
415
- const response = yield this.getVMInspectionStatusRaw(requestParameters, initOverrides);
416
- return yield response.value();
417
- });
418
- }
419
379
  /**
420
380
  * Creates request options for getVMs without sending the request
421
381
  */
@@ -587,7 +547,7 @@ export class DefaultApi extends runtime.BaseAPI {
587
547
  }
588
548
  const queryParameters = {};
589
549
  const headerParameters = {};
590
- let urlPath = `/vms/{id}/inspector`;
550
+ let urlPath = `/vms/{id}/inspection`;
591
551
  urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
592
552
  return {
593
553
  path: urlPath,
@@ -707,7 +667,7 @@ export class DefaultApi extends runtime.BaseAPI {
707
667
  const queryParameters = {};
708
668
  const headerParameters = {};
709
669
  headerParameters['Content-Type'] = 'application/json';
710
- let urlPath = `/vms/inspector`;
670
+ let urlPath = `/inspector`;
711
671
  return {
712
672
  path: urlPath,
713
673
  method: 'POST',
@@ -777,7 +737,7 @@ export class DefaultApi extends runtime.BaseAPI {
777
737
  return __awaiter(this, void 0, void 0, function* () {
778
738
  const queryParameters = {};
779
739
  const headerParameters = {};
780
- let urlPath = `/vms/inspector`;
740
+ let urlPath = `/inspector`;
781
741
  return {
782
742
  path: urlPath,
783
743
  method: 'DELETE',
@@ -35,7 +35,6 @@ export declare const InspectorStatusStateEnum: {
35
35
  readonly InspectorStatusStateReady: "ready";
36
36
  readonly InspectorStatusStateInitiating: "Initiating";
37
37
  readonly InspectorStatusStateRunning: "running";
38
- readonly InspectorStatusStateCanceling: "canceling";
39
38
  readonly InspectorStatusStateCanceled: "canceled";
40
39
  readonly InspectorStatusStateCompleted: "completed";
41
40
  readonly InspectorStatusStateError: "error";
@@ -18,7 +18,6 @@ export const InspectorStatusStateEnum = {
18
18
  InspectorStatusStateReady: 'ready',
19
19
  InspectorStatusStateInitiating: 'Initiating',
20
20
  InspectorStatusStateRunning: 'running',
21
- InspectorStatusStateCanceling: 'canceling',
22
21
  InspectorStatusStateCanceled: 'canceled',
23
22
  InspectorStatusStateCompleted: 'completed',
24
23
  InspectorStatusStateError: 'error'
@@ -94,10 +94,19 @@ export interface VMs {
94
94
  * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
95
95
  * @type {{ [key: string]: number; }}
96
96
  * @memberof VMs
97
+ * @deprecated
97
98
  */
98
99
  distributionByComplexity?: {
99
100
  [key: string]: number;
100
101
  };
102
+ /**
103
+ * Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity.
104
+ * @type {{ [key: string]: DiskSizeTierSummary; }}
105
+ * @memberof VMs
106
+ */
107
+ complexityDistribution?: {
108
+ [key: string]: DiskSizeTierSummary;
109
+ };
101
110
  /**
102
111
  *
103
112
  * @type {VMResourceBreakdown}
@@ -60,6 +60,7 @@ export function VMsFromJSONTyped(json, ignoreDiscriminator) {
60
60
  'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
61
61
  'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
62
62
  'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
63
+ 'complexityDistribution': json['complexityDistribution'] == null ? undefined : (mapValues(json['complexityDistribution'], DiskSizeTierSummaryFromJSON)),
63
64
  'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
64
65
  'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
65
66
  'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
@@ -90,6 +91,7 @@ export function VMsToJSONTyped(value, ignoreDiscriminator = false) {
90
91
  'distributionByMemoryTier': value['distributionByMemoryTier'],
91
92
  'distributionByNicCount': value['distributionByNicCount'],
92
93
  'distributionByComplexity': value['distributionByComplexity'],
94
+ 'complexityDistribution': value['complexityDistribution'] == null ? undefined : (mapValues(value['complexityDistribution'], DiskSizeTierSummaryToJSON)),
93
95
  'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
94
96
  'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
95
97
  'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
@@ -43,7 +43,7 @@ export declare const VmInspectionStatusStateEnum: {
43
43
  readonly VmInspectionStatusStateCompleted: "completed";
44
44
  readonly VmInspectionStatusStateCanceled: "canceled";
45
45
  readonly VmInspectionStatusStateError: "error";
46
- readonly VmInspectionStatusStateNotFound: "not_found";
46
+ readonly VmInspectionStatusStateNotStarted: "not_started";
47
47
  };
48
48
  export type VmInspectionStatusStateEnum = typeof VmInspectionStatusStateEnum[keyof typeof VmInspectionStatusStateEnum];
49
49
  /**
@@ -20,7 +20,7 @@ export const VmInspectionStatusStateEnum = {
20
20
  VmInspectionStatusStateCompleted: 'completed',
21
21
  VmInspectionStatusStateCanceled: 'canceled',
22
22
  VmInspectionStatusStateError: 'error',
23
- VmInspectionStatusStateNotFound: 'not_found'
23
+ VmInspectionStatusStateNotStarted: 'not_started'
24
24
  };
25
25
  /**
26
26
  * Check if a given object implements the VmInspectionStatus interface.
@@ -35,7 +35,6 @@ export declare const InspectorStatusStateEnum: {
35
35
  readonly InspectorStatusStateReady: "ready";
36
36
  readonly InspectorStatusStateInitiating: "Initiating";
37
37
  readonly InspectorStatusStateRunning: "running";
38
- readonly InspectorStatusStateCanceling: "canceling";
39
38
  readonly InspectorStatusStateCanceled: "canceled";
40
39
  readonly InspectorStatusStateCompleted: "completed";
41
40
  readonly InspectorStatusStateError: "error";
@@ -26,7 +26,6 @@ exports.InspectorStatusStateEnum = {
26
26
  InspectorStatusStateReady: 'ready',
27
27
  InspectorStatusStateInitiating: 'Initiating',
28
28
  InspectorStatusStateRunning: 'running',
29
- InspectorStatusStateCanceling: 'canceling',
30
29
  InspectorStatusStateCanceled: 'canceled',
31
30
  InspectorStatusStateCompleted: 'completed',
32
31
  InspectorStatusStateError: 'error'
@@ -94,10 +94,19 @@ export interface VMs {
94
94
  * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
95
95
  * @type {{ [key: string]: number; }}
96
96
  * @memberof VMs
97
+ * @deprecated
97
98
  */
98
99
  distributionByComplexity?: {
99
100
  [key: string]: number;
100
101
  };
102
+ /**
103
+ * Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity.
104
+ * @type {{ [key: string]: DiskSizeTierSummary; }}
105
+ * @memberof VMs
106
+ */
107
+ complexityDistribution?: {
108
+ [key: string]: DiskSizeTierSummary;
109
+ };
101
110
  /**
102
111
  *
103
112
  * @type {VMResourceBreakdown}
@@ -67,6 +67,7 @@ function VMsFromJSONTyped(json, ignoreDiscriminator) {
67
67
  'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
68
68
  'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
69
69
  'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
70
+ 'complexityDistribution': json['complexityDistribution'] == null ? undefined : ((0, runtime_js_1.mapValues)(json['complexityDistribution'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryFromJSON)),
70
71
  'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['ramGB']),
71
72
  'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskGB']),
72
73
  'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownFromJSON)(json['diskCount']),
@@ -97,6 +98,7 @@ function VMsToJSONTyped(value, ignoreDiscriminator = false) {
97
98
  'distributionByMemoryTier': value['distributionByMemoryTier'],
98
99
  'distributionByNicCount': value['distributionByNicCount'],
99
100
  'distributionByComplexity': value['distributionByComplexity'],
101
+ 'complexityDistribution': value['complexityDistribution'] == null ? undefined : ((0, runtime_js_1.mapValues)(value['complexityDistribution'], DiskSizeTierSummary_js_1.DiskSizeTierSummaryToJSON)),
100
102
  'ramGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['ramGB']),
101
103
  'diskGB': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskGB']),
102
104
  'diskCount': (0, VMResourceBreakdown_js_1.VMResourceBreakdownToJSON)(value['diskCount']),
@@ -43,7 +43,7 @@ export declare const VmInspectionStatusStateEnum: {
43
43
  readonly VmInspectionStatusStateCompleted: "completed";
44
44
  readonly VmInspectionStatusStateCanceled: "canceled";
45
45
  readonly VmInspectionStatusStateError: "error";
46
- readonly VmInspectionStatusStateNotFound: "not_found";
46
+ readonly VmInspectionStatusStateNotStarted: "not_started";
47
47
  };
48
48
  export type VmInspectionStatusStateEnum = typeof VmInspectionStatusStateEnum[keyof typeof VmInspectionStatusStateEnum];
49
49
  /**
@@ -28,7 +28,7 @@ exports.VmInspectionStatusStateEnum = {
28
28
  VmInspectionStatusStateCompleted: 'completed',
29
29
  VmInspectionStatusStateCanceled: 'canceled',
30
30
  VmInspectionStatusStateError: 'error',
31
- VmInspectionStatusStateNotFound: 'not_found'
31
+ VmInspectionStatusStateNotStarted: 'not_started'
32
32
  };
33
33
  /**
34
34
  * Check if a given object implements the VmInspectionStatus interface.
@@ -4,36 +4,35 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
- | [**addVMsToInspection**](DefaultApi.md#addvmstoinspection) | **PATCH** /vms/inspector | Add more VMs to inspection queue |
7
+ | [**addVMToInspection**](DefaultApi.md#addvmtoinspection) | **POST** /vms/{id}/inspection | Add VirtualMachine to inspection queue |
8
8
  | [**createGroup**](DefaultApi.md#creategroupoperation) | **POST** /groups | Create a new group |
9
9
  | [**deleteGroup**](DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group |
10
10
  | [**getAgentStatus**](DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status |
11
11
  | [**getCollectorStatus**](DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status |
12
12
  | [**getGroup**](DefaultApi.md#getgroup) | **GET** /groups/{id} | Get group by ID with its VMs |
13
- | [**getInspectorStatus**](DefaultApi.md#getinspectorstatus) | **GET** /vms/inspector | Get inspector status |
13
+ | [**getInspectorStatus**](DefaultApi.md#getinspectorstatus) | **GET** /inspector | Get inspector status |
14
14
  | [**getInventory**](DefaultApi.md#getinventory) | **GET** /inventory | Get collected inventory |
15
15
  | [**getVM**](DefaultApi.md#getvm) | **GET** /vms/{id} | Get details about a vm |
16
- | [**getVMInspectionStatus**](DefaultApi.md#getvminspectionstatus) | **GET** /vms/{id}/inspector | Get inspection status for a specific VirtualMachine |
17
16
  | [**getVMs**](DefaultApi.md#getvms) | **GET** /vms | Get list of VMs with filtering and pagination |
18
17
  | [**getVddkStatus**](DefaultApi.md#getvddkstatus) | **GET** /vddk | Get VDDK status |
19
18
  | [**getVersion**](DefaultApi.md#getversion) | **GET** /version | Get agent version information |
20
19
  | [**listGroups**](DefaultApi.md#listgroups) | **GET** /groups | List all groups |
21
- | [**removeVMFromInspection**](DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspector | Remove VirtualMachine from inspection queue |
20
+ | [**removeVMFromInspection**](DefaultApi.md#removevmfrominspection) | **DELETE** /vms/{id}/inspection | Remove VirtualMachine from inspection queue |
22
21
  | [**setAgentMode**](DefaultApi.md#setagentmode) | **POST** /agent | Change agent mode |
23
22
  | [**startCollector**](DefaultApi.md#startcollector) | **POST** /collector | Start inventory collection |
24
- | [**startInspection**](DefaultApi.md#startinspection) | **POST** /vms/inspector | Start inspection for VMs |
23
+ | [**startInspection**](DefaultApi.md#startinspection) | **POST** /inspector | Start inspection for VMs |
25
24
  | [**stopCollector**](DefaultApi.md#stopcollector) | **DELETE** /collector | Stop collection |
26
- | [**stopInspection**](DefaultApi.md#stopinspection) | **DELETE** /vms/inspector | Stop inspector entirely |
25
+ | [**stopInspection**](DefaultApi.md#stopinspection) | **DELETE** /inspector | Stop inspector entirely |
27
26
  | [**updateGroup**](DefaultApi.md#updategroupoperation) | **PATCH** /groups/{id} | Update group |
28
27
  | [**vddkPost**](DefaultApi.md#vddkpost) | **POST** /vddk | Upload VDDK tarball |
29
28
 
30
29
 
31
30
 
32
- ## addVMsToInspection
31
+ ## addVMToInspection
33
32
 
34
- > InspectorStatus addVMsToInspection(requestBody)
33
+ > VmInspectionStatus addVMToInspection(id)
35
34
 
36
- Add more VMs to inspection queue
35
+ Add VirtualMachine to inspection queue
37
36
 
38
37
  ### Example
39
38
 
@@ -42,19 +41,19 @@ import {
42
41
  Configuration,
43
42
  DefaultApi,
44
43
  } from '@openshift-migration-advisor/agent-sdk';
45
- import type { AddVMsToInspectionRequest } from '@openshift-migration-advisor/agent-sdk';
44
+ import type { AddVMToInspectionRequest } from '@openshift-migration-advisor/agent-sdk';
46
45
 
47
46
  async function example() {
48
47
  console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
49
48
  const api = new DefaultApi();
50
49
 
51
50
  const body = {
52
- // Array<string>
53
- requestBody: ["vm-1236","vm-1237"],
54
- } satisfies AddVMsToInspectionRequest;
51
+ // string
52
+ id: id_example,
53
+ } satisfies AddVMToInspectionRequest;
55
54
 
56
55
  try {
57
- const data = await api.addVMsToInspection(body);
56
+ const data = await api.addVMToInspection(body);
58
57
  console.log(data);
59
58
  } catch (error) {
60
59
  console.error(error);
@@ -70,11 +69,11 @@ example().catch(console.error);
70
69
 
71
70
  | Name | Type | Description | Notes |
72
71
  |------------- | ------------- | ------------- | -------------|
73
- | **requestBody** | `Array<string>` | | |
72
+ | **id** | `string` | | [Defaults to `undefined`] |
74
73
 
75
74
  ### Return type
76
75
 
77
- [**InspectorStatus**](InspectorStatus.md)
76
+ [**VmInspectionStatus**](VmInspectionStatus.md)
78
77
 
79
78
  ### Authorization
80
79
 
@@ -82,16 +81,17 @@ No authorization required
82
81
 
83
82
  ### HTTP request headers
84
83
 
85
- - **Content-Type**: `application/json`
84
+ - **Content-Type**: Not defined
86
85
  - **Accept**: `application/json`
87
86
 
88
87
 
89
88
  ### HTTP response details
90
89
  | Status code | Description | Response headers |
91
90
  |-------------|-------------|------------------|
92
- | **202** | VMs added to inspection queue | - |
93
- | **400** | Invalid request | - |
94
- | **404** | Inspector not running | - |
91
+ | **202** | VM added to inspection queue | - |
92
+ | **400** | Inspector not running | - |
93
+ | **404** | VirtualMachine not found | - |
94
+ | **409** | VM already in inspection queue | - |
95
95
  | **500** | Internal server error | - |
96
96
 
97
97
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -617,73 +617,6 @@ No authorization required
617
617
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
618
618
 
619
619
 
620
- ## getVMInspectionStatus
621
-
622
- > VmInspectionStatus getVMInspectionStatus(id)
623
-
624
- Get inspection status for a specific VirtualMachine
625
-
626
- ### Example
627
-
628
- ```ts
629
- import {
630
- Configuration,
631
- DefaultApi,
632
- } from '@openshift-migration-advisor/agent-sdk';
633
- import type { GetVMInspectionStatusRequest } from '@openshift-migration-advisor/agent-sdk';
634
-
635
- async function example() {
636
- console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
637
- const api = new DefaultApi();
638
-
639
- const body = {
640
- // string | VirtualMachine ID
641
- id: id_example,
642
- } satisfies GetVMInspectionStatusRequest;
643
-
644
- try {
645
- const data = await api.getVMInspectionStatus(body);
646
- console.log(data);
647
- } catch (error) {
648
- console.error(error);
649
- }
650
- }
651
-
652
- // Run the test
653
- example().catch(console.error);
654
- ```
655
-
656
- ### Parameters
657
-
658
-
659
- | Name | Type | Description | Notes |
660
- |------------- | ------------- | ------------- | -------------|
661
- | **id** | `string` | VirtualMachine ID | [Defaults to `undefined`] |
662
-
663
- ### Return type
664
-
665
- [**VmInspectionStatus**](VmInspectionStatus.md)
666
-
667
- ### Authorization
668
-
669
- No authorization required
670
-
671
- ### HTTP request headers
672
-
673
- - **Content-Type**: Not defined
674
- - **Accept**: `application/json`
675
-
676
-
677
- ### HTTP response details
678
- | Status code | Description | Response headers |
679
- |-------------|-------------|------------------|
680
- | **200** | VirtualMachine inspection status | - |
681
- | **404** | VirtualMachine not found | - |
682
- | **500** | Internal server error | - |
683
-
684
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
685
-
686
-
687
620
  ## getVMs
688
621
 
689
622
  > VirtualMachineListResponse getVMs(byExpression, sort, page, pageSize)
@@ -1010,8 +943,8 @@ No authorization required
1010
943
  | Status code | Description | Response headers |
1011
944
  |-------------|-------------|------------------|
1012
945
  | **200** | VMs removed from queue | - |
1013
- | **400** | Invalid request | - |
1014
- | **404** | Inspector not running | - |
946
+ | **400** | Inspector not running or VirtualMachine cannot be canceled | - |
947
+ | **404** | VirtualMachine not found or not in the queue | - |
1015
948
  | **500** | Internal server error | - |
1016
949
 
1017
950
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
package/docs/VMs.md CHANGED
@@ -17,6 +17,7 @@ Name | Type
17
17
  `distributionByMemoryTier` | { [key: string]: number; }
18
18
  `distributionByNicCount` | { [key: string]: number; }
19
19
  `distributionByComplexity` | { [key: string]: number; }
20
+ `complexityDistribution` | [{ [key: string]: DiskSizeTierSummary; }](DiskSizeTierSummary.md)
20
21
  `ramGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
21
22
  `diskGB` | [VMResourceBreakdown](VMResourceBreakdown.md)
22
23
  `diskCount` | [VMResourceBreakdown](VMResourceBreakdown.md)
@@ -45,6 +46,7 @@ const example = {
45
46
  "distributionByMemoryTier": null,
46
47
  "distributionByNicCount": null,
47
48
  "distributionByComplexity": null,
49
+ "complexityDistribution": null,
48
50
  "ramGB": null,
49
51
  "diskGB": null,
50
52
  "diskCount": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/agent-sdk",
3
- "version": "0.8.0-0a190192e598",
3
+ "version": "0.8.0-7c64128a18e3",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/agent-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -70,8 +70,8 @@ import {
70
70
  VmInspectionStatusToJSON,
71
71
  } from '../models/index.js';
72
72
 
73
- export interface AddVMsToInspectionRequest {
74
- requestBody: Array<string>;
73
+ export interface AddVMToInspectionRequest {
74
+ id: string;
75
75
  }
76
76
 
77
77
  export interface CreateGroupOperationRequest {
@@ -98,10 +98,6 @@ export interface GetVMRequest {
98
98
  id: string;
99
99
  }
100
100
 
101
- export interface GetVMInspectionStatusRequest {
102
- id: string;
103
- }
104
-
105
101
  export interface GetVMsRequest {
106
102
  byExpression?: string;
107
103
  sort?: Array<string>;
@@ -148,27 +144,27 @@ export interface VddkPostRequest {
148
144
  */
149
145
  export interface DefaultApiInterface {
150
146
  /**
151
- * Creates request options for addVMsToInspection without sending the request
152
- * @param {Array<string>} requestBody
147
+ * Creates request options for addVMToInspection without sending the request
148
+ * @param {string} id
153
149
  * @throws {RequiredError}
154
150
  * @memberof DefaultApiInterface
155
151
  */
156
- addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts>;
152
+ addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts>;
157
153
 
158
154
  /**
159
155
  *
160
- * @summary Add more VMs to inspection queue
161
- * @param {Array<string>} requestBody
156
+ * @summary Add VirtualMachine to inspection queue
157
+ * @param {string} id
162
158
  * @param {*} [options] Override http request option.
163
159
  * @throws {RequiredError}
164
160
  * @memberof DefaultApiInterface
165
161
  */
166
- addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>>;
162
+ addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
167
163
 
168
164
  /**
169
- * Add more VMs to inspection queue
165
+ * Add VirtualMachine to inspection queue
170
166
  */
171
- addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus>;
167
+ addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
172
168
 
173
169
  /**
174
170
  * Creates request options for createGroup without sending the request
@@ -356,29 +352,6 @@ export interface DefaultApiInterface {
356
352
  */
357
353
  getVM(requestParameters: GetVMRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VirtualMachineDetail>;
358
354
 
359
- /**
360
- * Creates request options for getVMInspectionStatus without sending the request
361
- * @param {string} id VirtualMachine ID
362
- * @throws {RequiredError}
363
- * @memberof DefaultApiInterface
364
- */
365
- getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts>;
366
-
367
- /**
368
- *
369
- * @summary Get inspection status for a specific VirtualMachine
370
- * @param {string} id VirtualMachine ID
371
- * @param {*} [options] Override http request option.
372
- * @throws {RequiredError}
373
- * @memberof DefaultApiInterface
374
- */
375
- getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>>;
376
-
377
- /**
378
- * Get inspection status for a specific VirtualMachine
379
- */
380
- getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus>;
381
-
382
355
  /**
383
356
  * Creates request options for getVMs without sending the request
384
357
  * @param {string} [byExpression] Filter by expression (matches VMs with the provided expression)
@@ -667,13 +640,13 @@ export interface DefaultApiInterface {
667
640
  export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
668
641
 
669
642
  /**
670
- * Creates request options for addVMsToInspection without sending the request
643
+ * Creates request options for addVMToInspection without sending the request
671
644
  */
672
- async addVMsToInspectionRequestOpts(requestParameters: AddVMsToInspectionRequest): Promise<runtime.RequestOpts> {
673
- if (requestParameters['requestBody'] == null) {
645
+ async addVMToInspectionRequestOpts(requestParameters: AddVMToInspectionRequest): Promise<runtime.RequestOpts> {
646
+ if (requestParameters['id'] == null) {
674
647
  throw new runtime.RequiredError(
675
- 'requestBody',
676
- 'Required parameter "requestBody" was null or undefined when calling addVMsToInspection().'
648
+ 'id',
649
+ 'Required parameter "id" was null or undefined when calling addVMToInspection().'
677
650
  );
678
651
  }
679
652
 
@@ -681,35 +654,33 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
681
654
 
682
655
  const headerParameters: runtime.HTTPHeaders = {};
683
656
 
684
- headerParameters['Content-Type'] = 'application/json';
685
-
686
657
 
687
- let urlPath = `/vms/inspector`;
658
+ let urlPath = `/vms/{id}/inspection`;
659
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
688
660
 
689
661
  return {
690
662
  path: urlPath,
691
- method: 'PATCH',
663
+ method: 'POST',
692
664
  headers: headerParameters,
693
665
  query: queryParameters,
694
- body: requestParameters['requestBody'],
695
666
  };
696
667
  }
697
668
 
698
669
  /**
699
- * Add more VMs to inspection queue
670
+ * Add VirtualMachine to inspection queue
700
671
  */
701
- async addVMsToInspectionRaw(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InspectorStatus>> {
702
- const requestOptions = await this.addVMsToInspectionRequestOpts(requestParameters);
672
+ async addVMToInspectionRaw(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>> {
673
+ const requestOptions = await this.addVMToInspectionRequestOpts(requestParameters);
703
674
  const response = await this.request(requestOptions, initOverrides);
704
675
 
705
- return new runtime.JSONApiResponse(response, (jsonValue) => InspectorStatusFromJSON(jsonValue));
676
+ return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
706
677
  }
707
678
 
708
679
  /**
709
- * Add more VMs to inspection queue
680
+ * Add VirtualMachine to inspection queue
710
681
  */
711
- async addVMsToInspection(requestParameters: AddVMsToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InspectorStatus> {
712
- const response = await this.addVMsToInspectionRaw(requestParameters, initOverrides);
682
+ async addVMToInspection(requestParameters: AddVMToInspectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus> {
683
+ const response = await this.addVMToInspectionRaw(requestParameters, initOverrides);
713
684
  return await response.value();
714
685
  }
715
686
 
@@ -944,7 +915,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
944
915
  const headerParameters: runtime.HTTPHeaders = {};
945
916
 
946
917
 
947
- let urlPath = `/vms/inspector`;
918
+ let urlPath = `/inspector`;
948
919
 
949
920
  return {
950
921
  path: urlPath,
@@ -1062,51 +1033,6 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1062
1033
  return await response.value();
1063
1034
  }
1064
1035
 
1065
- /**
1066
- * Creates request options for getVMInspectionStatus without sending the request
1067
- */
1068
- async getVMInspectionStatusRequestOpts(requestParameters: GetVMInspectionStatusRequest): Promise<runtime.RequestOpts> {
1069
- if (requestParameters['id'] == null) {
1070
- throw new runtime.RequiredError(
1071
- 'id',
1072
- 'Required parameter "id" was null or undefined when calling getVMInspectionStatus().'
1073
- );
1074
- }
1075
-
1076
- const queryParameters: any = {};
1077
-
1078
- const headerParameters: runtime.HTTPHeaders = {};
1079
-
1080
-
1081
- let urlPath = `/vms/{id}/inspector`;
1082
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1083
-
1084
- return {
1085
- path: urlPath,
1086
- method: 'GET',
1087
- headers: headerParameters,
1088
- query: queryParameters,
1089
- };
1090
- }
1091
-
1092
- /**
1093
- * Get inspection status for a specific VirtualMachine
1094
- */
1095
- async getVMInspectionStatusRaw(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VmInspectionStatus>> {
1096
- const requestOptions = await this.getVMInspectionStatusRequestOpts(requestParameters);
1097
- const response = await this.request(requestOptions, initOverrides);
1098
-
1099
- return new runtime.JSONApiResponse(response, (jsonValue) => VmInspectionStatusFromJSON(jsonValue));
1100
- }
1101
-
1102
- /**
1103
- * Get inspection status for a specific VirtualMachine
1104
- */
1105
- async getVMInspectionStatus(requestParameters: GetVMInspectionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VmInspectionStatus> {
1106
- const response = await this.getVMInspectionStatusRaw(requestParameters, initOverrides);
1107
- return await response.value();
1108
- }
1109
-
1110
1036
  /**
1111
1037
  * Creates request options for getVMs without sending the request
1112
1038
  */
@@ -1299,7 +1225,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1299
1225
  const headerParameters: runtime.HTTPHeaders = {};
1300
1226
 
1301
1227
 
1302
- let urlPath = `/vms/{id}/inspector`;
1228
+ let urlPath = `/vms/{id}/inspection`;
1303
1229
  urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
1304
1230
 
1305
1231
  return {
@@ -1440,7 +1366,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1440
1366
  headerParameters['Content-Type'] = 'application/json';
1441
1367
 
1442
1368
 
1443
- let urlPath = `/vms/inspector`;
1369
+ let urlPath = `/inspector`;
1444
1370
 
1445
1371
  return {
1446
1372
  path: urlPath,
@@ -1514,7 +1440,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1514
1440
  const headerParameters: runtime.HTTPHeaders = {};
1515
1441
 
1516
1442
 
1517
- let urlPath = `/vms/inspector`;
1443
+ let urlPath = `/inspector`;
1518
1444
 
1519
1445
  return {
1520
1446
  path: urlPath,
@@ -41,7 +41,6 @@ export const InspectorStatusStateEnum = {
41
41
  InspectorStatusStateReady: 'ready',
42
42
  InspectorStatusStateInitiating: 'Initiating',
43
43
  InspectorStatusStateRunning: 'running',
44
- InspectorStatusStateCanceling: 'canceling',
45
44
  InspectorStatusStateCanceled: 'canceled',
46
45
  InspectorStatusStateCompleted: 'completed',
47
46
  InspectorStatusStateError: 'error'
package/src/models/VMs.ts CHANGED
@@ -119,8 +119,15 @@ export interface VMs {
119
119
  * Distribution of VMs by migration complexity level (0=Unsupported, 1=Easy, 2=Medium, 3=Hard, 4=WhiteGlove)
120
120
  * @type {{ [key: string]: number; }}
121
121
  * @memberof VMs
122
+ * @deprecated
122
123
  */
123
124
  distributionByComplexity?: { [key: string]: number; };
125
+ /**
126
+ * Distribution of VMs by migration complexity level, enriched with total disk size per level. Supersedes distributionByComplexity.
127
+ * @type {{ [key: string]: DiskSizeTierSummary; }}
128
+ * @memberof VMs
129
+ */
130
+ complexityDistribution?: { [key: string]: DiskSizeTierSummary; };
124
131
  /**
125
132
  *
126
133
  * @type {VMResourceBreakdown}
@@ -215,6 +222,7 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
215
222
  'distributionByMemoryTier': json['distributionByMemoryTier'] == null ? undefined : json['distributionByMemoryTier'],
216
223
  'distributionByNicCount': json['distributionByNicCount'] == null ? undefined : json['distributionByNicCount'],
217
224
  'distributionByComplexity': json['distributionByComplexity'] == null ? undefined : json['distributionByComplexity'],
225
+ 'complexityDistribution': json['complexityDistribution'] == null ? undefined : (mapValues(json['complexityDistribution'], DiskSizeTierSummaryFromJSON)),
218
226
  'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
219
227
  'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
220
228
  'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
@@ -249,6 +257,7 @@ export function VMsToJSONTyped(value?: VMs | null, ignoreDiscriminator: boolean
249
257
  'distributionByMemoryTier': value['distributionByMemoryTier'],
250
258
  'distributionByNicCount': value['distributionByNicCount'],
251
259
  'distributionByComplexity': value['distributionByComplexity'],
260
+ 'complexityDistribution': value['complexityDistribution'] == null ? undefined : (mapValues(value['complexityDistribution'], DiskSizeTierSummaryToJSON)),
252
261
  'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
253
262
  'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
254
263
  'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
@@ -49,7 +49,7 @@ export const VmInspectionStatusStateEnum = {
49
49
  VmInspectionStatusStateCompleted: 'completed',
50
50
  VmInspectionStatusStateCanceled: 'canceled',
51
51
  VmInspectionStatusStateError: 'error',
52
- VmInspectionStatusStateNotFound: 'not_found'
52
+ VmInspectionStatusStateNotStarted: 'not_started'
53
53
  } as const;
54
54
  export type VmInspectionStatusStateEnum = typeof VmInspectionStatusStateEnum[keyof typeof VmInspectionStatusStateEnum];
55
55