@openshift-migration-advisor/agent-sdk 0.12.0-a3d6bdc8bce2 → 0.12.0-b4cc95d9b3d0

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.12.0-a3d6bdc8bce2
1
+ # @openshift-migration-advisor/agent-sdk@0.12.0-b4cc95d9b3d0
2
2
 
3
3
  A TypeScript SDK client for the raw.githubusercontent.com API.
4
4
 
@@ -55,6 +55,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
55
55
  *DefaultApi* | [**deleteGroup**](docs/DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group
56
56
  *DefaultApi* | [**deleteLabelGlobally**](docs/DefaultApi.md#deletelabelglobally) | **DELETE** /vms/labels/{label} | Delete label from all VMs
57
57
  *DefaultApi* | [**getAgentStatus**](docs/DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status
58
+ *DefaultApi* | [**getClusterUtilization**](docs/DefaultApi.md#getclusterutilization) | **GET** /clusters/{cluster_id}/utilization | Get latest cluster utilization by cluster ID
58
59
  *DefaultApi* | [**getCollectorStatus**](docs/DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status
59
60
  *DefaultApi* | [**getForecasterDatastores**](docs/DefaultApi.md#getforecasterdatastores) | **POST** /forecaster/datastores | List available datastores
60
61
  *DefaultApi* | [**getForecasterRuns**](docs/DefaultApi.md#getforecasterruns) | **GET** /forecaster/runs | List benchmark runs
@@ -182,7 +183,7 @@ and is automatically generated by the
182
183
  [OpenAPI Generator](https://openapi-generator.tech) project:
183
184
 
184
185
  - API version: `v1`
185
- - Package version: `0.12.0-a3d6bdc8bce2`
186
+ - Package version: `0.12.0-b4cc95d9b3d0`
186
187
  - Generator version: `7.23.0-SNAPSHOT`
187
188
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
188
189
 
@@ -61,6 +61,9 @@ export interface DeleteGroupRequest {
61
61
  export interface DeleteLabelGloballyRequest {
62
62
  label: string;
63
63
  }
64
+ export interface GetClusterUtilizationRequest {
65
+ clusterId: string;
66
+ }
64
67
  export interface GetForecasterDatastoresRequest {
65
68
  forecasterDatastoresRequest?: ForecasterDatastoresRequest;
66
69
  }
@@ -268,6 +271,26 @@ export interface DefaultApiInterface {
268
271
  * Get agent status
269
272
  */
270
273
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
274
+ /**
275
+ * Creates request options for getClusterUtilization without sending the request
276
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
277
+ * @throws {RequiredError}
278
+ * @memberof DefaultApiInterface
279
+ */
280
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
281
+ /**
282
+ *
283
+ * @summary Get latest cluster utilization by cluster ID
284
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
285
+ * @param {*} [options] Override http request option.
286
+ * @throws {RequiredError}
287
+ * @memberof DefaultApiInterface
288
+ */
289
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
290
+ /**
291
+ * Get latest cluster utilization by cluster ID
292
+ */
293
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
271
294
  /**
272
295
  * Creates request options for getCollectorStatus without sending the request
273
296
  * @throws {RequiredError}
@@ -1138,6 +1161,18 @@ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInt
1138
1161
  * Get agent status
1139
1162
  */
1140
1163
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
1164
+ /**
1165
+ * Creates request options for getClusterUtilization without sending the request
1166
+ */
1167
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
1168
+ /**
1169
+ * Get latest cluster utilization by cluster ID
1170
+ */
1171
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
1172
+ /**
1173
+ * Get latest cluster utilization by cluster ID
1174
+ */
1175
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
1141
1176
  /**
1142
1177
  * Creates request options for getCollectorStatus without sending the request
1143
1178
  */
@@ -257,6 +257,45 @@ class DefaultApi extends runtime.BaseAPI {
257
257
  return yield response.value();
258
258
  });
259
259
  }
260
+ /**
261
+ * Creates request options for getClusterUtilization without sending the request
262
+ */
263
+ getClusterUtilizationRequestOpts(requestParameters) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ if (requestParameters['clusterId'] == null) {
266
+ throw new runtime.RequiredError('clusterId', 'Required parameter "clusterId" was null or undefined when calling getClusterUtilization().');
267
+ }
268
+ const queryParameters = {};
269
+ const headerParameters = {};
270
+ let urlPath = `/clusters/{cluster_id}/utilization`;
271
+ urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
272
+ return {
273
+ path: urlPath,
274
+ method: 'GET',
275
+ headers: headerParameters,
276
+ query: queryParameters,
277
+ };
278
+ });
279
+ }
280
+ /**
281
+ * Get latest cluster utilization by cluster ID
282
+ */
283
+ getClusterUtilizationRaw(requestParameters, initOverrides) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const requestOptions = yield this.getClusterUtilizationRequestOpts(requestParameters);
286
+ const response = yield this.request(requestOptions, initOverrides);
287
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, RightsizingClusterResponse_js_1.RightsizingClusterResponseFromJSON)(jsonValue));
288
+ });
289
+ }
290
+ /**
291
+ * Get latest cluster utilization by cluster ID
292
+ */
293
+ getClusterUtilization(requestParameters, initOverrides) {
294
+ return __awaiter(this, void 0, void 0, function* () {
295
+ const response = yield this.getClusterUtilizationRaw(requestParameters, initOverrides);
296
+ return yield response.value();
297
+ });
298
+ }
260
299
  /**
261
300
  * Creates request options for getCollectorStatus without sending the request
262
301
  */
