@migration-planner-ui/api-client 0.0.9 → 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/SourceApi.d.ts +26 -1
- package/dist/apis/SourceApi.js +51 -1
- package/dist/models/AgentProxy.d.ts +3 -3
- 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/SourceApi.ts +84 -0
- package/src/models/AgentProxy.ts +3 -3
- 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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration Planner API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface Network
|
|
16
|
+
*/
|
|
17
|
+
export interface Network {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Network
|
|
22
|
+
*/
|
|
23
|
+
type: NetworkTypeEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Network
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Network
|
|
34
|
+
*/
|
|
35
|
+
vlanId?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Network
|
|
40
|
+
*/
|
|
41
|
+
dvswitch?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export declare const NetworkTypeEnum: {
|
|
47
|
+
readonly Standard: "standard";
|
|
48
|
+
readonly Distributed: "distributed";
|
|
49
|
+
readonly Dvswitch: "dvswitch";
|
|
50
|
+
readonly Unsupported: "unsupported";
|
|
51
|
+
};
|
|
52
|
+
export type NetworkTypeEnum = typeof NetworkTypeEnum[keyof typeof NetworkTypeEnum];
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the Network interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfNetwork(value: object): value is Network;
|
|
57
|
+
export declare function NetworkFromJSON(json: any): Network;
|
|
58
|
+
export declare function NetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): Network;
|
|
59
|
+
export declare function NetworkToJSON(value?: Network | null): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const NetworkTypeEnum = {
|
|
18
|
+
Standard: 'standard',
|
|
19
|
+
Distributed: 'distributed',
|
|
20
|
+
Dvswitch: 'dvswitch',
|
|
21
|
+
Unsupported: 'unsupported'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the Network interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfNetwork(value) {
|
|
27
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
export function NetworkFromJSON(json) {
|
|
34
|
+
return NetworkFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function NetworkFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'type': json['type'],
|
|
42
|
+
'name': json['name'],
|
|
43
|
+
'vlanId': json['vlanId'] == null ? undefined : json['vlanId'],
|
|
44
|
+
'dvswitch': json['dvswitch'] == null ? undefined : json['dvswitch'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export function NetworkToJSON(value) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'type': value['type'],
|
|
53
|
+
'name': value['name'],
|
|
54
|
+
'vlanId': value['vlanId'],
|
|
55
|
+
'dvswitch': value['dvswitch'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration Planner API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OsInfo
|
|
16
|
+
*/
|
|
17
|
+
export interface OsInfo {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof OsInfo
|
|
22
|
+
*/
|
|
23
|
+
count: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof OsInfo
|
|
28
|
+
*/
|
|
29
|
+
supported: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the OsInfo interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfOsInfo(value: object): value is OsInfo;
|
|
35
|
+
export declare function OsInfoFromJSON(json: any): OsInfo;
|
|
36
|
+
export declare function OsInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OsInfo;
|
|
37
|
+
export declare function OsInfoToJSON(value?: OsInfo | null): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
* Check if a given object implements the OsInfo interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfOsInfo(value) {
|
|
18
|
+
if (!('count' in value) || value['count'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('supported' in value) || value['supported'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function OsInfoFromJSON(json) {
|
|
25
|
+
return OsInfoFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function OsInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'count': json['count'],
|
|
33
|
+
'supported': json['supported'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function OsInfoToJSON(value) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'count': value['count'],
|
|
42
|
+
'supported': value['supported'],
|
|
43
|
+
};
|
|
44
|
+
}
|
package/dist/models/Source.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { Agent } from './Agent';
|
|
13
|
+
import type { Label } from './Label';
|
|
13
14
|
import type { Inventory } from './Inventory';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -59,6 +60,12 @@ export interface Source {
|
|
|
59
60
|
* @memberof Source
|
|
60
61
|
*/
|
|
61
62
|
agent?: Agent;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {Array<Label>}
|
|
66
|
+
* @memberof Source
|
|
67
|
+
*/
|
|
68
|
+
labels?: Array<Label>;
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
64
71
|
* Check if a given object implements the Source interface.
|
package/dist/models/Source.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { AgentFromJSON, AgentToJSON, } from './Agent';
|
|
15
|
+
import { LabelFromJSON, LabelToJSON, } from './Label';
|
|
15
16
|
import { InventoryFromJSON, InventoryToJSON, } from './Inventory';
|
|
16
17
|
/**
|
|
17
18
|
* Check if a given object implements the Source interface.
|
|
@@ -44,6 +45,7 @@ export function SourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
45
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
45
46
|
'onPremises': json['onPremises'],
|
|
46
47
|
'agent': json['agent'] == null ? undefined : AgentFromJSON(json['agent']),
|
|
48
|
+
'labels': json['labels'] == null ? undefined : (json['labels'].map(LabelFromJSON)),
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
export function SourceToJSON(value) {
|
|
@@ -58,5 +60,6 @@ export function SourceToJSON(value) {
|
|
|
58
60
|
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
59
61
|
'onPremises': value['onPremises'],
|
|
60
62
|
'agent': AgentToJSON(value['agent']),
|
|
63
|
+
'labels': value['labels'] == null ? undefined : (value['labels'].map(LabelToJSON)),
|
|
61
64
|
};
|
|
62
65
|
}
|
|
@@ -27,7 +27,7 @@ export interface SourceCreate {
|
|
|
27
27
|
* @type {string}
|
|
28
28
|
* @memberof SourceCreate
|
|
29
29
|
*/
|
|
30
|
-
sshPublicKey?: string;
|
|
30
|
+
sshPublicKey?: string | null;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
33
|
* @type {AgentProxy}
|
|
@@ -39,7 +39,7 @@ export interface SourceCreate {
|
|
|
39
39
|
* @type {string}
|
|
40
40
|
* @memberof SourceCreate
|
|
41
41
|
*/
|
|
42
|
-
certificateChain?: string;
|
|
42
|
+
certificateChain?: string | null;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Check if a given object implements the SourceCreate interface.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration Planner API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: undefined
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UploadRvtoolsFile200Response
|
|
16
|
+
*/
|
|
17
|
+
export interface UploadRvtoolsFile200Response {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UploadRvtoolsFile200Response
|
|
22
|
+
*/
|
|
23
|
+
message?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UploadRvtoolsFile200Response interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUploadRvtoolsFile200Response(value: object): value is UploadRvtoolsFile200Response;
|
|
29
|
+
export declare function UploadRvtoolsFile200ResponseFromJSON(json: any): UploadRvtoolsFile200Response;
|
|
30
|
+
export declare function UploadRvtoolsFile200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadRvtoolsFile200Response;
|
|
31
|
+
export declare function UploadRvtoolsFile200ResponseToJSON(value?: UploadRvtoolsFile200Response | null): any;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
* Check if a given object implements the UploadRvtoolsFile200Response interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfUploadRvtoolsFile200Response(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function UploadRvtoolsFile200ResponseFromJSON(json) {
|
|
21
|
+
return UploadRvtoolsFile200ResponseFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function UploadRvtoolsFile200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function UploadRvtoolsFile200ResponseToJSON(value) {
|
|
32
|
+
if (value == null) {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'message': value['message'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { Histogram } from './Histogram';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -42,10 +42,10 @@ export interface VMResourceBreakdown {
|
|
|
42
42
|
totalForNotMigratable: number;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
|
-
* @type {
|
|
45
|
+
* @type {Histogram}
|
|
46
46
|
* @memberof VMResourceBreakdown
|
|
47
47
|
*/
|
|
48
|
-
histogram:
|
|
48
|
+
histogram: Histogram;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Check if a given object implements the VMResourceBreakdown interface.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { HistogramFromJSON, HistogramToJSON, } from './Histogram';
|
|
15
15
|
/**
|
|
16
16
|
* Check if a given object implements the VMResourceBreakdown interface.
|
|
17
17
|
*/
|
|
@@ -40,7 +40,7 @@ export function VMResourceBreakdownFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
40
|
'totalForMigratable': json['totalForMigratable'],
|
|
41
41
|
'totalForMigratableWithWarnings': json['totalForMigratableWithWarnings'],
|
|
42
42
|
'totalForNotMigratable': json['totalForNotMigratable'],
|
|
43
|
-
'histogram':
|
|
43
|
+
'histogram': HistogramFromJSON(json['histogram']),
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export function VMResourceBreakdownToJSON(value) {
|
|
@@ -52,6 +52,6 @@ export function VMResourceBreakdownToJSON(value) {
|
|
|
52
52
|
'totalForMigratable': value['totalForMigratable'],
|
|
53
53
|
'totalForMigratableWithWarnings': value['totalForMigratableWithWarnings'],
|
|
54
54
|
'totalForNotMigratable': value['totalForNotMigratable'],
|
|
55
|
-
'histogram':
|
|
55
|
+
'histogram': HistogramToJSON(value['histogram']),
|
|
56
56
|
};
|
|
57
57
|
}
|
package/dist/models/VMs.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { MigrationIssue } from './MigrationIssue';
|
|
13
|
+
import type { OsInfo } from './OsInfo';
|
|
13
14
|
import type { VMResourceBreakdown } from './VMResourceBreakdown';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
@@ -71,22 +72,31 @@ export interface VMs {
|
|
|
71
72
|
*
|
|
72
73
|
* @type {{ [key: string]: number; }}
|
|
73
74
|
* @memberof VMs
|
|
75
|
+
* @deprecated
|
|
74
76
|
*/
|
|
75
77
|
os: {
|
|
76
78
|
[key: string]: number;
|
|
77
79
|
};
|
|
78
80
|
/**
|
|
79
81
|
*
|
|
80
|
-
* @type {
|
|
82
|
+
* @type {{ [key: string]: OsInfo; }}
|
|
81
83
|
* @memberof VMs
|
|
82
84
|
*/
|
|
83
|
-
|
|
85
|
+
osInfo?: {
|
|
86
|
+
[key: string]: OsInfo;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {Array<MigrationIssue>}
|
|
91
|
+
* @memberof VMs
|
|
92
|
+
*/
|
|
93
|
+
notMigratableReasons: Array<MigrationIssue>;
|
|
84
94
|
/**
|
|
85
95
|
*
|
|
86
|
-
* @type {Array<
|
|
96
|
+
* @type {Array<MigrationIssue>}
|
|
87
97
|
* @memberof VMs
|
|
88
98
|
*/
|
|
89
|
-
migrationWarnings: Array<
|
|
99
|
+
migrationWarnings: Array<MigrationIssue>;
|
|
90
100
|
}
|
|
91
101
|
/**
|
|
92
102
|
* Check if a given object implements the VMs interface.
|
package/dist/models/VMs.js
CHANGED
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { mapValues } from '../runtime';
|
|
15
|
+
import { MigrationIssueFromJSON, MigrationIssueToJSON, } from './MigrationIssue';
|
|
16
|
+
import { OsInfoFromJSON, OsInfoToJSON, } from './OsInfo';
|
|
17
|
+
import { VMResourceBreakdownFromJSON, VMResourceBreakdownToJSON, } from './VMResourceBreakdown';
|
|
15
18
|
/**
|
|
16
19
|
* Check if a given object implements the VMs interface.
|
|
17
20
|
*/
|
|
@@ -49,14 +52,15 @@ export function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
52
|
'total': json['total'],
|
|
50
53
|
'totalMigratable': json['totalMigratable'],
|
|
51
54
|
'totalMigratableWithWarnings': json['totalMigratableWithWarnings'] == null ? undefined : json['totalMigratableWithWarnings'],
|
|
52
|
-
'cpuCores': json['cpuCores'],
|
|
53
|
-
'ramGB': json['ramGB'],
|
|
54
|
-
'diskGB': json['diskGB'],
|
|
55
|
-
'diskCount': json['diskCount'],
|
|
55
|
+
'cpuCores': VMResourceBreakdownFromJSON(json['cpuCores']),
|
|
56
|
+
'ramGB': VMResourceBreakdownFromJSON(json['ramGB']),
|
|
57
|
+
'diskGB': VMResourceBreakdownFromJSON(json['diskGB']),
|
|
58
|
+
'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
|
|
56
59
|
'powerStates': json['powerStates'],
|
|
57
60
|
'os': json['os'],
|
|
58
|
-
'
|
|
59
|
-
'
|
|
61
|
+
'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
|
|
62
|
+
'notMigratableReasons': (json['notMigratableReasons'].map(MigrationIssueFromJSON)),
|
|
63
|
+
'migrationWarnings': (json['migrationWarnings'].map(MigrationIssueFromJSON)),
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
export function VMsToJSON(value) {
|
|
@@ -67,13 +71,14 @@ export function VMsToJSON(value) {
|
|
|
67
71
|
'total': value['total'],
|
|
68
72
|
'totalMigratable': value['totalMigratable'],
|
|
69
73
|
'totalMigratableWithWarnings': value['totalMigratableWithWarnings'],
|
|
70
|
-
'cpuCores': value['cpuCores'],
|
|
71
|
-
'ramGB': value['ramGB'],
|
|
72
|
-
'diskGB': value['diskGB'],
|
|
73
|
-
'diskCount': value['diskCount'],
|
|
74
|
+
'cpuCores': VMResourceBreakdownToJSON(value['cpuCores']),
|
|
75
|
+
'ramGB': VMResourceBreakdownToJSON(value['ramGB']),
|
|
76
|
+
'diskGB': VMResourceBreakdownToJSON(value['diskGB']),
|
|
77
|
+
'diskCount': VMResourceBreakdownToJSON(value['diskCount']),
|
|
74
78
|
'powerStates': value['powerStates'],
|
|
75
79
|
'os': value['os'],
|
|
76
|
-
'
|
|
77
|
-
'
|
|
80
|
+
'osInfo': value['osInfo'] == null ? undefined : (mapValues(value['osInfo'], OsInfoToJSON)),
|
|
81
|
+
'notMigratableReasons': (value['notMigratableReasons'].map(MigrationIssueToJSON)),
|
|
82
|
+
'migrationWarnings': (value['migrationWarnings'].map(MigrationIssueToJSON)),
|
|
78
83
|
};
|
|
79
84
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
export * from './Agent';
|
|
2
2
|
export * from './AgentProxy';
|
|
3
3
|
export * from './Datastore';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
4
|
+
export * from './Histogram';
|
|
5
|
+
export * from './Host';
|
|
6
6
|
export * from './Infra';
|
|
7
|
-
export * from './InfraDatastoresInner';
|
|
8
|
-
export * from './InfraNetworksInner';
|
|
9
7
|
export * from './Inventory';
|
|
10
|
-
export * from './
|
|
8
|
+
export * from './Label';
|
|
9
|
+
export * from './MigrationIssue';
|
|
11
10
|
export * from './ModelError';
|
|
11
|
+
export * from './Network';
|
|
12
|
+
export * from './OsInfo';
|
|
12
13
|
export * from './PresignedUrl';
|
|
13
14
|
export * from './Source';
|
|
14
15
|
export * from './SourceCreate';
|
|
15
16
|
export * from './SourceUpdateOnPrem';
|
|
16
17
|
export * from './Status';
|
|
18
|
+
export * from './UploadRvtoolsFile200Response';
|
|
17
19
|
export * from './VCenter';
|
|
18
20
|
export * from './VMResourceBreakdown';
|
|
19
|
-
export * from './VMResourceBreakdownHistogram';
|
|
20
21
|
export * from './VMs';
|
|
22
|
+
export * from './InfraDatastoresInner';
|
|
23
|
+
export * from './InfraNetworksInner';
|
|
24
|
+
export * from './MigrationIssuesInner';
|
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/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
|
}
|