@migration-planner-ui/api-client 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +7 -3
- package/dist/apis/ImageApi.d.ts +0 -23
- package/dist/apis/ImageApi.js +0 -28
- package/dist/apis/SourceApi.d.ts +26 -1
- package/dist/apis/SourceApi.js +51 -1
- package/dist/apis/index.d.ts +1 -1
- package/dist/models/AgentProxy.d.ts +3 -3
- package/dist/models/Datastore.d.ts +12 -0
- package/dist/models/Datastore.js +8 -0
- package/dist/models/Histogram.d.ts +43 -0
- package/dist/models/Histogram.js +48 -0
- package/dist/models/Host.d.ts +37 -0
- package/dist/models/Host.js +44 -0
- package/dist/models/Infra.d.ts +22 -3
- package/dist/models/Infra.js +16 -3
- package/dist/models/Inventory.js +9 -6
- package/dist/models/Label.d.ts +37 -0
- package/dist/models/Label.js +44 -0
- package/dist/models/MigrationIssue.d.ts +49 -0
- package/dist/models/MigrationIssue.js +50 -0
- package/dist/models/Network.d.ts +59 -0
- package/dist/models/Network.js +57 -0
- package/dist/models/OsInfo.d.ts +37 -0
- package/dist/models/OsInfo.js +44 -0
- package/dist/models/Source.d.ts +7 -0
- package/dist/models/Source.js +3 -0
- package/dist/models/SourceCreate.d.ts +2 -2
- package/dist/models/UploadRvtoolsFile200Response.d.ts +31 -0
- package/dist/models/UploadRvtoolsFile200Response.js +38 -0
- package/dist/models/VMResourceBreakdown.d.ts +3 -3
- package/dist/models/VMResourceBreakdown.js +3 -3
- package/dist/models/VMs.d.ts +15 -5
- package/dist/models/VMs.js +18 -13
- package/dist/models/index.d.ts +10 -6
- package/dist/models/index.js +10 -6
- package/package.json +1 -1
- package/src/apis/ImageApi.ts +0 -51
- package/src/apis/SourceApi.ts +84 -0
- package/src/apis/index.ts +0 -1
- package/src/models/AgentProxy.ts +3 -3
- package/src/models/Datastore.ts +18 -0
- package/src/models/Histogram.ts +79 -0
- package/src/models/Host.ts +70 -0
- package/src/models/Infra.ts +42 -9
- package/src/models/Inventory.ts +6 -6
- package/src/models/Label.ts +70 -0
- package/src/models/MigrationIssue.ts +87 -0
- package/src/models/Network.ts +99 -0
- package/src/models/OsInfo.ts +70 -0
- package/src/models/Source.ts +14 -0
- package/src/models/SourceCreate.ts +2 -2
- package/src/models/UploadRvtoolsFile200Response.ts +60 -0
- package/src/models/VMResourceBreakdown.ts +9 -9
- package/src/models/VMs.ts +36 -21
- package/src/models/index.ts +10 -6
- package/dist/apis/UiEventsApi.d.ts +0 -49
- package/dist/apis/UiEventsApi.js +0 -59
- package/src/apis/UiEventsApi.ts +0 -96
package/dist/models/index.js
CHANGED
|
@@ -3,20 +3,24 @@
|
|
|
3
3
|
export * from './Agent';
|
|
4
4
|
export * from './AgentProxy';
|
|
5
5
|
export * from './Datastore';
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
6
|
+
export * from './Histogram';
|
|
7
|
+
export * from './Host';
|
|
8
8
|
export * from './Infra';
|
|
9
|
-
export * from './InfraDatastoresInner';
|
|
10
|
-
export * from './InfraNetworksInner';
|
|
11
9
|
export * from './Inventory';
|
|
12
|
-
export * from './
|
|
10
|
+
export * from './Label';
|
|
11
|
+
export * from './MigrationIssue';
|
|
13
12
|
export * from './ModelError';
|
|
13
|
+
export * from './Network';
|
|
14
|
+
export * from './OsInfo';
|
|
14
15
|
export * from './PresignedUrl';
|
|
15
16
|
export * from './Source';
|
|
16
17
|
export * from './SourceCreate';
|
|
17
18
|
export * from './SourceUpdateOnPrem';
|
|
18
19
|
export * from './Status';
|
|
20
|
+
export * from './UploadRvtoolsFile200Response';
|
|
19
21
|
export * from './VCenter';
|
|
20
22
|
export * from './VMResourceBreakdown';
|
|
21
|
-
export * from './VMResourceBreakdownHistogram';
|
|
22
23
|
export * from './VMs';
|
|
24
|
+
export * from './InfraDatastoresInner';
|
|
25
|
+
export * from './InfraNetworksInner';
|
|
26
|
+
export * from './MigrationIssuesInner';
|
package/package.json
CHANGED
package/src/apis/ImageApi.ts
CHANGED
|
@@ -22,10 +22,6 @@ import {
|
|
|
22
22
|
PresignedUrlToJSON,
|
|
23
23
|
} from '../models/index';
|
|
24
24
|
|
|
25
|
-
export interface GetImageRequest {
|
|
26
|
-
id: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
25
|
export interface GetSourceDownloadURLRequest {
|
|
30
26
|
id: string;
|
|
31
27
|
}
|
|
@@ -41,20 +37,6 @@ export interface HeadImageRequest {
|
|
|
41
37
|
* @interface ImageApiInterface
|
|
42
38
|
*/
|
|
43
39
|
export interface ImageApiInterface {
|
|
44
|
-
/**
|
|
45
|
-
* Get the OVA image
|
|
46
|
-
* @param {string} id id of the source
|
|
47
|
-
* @param {*} [options] Override http request option.
|
|
48
|
-
* @throws {RequiredError}
|
|
49
|
-
* @memberof ImageApiInterface
|
|
50
|
-
*/
|
|
51
|
-
getImageRaw(requestParameters: GetImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Get the OVA image
|
|
55
|
-
*/
|
|
56
|
-
getImage(requestParameters: GetImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
57
|
-
|
|
58
40
|
/**
|
|
59
41
|
* Get the OVA image via URL
|
|
60
42
|
* @param {string} id Source id
|
|
@@ -90,39 +72,6 @@ export interface ImageApiInterface {
|
|
|
90
72
|
*/
|
|
91
73
|
export class ImageApi extends runtime.BaseAPI implements ImageApiInterface {
|
|
92
74
|
|
|
93
|
-
/**
|
|
94
|
-
* Get the OVA image
|
|
95
|
-
*/
|
|
96
|
-
async getImageRaw(requestParameters: GetImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
97
|
-
if (requestParameters['id'] == null) {
|
|
98
|
-
throw new runtime.RequiredError(
|
|
99
|
-
'id',
|
|
100
|
-
'Required parameter "id" was null or undefined when calling getImage().'
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const queryParameters: any = {};
|
|
105
|
-
|
|
106
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
|
-
|
|
108
|
-
const response = await this.request({
|
|
109
|
-
path: `/api/v1/sources/{id}/image`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
110
|
-
method: 'GET',
|
|
111
|
-
headers: headerParameters,
|
|
112
|
-
query: queryParameters,
|
|
113
|
-
}, initOverrides);
|
|
114
|
-
|
|
115
|
-
return new runtime.BlobApiResponse(response);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Get the OVA image
|
|
120
|
-
*/
|
|
121
|
-
async getImage(requestParameters: GetImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
122
|
-
const response = await this.getImageRaw(requestParameters, initOverrides);
|
|
123
|
-
return await response.value();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
75
|
/**
|
|
127
76
|
* Get the OVA image via URL
|
|
128
77
|
*/
|
package/src/apis/SourceApi.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
SourceCreate,
|
|
20
20
|
SourceUpdateOnPrem,
|
|
21
21
|
Status,
|
|
22
|
+
UploadRvtoolsFile200Response,
|
|
22
23
|
} from '../models/index';
|
|
23
24
|
import {
|
|
24
25
|
SourceFromJSON,
|
|
@@ -29,6 +30,8 @@ import {
|
|
|
29
30
|
SourceUpdateOnPremToJSON,
|
|
30
31
|
StatusFromJSON,
|
|
31
32
|
StatusToJSON,
|
|
33
|
+
UploadRvtoolsFile200ResponseFromJSON,
|
|
34
|
+
UploadRvtoolsFile200ResponseToJSON,
|
|
32
35
|
} from '../models/index';
|
|
33
36
|
|
|
34
37
|
export interface CreateSourceRequest {
|
|
@@ -52,6 +55,11 @@ export interface UpdateSourceRequest {
|
|
|
52
55
|
sourceUpdateOnPrem: SourceUpdateOnPrem;
|
|
53
56
|
}
|
|
54
57
|
|
|
58
|
+
export interface UploadRvtoolsFileRequest {
|
|
59
|
+
id: string;
|
|
60
|
+
file: Blob;
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
/**
|
|
56
64
|
* SourceApi - interface
|
|
57
65
|
*
|
|
@@ -143,6 +151,21 @@ export interface SourceApiInterface {
|
|
|
143
151
|
*/
|
|
144
152
|
updateSource(requestParameters: UpdateSourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Source>;
|
|
145
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Update a source by uploading an RVTools file directly
|
|
156
|
+
* @param {string} id ID of the source
|
|
157
|
+
* @param {Blob} file The RVTools file (Excel)
|
|
158
|
+
* @param {*} [options] Override http request option.
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
* @memberof SourceApiInterface
|
|
161
|
+
*/
|
|
162
|
+
uploadRvtoolsFileRaw(requestParameters: UploadRvtoolsFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadRvtoolsFile200Response>>;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Update a source by uploading an RVTools file directly
|
|
166
|
+
*/
|
|
167
|
+
uploadRvtoolsFile(requestParameters: UploadRvtoolsFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadRvtoolsFile200Response>;
|
|
168
|
+
|
|
146
169
|
}
|
|
147
170
|
|
|
148
171
|
/**
|
|
@@ -351,4 +374,65 @@ export class SourceApi extends runtime.BaseAPI implements SourceApiInterface {
|
|
|
351
374
|
return await response.value();
|
|
352
375
|
}
|
|
353
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Update a source by uploading an RVTools file directly
|
|
379
|
+
*/
|
|
380
|
+
async uploadRvtoolsFileRaw(requestParameters: UploadRvtoolsFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UploadRvtoolsFile200Response>> {
|
|
381
|
+
if (requestParameters['id'] == null) {
|
|
382
|
+
throw new runtime.RequiredError(
|
|
383
|
+
'id',
|
|
384
|
+
'Required parameter "id" was null or undefined when calling uploadRvtoolsFile().'
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if (requestParameters['file'] == null) {
|
|
389
|
+
throw new runtime.RequiredError(
|
|
390
|
+
'file',
|
|
391
|
+
'Required parameter "file" was null or undefined when calling uploadRvtoolsFile().'
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const queryParameters: any = {};
|
|
396
|
+
|
|
397
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
398
|
+
|
|
399
|
+
const consumes: runtime.Consume[] = [
|
|
400
|
+
{ contentType: 'multipart/form-data' },
|
|
401
|
+
];
|
|
402
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
403
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
404
|
+
|
|
405
|
+
let formParams: { append(param: string, value: any): any };
|
|
406
|
+
let useForm = false;
|
|
407
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
408
|
+
useForm = canConsumeForm;
|
|
409
|
+
if (useForm) {
|
|
410
|
+
formParams = new FormData();
|
|
411
|
+
} else {
|
|
412
|
+
formParams = new URLSearchParams();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (requestParameters['file'] != null) {
|
|
416
|
+
formParams.append('file', requestParameters['file'] as any);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const response = await this.request({
|
|
420
|
+
path: `/api/v1/sources/{id}/rvtools`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
421
|
+
method: 'PUT',
|
|
422
|
+
headers: headerParameters,
|
|
423
|
+
query: queryParameters,
|
|
424
|
+
body: formParams,
|
|
425
|
+
}, initOverrides);
|
|
426
|
+
|
|
427
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UploadRvtoolsFile200ResponseFromJSON(jsonValue));
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Update a source by uploading an RVTools file directly
|
|
432
|
+
*/
|
|
433
|
+
async uploadRvtoolsFile(requestParameters: UploadRvtoolsFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UploadRvtoolsFile200Response> {
|
|
434
|
+
const response = await this.uploadRvtoolsFileRaw(requestParameters, initOverrides);
|
|
435
|
+
return await response.value();
|
|
436
|
+
}
|
|
437
|
+
|
|
354
438
|
}
|
package/src/apis/index.ts
CHANGED
package/src/models/AgentProxy.ts
CHANGED
|
@@ -24,19 +24,19 @@ export interface AgentProxy {
|
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof AgentProxy
|
|
26
26
|
*/
|
|
27
|
-
httpUrl?: string;
|
|
27
|
+
httpUrl?: string | null;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof AgentProxy
|
|
32
32
|
*/
|
|
33
|
-
httpsUrl?: string;
|
|
33
|
+
httpsUrl?: string | null;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof AgentProxy
|
|
38
38
|
*/
|
|
39
|
-
noProxy?: string;
|
|
39
|
+
noProxy?: string | null;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
package/src/models/Datastore.ts
CHANGED
|
@@ -55,6 +55,18 @@ export interface Datastore {
|
|
|
55
55
|
* @memberof Datastore
|
|
56
56
|
*/
|
|
57
57
|
hardwareAcceleratedMove: boolean;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof Datastore
|
|
62
|
+
*/
|
|
63
|
+
protocolType: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof Datastore
|
|
68
|
+
*/
|
|
69
|
+
model: string;
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
/**
|
|
@@ -67,6 +79,8 @@ export function instanceOfDatastore(value: object): value is Datastore {
|
|
|
67
79
|
if (!('vendor' in value) || value['vendor'] === undefined) return false;
|
|
68
80
|
if (!('diskId' in value) || value['diskId'] === undefined) return false;
|
|
69
81
|
if (!('hardwareAcceleratedMove' in value) || value['hardwareAcceleratedMove'] === undefined) return false;
|
|
82
|
+
if (!('protocolType' in value) || value['protocolType'] === undefined) return false;
|
|
83
|
+
if (!('model' in value) || value['model'] === undefined) return false;
|
|
70
84
|
return true;
|
|
71
85
|
}
|
|
72
86
|
|
|
@@ -86,6 +100,8 @@ export function DatastoreFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
86
100
|
'vendor': json['vendor'],
|
|
87
101
|
'diskId': json['diskId'],
|
|
88
102
|
'hardwareAcceleratedMove': json['hardwareAcceleratedMove'],
|
|
103
|
+
'protocolType': json['protocolType'],
|
|
104
|
+
'model': json['model'],
|
|
89
105
|
};
|
|
90
106
|
}
|
|
91
107
|
|
|
@@ -101,6 +117,8 @@ export function DatastoreToJSON(value?: Datastore | null): any {
|
|
|
101
117
|
'vendor': value['vendor'],
|
|
102
118
|
'diskId': value['diskId'],
|
|
103
119
|
'hardwareAcceleratedMove': value['hardwareAcceleratedMove'],
|
|
120
|
+
'protocolType': value['protocolType'],
|
|
121
|
+
'model': value['model'],
|
|
104
122
|
};
|
|
105
123
|
}
|
|
106
124
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Migration Planner API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: undefined
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Histogram
|
|
20
|
+
*/
|
|
21
|
+
export interface Histogram {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Histogram
|
|
26
|
+
*/
|
|
27
|
+
minValue: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Histogram
|
|
32
|
+
*/
|
|
33
|
+
step: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<number>}
|
|
37
|
+
* @memberof Histogram
|
|
38
|
+
*/
|
|
39
|
+
data: Array<number>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the Histogram interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfHistogram(value: object): value is Histogram {
|
|
46
|
+
if (!('minValue' in value) || value['minValue'] === undefined) return false;
|
|
47
|
+
if (!('step' in value) || value['step'] === undefined) return false;
|
|
48
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function HistogramFromJSON(json: any): Histogram {
|
|
53
|
+
return HistogramFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function HistogramFromJSONTyped(json: any, ignoreDiscriminator: boolean): Histogram {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'minValue': json['minValue'],
|
|
63
|
+
'step': json['step'],
|
|
64
|
+
'data': json['data'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function HistogramToJSON(value?: Histogram | null): any {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
|
|
74
|
+
'minValue': value['minValue'],
|
|
75
|
+
'step': value['step'],
|
|
76
|
+
'data': value['data'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Migration Planner API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: undefined
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Host
|
|
20
|
+
*/
|
|
21
|
+
export interface Host {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Host
|
|
26
|
+
*/
|
|
27
|
+
vendor: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Host
|
|
32
|
+
*/
|
|
33
|
+
model: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the Host interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfHost(value: object): value is Host {
|
|
40
|
+
if (!('vendor' in value) || value['vendor'] === undefined) return false;
|
|
41
|
+
if (!('model' in value) || value['model'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function HostFromJSON(json: any): Host {
|
|
46
|
+
return HostFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): Host {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'vendor': json['vendor'],
|
|
56
|
+
'model': json['model'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function HostToJSON(value?: Host | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'vendor': value['vendor'],
|
|
67
|
+
'model': value['model'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/src/models/Infra.ts
CHANGED
|
@@ -19,12 +19,18 @@ import {
|
|
|
19
19
|
DatastoreFromJSONTyped,
|
|
20
20
|
DatastoreToJSON,
|
|
21
21
|
} from './Datastore';
|
|
22
|
-
import type {
|
|
22
|
+
import type { Network } from './Network';
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} from './
|
|
24
|
+
NetworkFromJSON,
|
|
25
|
+
NetworkFromJSONTyped,
|
|
26
|
+
NetworkToJSON,
|
|
27
|
+
} from './Network';
|
|
28
|
+
import type { Host } from './Host';
|
|
29
|
+
import {
|
|
30
|
+
HostFromJSON,
|
|
31
|
+
HostFromJSONTyped,
|
|
32
|
+
HostToJSON,
|
|
33
|
+
} from './Host';
|
|
28
34
|
|
|
29
35
|
/**
|
|
30
36
|
*
|
|
@@ -38,12 +44,30 @@ export interface Infra {
|
|
|
38
44
|
* @memberof Infra
|
|
39
45
|
*/
|
|
40
46
|
totalHosts: number;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof Infra
|
|
51
|
+
*/
|
|
52
|
+
totalDatacenters: number;
|
|
41
53
|
/**
|
|
42
54
|
*
|
|
43
55
|
* @type {number}
|
|
44
56
|
* @memberof Infra
|
|
45
57
|
*/
|
|
46
58
|
totalClusters: number;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Array<number>}
|
|
62
|
+
* @memberof Infra
|
|
63
|
+
*/
|
|
64
|
+
clustersPerDatacenter: Array<number>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Array<Host>}
|
|
68
|
+
* @memberof Infra
|
|
69
|
+
*/
|
|
70
|
+
hosts: Array<Host>;
|
|
47
71
|
/**
|
|
48
72
|
*
|
|
49
73
|
* @type {Array<number>}
|
|
@@ -58,10 +82,10 @@ export interface Infra {
|
|
|
58
82
|
hostPowerStates: { [key: string]: number; };
|
|
59
83
|
/**
|
|
60
84
|
*
|
|
61
|
-
* @type {Array<
|
|
85
|
+
* @type {Array<Network>}
|
|
62
86
|
* @memberof Infra
|
|
63
87
|
*/
|
|
64
|
-
networks: Array<
|
|
88
|
+
networks: Array<Network>;
|
|
65
89
|
/**
|
|
66
90
|
*
|
|
67
91
|
* @type {Array<Datastore>}
|
|
@@ -75,7 +99,10 @@ export interface Infra {
|
|
|
75
99
|
*/
|
|
76
100
|
export function instanceOfInfra(value: object): value is Infra {
|
|
77
101
|
if (!('totalHosts' in value) || value['totalHosts'] === undefined) return false;
|
|
102
|
+
if (!('totalDatacenters' in value) || value['totalDatacenters'] === undefined) return false;
|
|
78
103
|
if (!('totalClusters' in value) || value['totalClusters'] === undefined) return false;
|
|
104
|
+
if (!('clustersPerDatacenter' in value) || value['clustersPerDatacenter'] === undefined) return false;
|
|
105
|
+
if (!('hosts' in value) || value['hosts'] === undefined) return false;
|
|
79
106
|
if (!('hostsPerCluster' in value) || value['hostsPerCluster'] === undefined) return false;
|
|
80
107
|
if (!('hostPowerStates' in value) || value['hostPowerStates'] === undefined) return false;
|
|
81
108
|
if (!('networks' in value) || value['networks'] === undefined) return false;
|
|
@@ -94,10 +121,13 @@ export function InfraFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inf
|
|
|
94
121
|
return {
|
|
95
122
|
|
|
96
123
|
'totalHosts': json['totalHosts'],
|
|
124
|
+
'totalDatacenters': json['totalDatacenters'],
|
|
97
125
|
'totalClusters': json['totalClusters'],
|
|
126
|
+
'clustersPerDatacenter': json['clustersPerDatacenter'],
|
|
127
|
+
'hosts': ((json['hosts'] as Array<any>).map(HostFromJSON)),
|
|
98
128
|
'hostsPerCluster': json['hostsPerCluster'],
|
|
99
129
|
'hostPowerStates': json['hostPowerStates'],
|
|
100
|
-
'networks': ((json['networks'] as Array<any>).map(
|
|
130
|
+
'networks': ((json['networks'] as Array<any>).map(NetworkFromJSON)),
|
|
101
131
|
'datastores': ((json['datastores'] as Array<any>).map(DatastoreFromJSON)),
|
|
102
132
|
};
|
|
103
133
|
}
|
|
@@ -109,10 +139,13 @@ export function InfraToJSON(value?: Infra | null): any {
|
|
|
109
139
|
return {
|
|
110
140
|
|
|
111
141
|
'totalHosts': value['totalHosts'],
|
|
142
|
+
'totalDatacenters': value['totalDatacenters'],
|
|
112
143
|
'totalClusters': value['totalClusters'],
|
|
144
|
+
'clustersPerDatacenter': value['clustersPerDatacenter'],
|
|
145
|
+
'hosts': ((value['hosts'] as Array<any>).map(HostToJSON)),
|
|
113
146
|
'hostsPerCluster': value['hostsPerCluster'],
|
|
114
147
|
'hostPowerStates': value['hostPowerStates'],
|
|
115
|
-
'networks': ((value['networks'] as Array<any>).map(
|
|
148
|
+
'networks': ((value['networks'] as Array<any>).map(NetworkToJSON)),
|
|
116
149
|
'datastores': ((value['datastores'] as Array<any>).map(DatastoreToJSON)),
|
|
117
150
|
};
|
|
118
151
|
}
|
package/src/models/Inventory.ts
CHANGED
|
@@ -78,9 +78,9 @@ export function InventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
78
78
|
}
|
|
79
79
|
return {
|
|
80
80
|
|
|
81
|
-
'vcenter': json['vcenter'],
|
|
82
|
-
'vms': json['vms'],
|
|
83
|
-
'infra': json['infra'],
|
|
81
|
+
'vcenter': VCenterFromJSON(json['vcenter']),
|
|
82
|
+
'vms': VMsFromJSON(json['vms']),
|
|
83
|
+
'infra': InfraFromJSON(json['infra']),
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -90,9 +90,9 @@ export function InventoryToJSON(value?: Inventory | null): any {
|
|
|
90
90
|
}
|
|
91
91
|
return {
|
|
92
92
|
|
|
93
|
-
'vcenter': value['vcenter'],
|
|
94
|
-
'vms': value['vms'],
|
|
95
|
-
'infra': value['infra'],
|
|
93
|
+
'vcenter': VCenterToJSON(value['vcenter']),
|
|
94
|
+
'vms': VMsToJSON(value['vms']),
|
|
95
|
+
'infra': InfraToJSON(value['infra']),
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Migration Planner API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: undefined
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Label
|
|
20
|
+
*/
|
|
21
|
+
export interface Label {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof Label
|
|
26
|
+
*/
|
|
27
|
+
key: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Label
|
|
32
|
+
*/
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the Label interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfLabel(value: object): value is Label {
|
|
40
|
+
if (!('key' in value) || value['key'] === undefined) return false;
|
|
41
|
+
if (!('value' in value) || value['value'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function LabelFromJSON(json: any): Label {
|
|
46
|
+
return LabelFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function LabelFromJSONTyped(json: any, ignoreDiscriminator: boolean): Label {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'key': json['key'],
|
|
56
|
+
'value': json['value'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function LabelToJSON(value?: Label | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'key': value['key'],
|
|
67
|
+
'value': value['value'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|