@@ -61,6 +61,9 @@ export interface DeleteGroupRequest {
61
61
  export interface DeleteLabelGloballyRequest {
62
62
  label: string;
63
63
  }
64
+ export interface GetClusterUtilizationRequest {
65
+ clusterId: string;
66
+ }
64
67
  export interface GetForecasterDatastoresRequest {
65
68
  forecasterDatastoresRequest?: ForecasterDatastoresRequest;
66
69
  }
@@ -268,6 +271,26 @@ export interface DefaultApiInterface {
268
271
  * Get agent status
269
272
  */
270
273
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
274
+ /**
275
+ * Creates request options for getClusterUtilization without sending the request
276
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
277
+ * @throws {RequiredError}
278
+ * @memberof DefaultApiInterface
279
+ */
280
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
281
+ /**
282
+ *
283
+ * @summary Get latest cluster utilization by cluster ID
284
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
285
+ * @param {*} [options] Override http request option.
286
+ * @throws {RequiredError}
287
+ * @memberof DefaultApiInterface
288
+ */
289
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
290
+ /**
291
+ * Get latest cluster utilization by cluster ID
292
+ */
293
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
271
294
  /**
272
295
  * Creates request options for getCollectorStatus without sending the request
273
296
  * @throws {RequiredError}
@@ -1138,6 +1161,18 @@ export declare class DefaultApi extends runtime.BaseAPI implements DefaultApiInt
1138
1161
  * Get agent status
1139
1162
  */
1140
1163
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
1164
+ /**
1165
+ * Creates request options for getClusterUtilization without sending the request
1166
+ */
1167
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
1168
+ /**
1169
+ * Get latest cluster utilization by cluster ID
1170
+ */
1171
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
1172
+ /**
1173
+ * Get latest cluster utilization by cluster ID
1174
+ */
1175
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
1141
1176
  /**
1142
1177
  * Creates request options for getCollectorStatus without sending the request
1143
1178
  */
@@ -254,6 +254,45 @@ export class DefaultApi extends runtime.BaseAPI {
254
254
  return yield response.value();
255
255
  });
256
256
  }
257
+ /**
258
+ * Creates request options for getClusterUtilization without sending the request
259
+ */
260
+ getClusterUtilizationRequestOpts(requestParameters) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ if (requestParameters['clusterId'] == null) {
263
+ throw new runtime.RequiredError('clusterId', 'Required parameter "clusterId" was null or undefined when calling getClusterUtilization().');
264
+ }
265
+ const queryParameters = {};
266
+ const headerParameters = {};
267
+ let urlPath = `/clusters/{cluster_id}/utilization`;
268
+ urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
269
+ return {
270
+ path: urlPath,
271
+ method: 'GET',
272
+ headers: headerParameters,
273
+ query: queryParameters,
274
+ };
275
+ });
276
+ }
277
+ /**
278
+ * Get latest cluster utilization by cluster ID
279
+ */
280
+ getClusterUtilizationRaw(requestParameters, initOverrides) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ const requestOptions = yield this.getClusterUtilizationRequestOpts(requestParameters);
283
+ const response = yield this.request(requestOptions, initOverrides);
284
+ return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingClusterResponseFromJSON(jsonValue));
285
+ });
286
+ }
287
+ /**
288
+ * Get latest cluster utilization by cluster ID
289
+ */
290
+ getClusterUtilization(requestParameters, initOverrides) {
291
+ return __awaiter(this, void 0, void 0, function* () {
292
+ const response = yield this.getClusterUtilizationRaw(requestParameters, initOverrides);
293
+ return yield response.value();
294
+ });
295
+ }
257
296
  /**
258
297
  * Creates request options for getCollectorStatus without sending the request
259
298
  */
@@ -33,6 +33,18 @@ export interface VMNIC {
33
33
  * @memberof VMNIC
34
34
  */
35
35
  index?: number;
36
+ /**
37
+ * IPv4 address of this NIC as reported by VMware Tools
38
+ * @type {string}
39
+ * @memberof VMNIC
40
+ */
41
+ ipv4Address?: string;
42
+ /**
43
+ * IPv6 address of this NIC as reported by VMware Tools
44
+ * @type {string}
45
+ * @memberof VMNIC
46
+ */
47
+ ipv6Address?: string;
36
48
  }
37
49
  /**
38
50
  * Check if a given object implements the VMNIC interface.
@@ -28,6 +28,8 @@ export function VMNICFromJSONTyped(json, ignoreDiscriminator) {
28
28
  'mac': json['mac'] == null ? undefined : json['mac'],
29
29
  'network': json['network'] == null ? undefined : json['network'],
30
30
  'index': json['index'] == null ? undefined : json['index'],
31
+ 'ipv4Address': json['ipv4Address'] == null ? undefined : json['ipv4Address'],
32
+ 'ipv6Address': json['ipv6Address'] == null ? undefined : json['ipv6Address'],
31
33
  };
32
34
  }
33
35
  export function VMNICToJSON(json) {
@@ -41,5 +43,7 @@ export function VMNICToJSONTyped(value, ignoreDiscriminator = false) {
41
43
  'mac': value['mac'],
42
44
  'network': value['network'],
43
45
  'index': value['index'],
46
+ 'ipv4Address': value['ipv4Address'],
47
+ 'ipv6Address': value['ipv6Address'],
44
48
  };
45
49
  }
@@ -118,6 +118,18 @@ export interface VirtualMachine {
118
118
  * @memberof VirtualMachine
119
119
  */
120
120
  utilization_mem_p95?: number;
121
+ /**
122
+ * CPU utilization at max (%); absent when no utilization data
123
+ * @type {number}
124
+ * @memberof VirtualMachine
125
+ */
126
+ utilization_cpu_max?: number;
127
+ /**
128
+ * Memory utilization at max (%); absent when no utilization data
129
+ * @type {number}
130
+ * @memberof VirtualMachine
131
+ */
132
+ utilization_mem_max?: number;
121
133
  /**
122
134
  * Disk utilization (%); absent when no utilization data
123
135
  * @type {number}
@@ -59,6 +59,8 @@ export function VirtualMachineFromJSONTyped(json, ignoreDiscriminator) {
59
59
  'labels': json['labels'] == null ? undefined : json['labels'],
60
60
  'utilization_cpu_p95': json['utilization_cpu_p95'] == null ? undefined : json['utilization_cpu_p95'],
61
61
  'utilization_mem_p95': json['utilization_mem_p95'] == null ? undefined : json['utilization_mem_p95'],
62
+ 'utilization_cpu_max': json['utilization_cpu_max'] == null ? undefined : json['utilization_cpu_max'],
63
+ 'utilization_mem_max': json['utilization_mem_max'] == null ? undefined : json['utilization_mem_max'],
62
64
  'utilization_disk': json['utilization_disk'] == null ? undefined : json['utilization_disk'],
63
65
  'utilization_confidence': json['utilization_confidence'] == null ? undefined : json['utilization_confidence'],
64
66
  };
@@ -88,6 +90,8 @@ export function VirtualMachineToJSONTyped(value, ignoreDiscriminator = false) {
88
90
  'labels': value['labels'],
89
91
  'utilization_cpu_p95': value['utilization_cpu_p95'],
90
92
  'utilization_mem_p95': value['utilization_mem_p95'],
93
+ 'utilization_cpu_max': value['utilization_cpu_max'],
94
+ 'utilization_mem_max': value['utilization_mem_max'],
91
95
  'utilization_disk': value['utilization_disk'],
92
96
  'utilization_confidence': value['utilization_confidence'],
93
97
  };
@@ -33,6 +33,18 @@ export interface VMNIC {
33
33
  * @memberof VMNIC
34
34
  */
35
35
  index?: number;
36
+ /**
37
+ * IPv4 address of this NIC as reported by VMware Tools
38
+ * @type {string}
39
+ * @memberof VMNIC
40
+ */
41
+ ipv4Address?: string;
42
+ /**
43
+ * IPv6 address of this NIC as reported by VMware Tools
44
+ * @type {string}
45
+ * @memberof VMNIC
46
+ */
47
+ ipv6Address?: string;
36
48
  }
37
49
  /**
38
50
  * Check if a given object implements the VMNIC interface.
@@ -35,6 +35,8 @@ function VMNICFromJSONTyped(json, ignoreDiscriminator) {
35
35
  'mac': json['mac'] == null ? undefined : json['mac'],
36
36
  'network': json['network'] == null ? undefined : json['network'],
37
37
  'index': json['index'] == null ? undefined : json['index'],
38
+ 'ipv4Address': json['ipv4Address'] == null ? undefined : json['ipv4Address'],
39
+ 'ipv6Address': json['ipv6Address'] == null ? undefined : json['ipv6Address'],
38
40
  };
39
41
  }
40
42
  function VMNICToJSON(json) {
@@ -48,5 +50,7 @@ function VMNICToJSONTyped(value, ignoreDiscriminator = false) {
48
50
  'mac': value['mac'],
49
51
  'network': value['network'],
50
52
  'index': value['index'],
53
+ 'ipv4Address': value['ipv4Address'],
54
+ 'ipv6Address': value['ipv6Address'],
51
55
  };
52
56
  }
@@ -118,6 +118,18 @@ export interface VirtualMachine {
118
118
  * @memberof VirtualMachine
119
119
  */
120
120
  utilization_mem_p95?: number;
121
+ /**
122
+ * CPU utilization at max (%); absent when no utilization data
123
+ * @type {number}
124
+ * @memberof VirtualMachine
125
+ */
126
+ utilization_cpu_max?: number;
127
+ /**
128
+ * Memory utilization at max (%); absent when no utilization data
129
+ * @type {number}
130
+ * @memberof VirtualMachine
131
+ */
132
+ utilization_mem_max?: number;
121
133
  /**
122
134
  * Disk utilization (%); absent when no utilization data
123
135
  * @type {number}
@@ -66,6 +66,8 @@ function VirtualMachineFromJSONTyped(json, ignoreDiscriminator) {
66
66
  'labels': json['labels'] == null ? undefined : json['labels'],
67
67
  'utilization_cpu_p95': json['utilization_cpu_p95'] == null ? undefined : json['utilization_cpu_p95'],
68
68
  'utilization_mem_p95': json['utilization_mem_p95'] == null ? undefined : json['utilization_mem_p95'],
69
+ 'utilization_cpu_max': json['utilization_cpu_max'] == null ? undefined : json['utilization_cpu_max'],
70
+ 'utilization_mem_max': json['utilization_mem_max'] == null ? undefined : json['utilization_mem_max'],
69
71
  'utilization_disk': json['utilization_disk'] == null ? undefined : json['utilization_disk'],
70
72
  'utilization_confidence': json['utilization_confidence'] == null ? undefined : json['utilization_confidence'],
71
73
  };
@@ -95,6 +97,8 @@ function VirtualMachineToJSONTyped(value, ignoreDiscriminator = false) {
95
97
  'labels': value['labels'],
96
98
  'utilization_cpu_p95': value['utilization_cpu_p95'],
97
99
  'utilization_mem_p95': value['utilization_mem_p95'],
100
+ 'utilization_cpu_max': value['utilization_cpu_max'],
101
+ 'utilization_mem_max': value['utilization_mem_max'],
98
102
  'utilization_disk': value['utilization_disk'],
99
103
  'utilization_confidence': value['utilization_confidence'],
100
104
  };
@@ -9,6 +9,7 @@ All URIs are relative to *https://raw.githubusercontent.com/api/v1*
9
9
  | [**deleteGroup**](DefaultApi.md#deletegroup) | **DELETE** /groups/{id} | Delete group |
10
10
  | [**deleteLabelGlobally**](DefaultApi.md#deletelabelglobally) | **DELETE** /vms/labels/{label} | Delete label from all VMs |
11
11
  | [**getAgentStatus**](DefaultApi.md#getagentstatus) | **GET** /agent | Get agent status |
12
+ | [**getClusterUtilization**](DefaultApi.md#getclusterutilization) | **GET** /clusters/{cluster_id}/utilization | Get latest cluster utilization by cluster ID |
12
13
  | [**getCollectorStatus**](DefaultApi.md#getcollectorstatus) | **GET** /collector | Get collector status |
13
14
  | [**getForecasterDatastores**](DefaultApi.md#getforecasterdatastores) | **POST** /forecaster/datastores | List available datastores |
14
15
  | [**getForecasterRuns**](DefaultApi.md#getforecasterruns) | **GET** /forecaster/runs | List benchmark runs |
@@ -377,6 +378,74 @@ No authorization required
377
378
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
378
379
 
379
380
 
381
+ ## getClusterUtilization
382
+
383
+ > RightsizingClusterResponse getClusterUtilization(clusterId)
384
+
385
+ Get latest cluster utilization by cluster ID
386
+
387
+ ### Example
388
+
389
+ ```ts
390
+ import {
391
+ Configuration,
392
+ DefaultApi,
393
+ } from '@openshift-migration-advisor/agent-sdk';
394
+ import type { GetClusterUtilizationRequest } from '@openshift-migration-advisor/agent-sdk';
395
+
396
+ async function example() {
397
+ console.log("🚀 Testing @openshift-migration-advisor/agent-sdk SDK...");
398
+ const api = new DefaultApi();
399
+
400
+ const body = {
401
+ // string | vSphere MoRef (e.g. \"domain-c123\") or generated cluster ID (e.g. \"cluster-a3f7b2c1d4e89012\")
402
+ clusterId: clusterId_example,
403
+ } satisfies GetClusterUtilizationRequest;
404
+
405
+ try {
406
+ const data = await api.getClusterUtilization(body);
407
+ console.log(data);
408
+ } catch (error) {
409
+ console.error(error);
410
+ }
411
+ }
412
+
413
+ // Run the test
414
+ example().catch(console.error);
415
+ ```
416
+
417
+ ### Parameters
418
+
419
+
420
+ | Name | Type | Description | Notes |
421
+ |------------- | ------------- | ------------- | -------------|
422
+ | **clusterId** | `string` | vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;) | [Defaults to `undefined`] |
423
+
424
+ ### Return type
425
+
426
+ [**RightsizingClusterResponse**](RightsizingClusterResponse.md)
427
+
428
+ ### Authorization
429
+
430
+ No authorization required
431
+
432
+ ### HTTP request headers
433
+
434
+ - **Content-Type**: Not defined
435
+ - **Accept**: `application/json`
436
+
437
+
438
+ ### HTTP response details
439
+ | Status code | Description | Response headers |
440
+ |-------------|-------------|------------------|
441
+ | **200** | Cluster utilization data from the latest completed rightsizing report | - |
442
+ | **400** | Invalid cluster_id format | - |
443
+ | **404** | No completed rightsizing report found, or cluster not found in report | - |
444
+ | **500** | Internal server error | - |
445
+
446
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
447
+
448
+
380
449
  ## getCollectorStatus
381
450
 
382
451
  > CollectorStatus getCollectorStatus()
package/docs/VMNIC.md CHANGED
@@ -9,6 +9,8 @@ Name | Type
9
9
  `mac` | string
10
10
  `network` | string
11
11
  `index` | number
12
+ `ipv4Address` | string
13
+ `ipv6Address` | string
12
14
 
13
15
  ## Example
14
16
 
@@ -20,6 +22,8 @@ const example = {
20
22
  "mac": null,
21
23
  "network": null,
22
24
  "index": null,
25
+ "ipv4Address": null,
26
+ "ipv6Address": null,
23
27
  } satisfies VMNIC
24
28
 
25
29
  console.log(example)
@@ -23,6 +23,8 @@ Name | Type
23
23
  `labels` | Array&lt;string&gt;
24
24
  `utilization_cpu_p95` | number
25
25
  `utilization_mem_p95` | number
26
+ `utilization_cpu_max` | number
27
+ `utilization_mem_max` | number
26
28
  `utilization_disk` | number
27
29
  `utilization_confidence` | number
28
30
 
@@ -50,6 +52,8 @@ const example = {
50
52
  "labels": null,
51
53
  "utilization_cpu_p95": null,
52
54
  "utilization_mem_p95": null,
55
+ "utilization_cpu_max": null,
56
+ "utilization_mem_max": null,
53
57
  "utilization_disk": null,
54
58
  "utilization_confidence": null,
55
59
  } satisfies VirtualMachine
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openshift-migration-advisor/agent-sdk",
3
- "version": "0.12.0-a3d6bdc8bce2",
3
+ "version": "0.12.0-b4cc95d9b3d0",
4
4
  "description": "OpenAPI client for @openshift-migration-advisor/agent-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -230,6 +230,10 @@ export interface DeleteLabelGloballyRequest {
230
230
  label: string;
231
231
  }
232
232
 
233
+ export interface GetClusterUtilizationRequest {
234
+ clusterId: string;
235
+ }
236
+
233
237
  export interface GetForecasterDatastoresRequest {
234
238
  forecasterDatastoresRequest?: ForecasterDatastoresRequest;
235
239
  }
@@ -481,6 +485,29 @@ export interface DefaultApiInterface {
481
485
  */
482
486
  getAgentStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentStatus>;
483
487
 
488
+ /**
489
+ * Creates request options for getClusterUtilization without sending the request
490
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
491
+ * @throws {RequiredError}
492
+ * @memberof DefaultApiInterface
493
+ */
494
+ getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts>;
495
+
496
+ /**
497
+ *
498
+ * @summary Get latest cluster utilization by cluster ID
499
+ * @param {string} clusterId vSphere MoRef (e.g. \&quot;domain-c123\&quot;) or generated cluster ID (e.g. \&quot;cluster-a3f7b2c1d4e89012\&quot;)
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ * @memberof DefaultApiInterface
503
+ */
504
+ getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>>;
505
+
506
+ /**
507
+ * Get latest cluster utilization by cluster ID
508
+ */
509
+ getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse>;
510
+
484
511
  /**
485
512
  * Creates request options for getCollectorStatus without sending the request
486
513
  * @throws {RequiredError}
@@ -1627,6 +1654,51 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
1627
1654
  return await response.value();
1628
1655
  }
1629
1656
 
1657
+ /**
1658
+ * Creates request options for getClusterUtilization without sending the request
1659
+ */
1660
+ async getClusterUtilizationRequestOpts(requestParameters: GetClusterUtilizationRequest): Promise<runtime.RequestOpts> {
1661
+ if (requestParameters['clusterId'] == null) {
1662
+ throw new runtime.RequiredError(
1663
+ 'clusterId',
1664
+ 'Required parameter "clusterId" was null or undefined when calling getClusterUtilization().'
1665
+ );
1666
+ }
1667
+
1668
+ const queryParameters: any = {};
1669
+
1670
+ const headerParameters: runtime.HTTPHeaders = {};
1671
+
1672
+
1673
+ let urlPath = `/clusters/{cluster_id}/utilization`;
1674
+ urlPath = urlPath.replace('{cluster_id}', encodeURIComponent(String(requestParameters['clusterId'])));
1675
+
1676
+ return {
1677
+ path: urlPath,
1678
+ method: 'GET',
1679
+ headers: headerParameters,
1680
+ query: queryParameters,
1681
+ };
1682
+ }
1683
+
1684
+ /**
1685
+ * Get latest cluster utilization by cluster ID
1686
+ */
1687
+ async getClusterUtilizationRaw(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RightsizingClusterResponse>> {
1688
+ const requestOptions = await this.getClusterUtilizationRequestOpts(requestParameters);
1689
+ const response = await this.request(requestOptions, initOverrides);
1690
+
1691
+ return new runtime.JSONApiResponse(response, (jsonValue) => RightsizingClusterResponseFromJSON(jsonValue));
1692
+ }
1693
+
1694
+ /**
1695
+ * Get latest cluster utilization by cluster ID
1696
+ */
1697
+ async getClusterUtilization(requestParameters: GetClusterUtilizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RightsizingClusterResponse> {
1698
+ const response = await this.getClusterUtilizationRaw(requestParameters, initOverrides);
1699
+ return await response.value();
1700
+ }
1701
+
1630
1702
  /**
1631
1703
  * Creates request options for getCollectorStatus without sending the request
1632
1704
  */
@@ -37,6 +37,18 @@ export interface VMNIC {
37
37
  * @memberof VMNIC
38
38
  */
39
39
  index?: number;
40
+ /**
41
+ * IPv4 address of this NIC as reported by VMware Tools
42
+ * @type {string}
43
+ * @memberof VMNIC
44
+ */
45
+ ipv4Address?: string;
46
+ /**
47
+ * IPv6 address of this NIC as reported by VMware Tools
48
+ * @type {string}
49
+ * @memberof VMNIC
50
+ */
51
+ ipv6Address?: string;
40
52
  }
41
53
 
42
54
  /**
@@ -59,6 +71,8 @@ export function VMNICFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMN
59
71
  'mac': json['mac'] == null ? undefined : json['mac'],
60
72
  'network': json['network'] == null ? undefined : json['network'],
61
73
  'index': json['index'] == null ? undefined : json['index'],
74
+ 'ipv4Address': json['ipv4Address'] == null ? undefined : json['ipv4Address'],
75
+ 'ipv6Address': json['ipv6Address'] == null ? undefined : json['ipv6Address'],
62
76
  };
63
77
  }
64
78
 
@@ -76,6 +90,8 @@ export function VMNICToJSONTyped(value?: VMNIC | null, ignoreDiscriminator: bool
76
90
  'mac': value['mac'],
77
91
  'network': value['network'],
78
92
  'index': value['index'],
93
+ 'ipv4Address': value['ipv4Address'],
94
+ 'ipv6Address': value['ipv6Address'],
79
95
  };
80
96
  }
81
97
 
@@ -129,6 +129,18 @@ export interface VirtualMachine {
129
129
  * @memberof VirtualMachine
130
130
  */
131
131
  utilization_mem_p95?: number;
132
+ /**
133
+ * CPU utilization at max (%); absent when no utilization data
134
+ * @type {number}
135
+ * @memberof VirtualMachine
136
+ */
137
+ utilization_cpu_max?: number;
138
+ /**
139
+ * Memory utilization at max (%); absent when no utilization data
140
+ * @type {number}
141
+ * @memberof VirtualMachine
142
+ */
143
+ utilization_mem_max?: number;
132
144
  /**
133
145
  * Disk utilization (%); absent when no utilization data
134
146
  * @type {number}
@@ -185,6 +197,8 @@ export function VirtualMachineFromJSONTyped(json: any, ignoreDiscriminator: bool
185
197
  'labels': json['labels'] == null ? undefined : json['labels'],
186
198
  'utilization_cpu_p95': json['utilization_cpu_p95'] == null ? undefined : json['utilization_cpu_p95'],
187
199
  'utilization_mem_p95': json['utilization_mem_p95'] == null ? undefined : json['utilization_mem_p95'],
200
+ 'utilization_cpu_max': json['utilization_cpu_max'] == null ? undefined : json['utilization_cpu_max'],
201
+ 'utilization_mem_max': json['utilization_mem_max'] == null ? undefined : json['utilization_mem_max'],
188
202
  'utilization_disk': json['utilization_disk'] == null ? undefined : json['utilization_disk'],
189
203
  'utilization_confidence': json['utilization_confidence'] == null ? undefined : json['utilization_confidence'],
190
204
  };
@@ -218,6 +232,8 @@ export function VirtualMachineToJSONTyped(value?: VirtualMachine | null, ignoreD
218
232
  'labels': value['labels'],
219
233
  'utilization_cpu_p95': value['utilization_cpu_p95'],
220
234
  'utilization_mem_p95': value['utilization_mem_p95'],
235
+ 'utilization_cpu_max': value['utilization_cpu_max'],
236
+ 'utilization_mem_max': value['utilization_mem_max'],
221
237
  'utilization_disk': value['utilization_disk'],
222
238
  'utilization_confidence': value['utilization_confidence'],
223
239
  };