@migration-planner-ui/api-client 0.0.28 → 0.0.29
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 +3 -0
- package/dist/apis/JobApi.d.ts +97 -0
- package/dist/apis/JobApi.js +138 -0
- package/dist/models/Infra.d.ts +5 -2
- package/dist/models/Infra.js +2 -6
- package/dist/models/Job.d.ts +50 -0
- package/dist/models/Job.js +49 -0
- package/dist/models/JobStatus.d.ts +35 -0
- package/dist/models/JobStatus.js +51 -0
- package/dist/models/Snapshot.js +13 -0
- package/dist/models/VMs.d.ts +1 -1
- package/dist/models/VMs.js +1 -3
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/AssessmentApi.ts +3 -0
- package/src/apis/JobApi.ts +226 -0
- package/src/models/Infra.ts +11 -6
- package/src/models/Inventory.ts +1 -2
- package/src/models/InventoryData.ts +4 -0
- package/src/models/Job.ts +95 -0
- package/src/models/JobStatus.ts +60 -0
- package/src/models/Snapshot.ts +3 -0
- package/src/models/VMs.ts +8 -4
- package/src/models/index.ts +2 -0
- package/src/runtime.ts +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -3,6 +3,7 @@ src/apis/AssessmentApi.ts
|
|
|
3
3
|
src/apis/HealthApi.ts
|
|
4
4
|
src/apis/ImageApi.ts
|
|
5
5
|
src/apis/InfoApi.ts
|
|
6
|
+
src/apis/JobApi.ts
|
|
6
7
|
src/apis/SourceApi.ts
|
|
7
8
|
src/index.ts
|
|
8
9
|
src/models/Agent.ts
|
|
@@ -20,6 +21,8 @@ src/models/Infra.ts
|
|
|
20
21
|
src/models/Inventory.ts
|
|
21
22
|
src/models/InventoryData.ts
|
|
22
23
|
src/models/Ipv4Config.ts
|
|
24
|
+
src/models/Job.ts
|
|
25
|
+
src/models/JobStatus.ts
|
|
23
26
|
src/models/Label.ts
|
|
24
27
|
src/models/MigrationIssue.ts
|
|
25
28
|
src/models/ModelError.ts
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { Job } from '../models/index';
|
|
14
|
+
export interface CancelJobRequest {
|
|
15
|
+
id: number;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateRVToolsAssessmentRequest {
|
|
18
|
+
name: string;
|
|
19
|
+
file: Blob;
|
|
20
|
+
}
|
|
21
|
+
export interface GetJobRequest {
|
|
22
|
+
id: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* JobApi - interface
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface JobApiInterface
|
|
29
|
+
*/
|
|
30
|
+
export interface JobApiInterface {
|
|
31
|
+
/**
|
|
32
|
+
* Cancel a job
|
|
33
|
+
* @param {number} id ID of the job
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
* @memberof JobApiInterface
|
|
37
|
+
*/
|
|
38
|
+
cancelJobRaw(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
39
|
+
/**
|
|
40
|
+
* Cancel a job
|
|
41
|
+
*/
|
|
42
|
+
cancelJob(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
43
|
+
/**
|
|
44
|
+
* Create an assessment from RVTools file asynchronously
|
|
45
|
+
* @param {string} name Name of the assessment
|
|
46
|
+
* @param {Blob} file File upload for assessment data
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
* @memberof JobApiInterface
|
|
50
|
+
*/
|
|
51
|
+
createRVToolsAssessmentRaw(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
52
|
+
/**
|
|
53
|
+
* Create an assessment from RVTools file asynchronously
|
|
54
|
+
*/
|
|
55
|
+
createRVToolsAssessment(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
56
|
+
/**
|
|
57
|
+
* Get job status
|
|
58
|
+
* @param {number} id ID of the job
|
|
59
|
+
* @param {*} [options] Override http request option.
|
|
60
|
+
* @throws {RequiredError}
|
|
61
|
+
* @memberof JobApiInterface
|
|
62
|
+
*/
|
|
63
|
+
getJobRaw(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
64
|
+
/**
|
|
65
|
+
* Get job status
|
|
66
|
+
*/
|
|
67
|
+
getJob(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
*/
|
|
72
|
+
export declare class JobApi extends runtime.BaseAPI implements JobApiInterface {
|
|
73
|
+
/**
|
|
74
|
+
* Cancel a job
|
|
75
|
+
*/
|
|
76
|
+
cancelJobRaw(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
77
|
+
/**
|
|
78
|
+
* Cancel a job
|
|
79
|
+
*/
|
|
80
|
+
cancelJob(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
81
|
+
/**
|
|
82
|
+
* Create an assessment from RVTools file asynchronously
|
|
83
|
+
*/
|
|
84
|
+
createRVToolsAssessmentRaw(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
85
|
+
/**
|
|
86
|
+
* Create an assessment from RVTools file asynchronously
|
|
87
|
+
*/
|
|
88
|
+
createRVToolsAssessment(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
89
|
+
/**
|
|
90
|
+
* Get job status
|
|
91
|
+
*/
|
|
92
|
+
getJobRaw(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
93
|
+
/**
|
|
94
|
+
* Get job status
|
|
95
|
+
*/
|
|
96
|
+
getJob(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
97
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { JobFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class JobApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Cancel a job
|
|
31
|
+
*/
|
|
32
|
+
cancelJobRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['id'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling cancelJob().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
const response = yield this.request({
|
|
40
|
+
path: `/api/v1/assessments/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
41
|
+
method: 'DELETE',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Cancel a job
|
|
50
|
+
*/
|
|
51
|
+
cancelJob(requestParameters, initOverrides) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const response = yield this.cancelJobRaw(requestParameters, initOverrides);
|
|
54
|
+
return yield response.value();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create an assessment from RVTools file asynchronously
|
|
59
|
+
*/
|
|
60
|
+
createRVToolsAssessmentRaw(requestParameters, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
if (requestParameters['name'] == null) {
|
|
63
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling createRVToolsAssessment().');
|
|
64
|
+
}
|
|
65
|
+
if (requestParameters['file'] == null) {
|
|
66
|
+
throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling createRVToolsAssessment().');
|
|
67
|
+
}
|
|
68
|
+
const queryParameters = {};
|
|
69
|
+
const headerParameters = {};
|
|
70
|
+
const consumes = [
|
|
71
|
+
{ contentType: 'multipart/form-data' },
|
|
72
|
+
];
|
|
73
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
74
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
75
|
+
let formParams;
|
|
76
|
+
let useForm = false;
|
|
77
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
78
|
+
useForm = canConsumeForm;
|
|
79
|
+
if (useForm) {
|
|
80
|
+
formParams = new FormData();
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
formParams = new URLSearchParams();
|
|
84
|
+
}
|
|
85
|
+
if (requestParameters['name'] != null) {
|
|
86
|
+
formParams.append('name', requestParameters['name']);
|
|
87
|
+
}
|
|
88
|
+
if (requestParameters['file'] != null) {
|
|
89
|
+
formParams.append('file', requestParameters['file']);
|
|
90
|
+
}
|
|
91
|
+
const response = yield this.request({
|
|
92
|
+
path: `/api/v1/assessments/rvtools`,
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
body: formParams,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create an assessment from RVTools file asynchronously
|
|
103
|
+
*/
|
|
104
|
+
createRVToolsAssessment(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.createRVToolsAssessmentRaw(requestParameters, initOverrides);
|
|
107
|
+
return yield response.value();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get job status
|
|
112
|
+
*/
|
|
113
|
+
getJobRaw(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
if (requestParameters['id'] == null) {
|
|
116
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getJob().');
|
|
117
|
+
}
|
|
118
|
+
const queryParameters = {};
|
|
119
|
+
const headerParameters = {};
|
|
120
|
+
const response = yield this.request({
|
|
121
|
+
path: `/api/v1/assessments/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
122
|
+
method: 'GET',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get job status
|
|
131
|
+
*/
|
|
132
|
+
getJob(requestParameters, initOverrides) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
const response = yield this.getJobRaw(requestParameters, initOverrides);
|
|
135
|
+
return yield response.value();
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
package/dist/models/Infra.d.ts
CHANGED
|
@@ -34,8 +34,9 @@ export interface Infra {
|
|
|
34
34
|
*
|
|
35
35
|
* @type {number}
|
|
36
36
|
* @memberof Infra
|
|
37
|
+
* @deprecated
|
|
37
38
|
*/
|
|
38
|
-
totalClusters
|
|
39
|
+
totalClusters?: number;
|
|
39
40
|
/**
|
|
40
41
|
*
|
|
41
42
|
* @type {Array<number>}
|
|
@@ -58,12 +59,14 @@ export interface Infra {
|
|
|
58
59
|
*
|
|
59
60
|
* @type {Array<number>}
|
|
60
61
|
* @memberof Infra
|
|
62
|
+
* @deprecated
|
|
61
63
|
*/
|
|
62
|
-
hostsPerCluster
|
|
64
|
+
hostsPerCluster?: Array<number>;
|
|
63
65
|
/**
|
|
64
66
|
*
|
|
65
67
|
* @type {Array<number>}
|
|
66
68
|
* @memberof Infra
|
|
69
|
+
* @deprecated
|
|
67
70
|
*/
|
|
68
71
|
vmsPerCluster?: Array<number>;
|
|
69
72
|
/**
|
package/dist/models/Infra.js
CHANGED
|
@@ -20,10 +20,6 @@ import { HostFromJSON, HostToJSON, } from './Host';
|
|
|
20
20
|
export function instanceOfInfra(value) {
|
|
21
21
|
if (!('totalHosts' in value) || value['totalHosts'] === undefined)
|
|
22
22
|
return false;
|
|
23
|
-
if (!('totalClusters' in value) || value['totalClusters'] === undefined)
|
|
24
|
-
return false;
|
|
25
|
-
if (!('hostsPerCluster' in value) || value['hostsPerCluster'] === undefined)
|
|
26
|
-
return false;
|
|
27
23
|
if (!('hostPowerStates' in value) || value['hostPowerStates'] === undefined)
|
|
28
24
|
return false;
|
|
29
25
|
if (!('networks' in value) || value['networks'] === undefined)
|
|
@@ -42,11 +38,11 @@ export function InfraFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
38
|
return {
|
|
43
39
|
'totalHosts': json['totalHosts'],
|
|
44
40
|
'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
|
|
45
|
-
'totalClusters': json['totalClusters'],
|
|
41
|
+
'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
|
|
46
42
|
'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
|
|
47
43
|
'cpuOverCommitment': json['cpuOverCommitment'] == null ? undefined : json['cpuOverCommitment'],
|
|
48
44
|
'hosts': json['hosts'] == null ? undefined : (json['hosts'].map(HostFromJSON)),
|
|
49
|
-
'hostsPerCluster': json['hostsPerCluster'],
|
|
45
|
+
'hostsPerCluster': json['hostsPerCluster'] == null ? undefined : json['hostsPerCluster'],
|
|
50
46
|
'vmsPerCluster': json['vmsPerCluster'] == null ? undefined : json['vmsPerCluster'],
|
|
51
47
|
'hostPowerStates': json['hostPowerStates'],
|
|
52
48
|
'networks': json['networks'] == null ? undefined : (json['networks'].map(NetworkFromJSON)),
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import type { JobStatus } from './JobStatus';
|
|
13
|
+
/**
|
|
14
|
+
* Background job for async assessment creation
|
|
15
|
+
* @export
|
|
16
|
+
* @interface Job
|
|
17
|
+
*/
|
|
18
|
+
export interface Job {
|
|
19
|
+
/**
|
|
20
|
+
* Job ID
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof Job
|
|
23
|
+
*/
|
|
24
|
+
id: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {JobStatus}
|
|
28
|
+
* @memberof Job
|
|
29
|
+
*/
|
|
30
|
+
status: JobStatus;
|
|
31
|
+
/**
|
|
32
|
+
* Error message if job failed
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof Job
|
|
35
|
+
*/
|
|
36
|
+
error?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Assessment ID when job completed successfully
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof Job
|
|
41
|
+
*/
|
|
42
|
+
assessmentId?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the Job interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfJob(value: object): value is Job;
|
|
48
|
+
export declare function JobFromJSON(json: any): Job;
|
|
49
|
+
export declare function JobFromJSONTyped(json: any, ignoreDiscriminator: boolean): Job;
|
|
50
|
+
export declare function JobToJSON(value?: Job | null): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
import { JobStatusFromJSON, JobStatusToJSON, } from './JobStatus';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the Job interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfJob(value) {
|
|
19
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function JobFromJSON(json) {
|
|
26
|
+
return JobFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function JobFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'id': json['id'],
|
|
34
|
+
'status': JobStatusFromJSON(json['status']),
|
|
35
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
36
|
+
'assessmentId': json['assessmentId'] == null ? undefined : json['assessmentId'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function JobToJSON(value) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'id': value['id'],
|
|
45
|
+
'status': JobStatusToJSON(value['status']),
|
|
46
|
+
'error': value['error'],
|
|
47
|
+
'assessmentId': value['assessmentId'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
* Job status:
|
|
14
|
+
* * `pending` - Job is queued
|
|
15
|
+
* * `parsing` - Parsing RVTools Excel file
|
|
16
|
+
* * `validating` - Running OPA VM validations
|
|
17
|
+
* * `completed` - Assessment created successfully
|
|
18
|
+
* * `failed` - Job failed with error
|
|
19
|
+
* * `cancelled` - Job was cancelled
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export declare const JobStatus: {
|
|
24
|
+
readonly Pending: "pending";
|
|
25
|
+
readonly Parsing: "parsing";
|
|
26
|
+
readonly Validating: "validating";
|
|
27
|
+
readonly Completed: "completed";
|
|
28
|
+
readonly Failed: "failed";
|
|
29
|
+
readonly Cancelled: "cancelled";
|
|
30
|
+
};
|
|
31
|
+
export type JobStatus = typeof JobStatus[keyof typeof JobStatus];
|
|
32
|
+
export declare function instanceOfJobStatus(value: any): boolean;
|
|
33
|
+
export declare function JobStatusFromJSON(json: any): JobStatus;
|
|
34
|
+
export declare function JobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobStatus;
|
|
35
|
+
export declare function JobStatusToJSON(value?: JobStatus | null): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
* Job status:
|
|
16
|
+
* * `pending` - Job is queued
|
|
17
|
+
* * `parsing` - Parsing RVTools Excel file
|
|
18
|
+
* * `validating` - Running OPA VM validations
|
|
19
|
+
* * `completed` - Assessment created successfully
|
|
20
|
+
* * `failed` - Job failed with error
|
|
21
|
+
* * `cancelled` - Job was cancelled
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const JobStatus = {
|
|
26
|
+
Pending: 'pending',
|
|
27
|
+
Parsing: 'parsing',
|
|
28
|
+
Validating: 'validating',
|
|
29
|
+
Completed: 'completed',
|
|
30
|
+
Failed: 'failed',
|
|
31
|
+
Cancelled: 'cancelled'
|
|
32
|
+
};
|
|
33
|
+
export function instanceOfJobStatus(value) {
|
|
34
|
+
for (const key in JobStatus) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(JobStatus, key)) {
|
|
36
|
+
if (JobStatus[key] === value) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
export function JobStatusFromJSON(json) {
|
|
44
|
+
return JobStatusFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function JobStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
export function JobStatusToJSON(value) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
package/dist/models/Snapshot.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
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
|
+
*/
|
|
1
14
|
import { InventoryFromJSON, InventoryToJSON, } from './Inventory';
|
|
2
15
|
/**
|
|
3
16
|
* Check if a given object implements the Snapshot interface.
|
package/dist/models/VMs.d.ts
CHANGED
package/dist/models/VMs.js
CHANGED
|
@@ -35,8 +35,6 @@ export function instanceOfVMs(value) {
|
|
|
35
35
|
return false;
|
|
36
36
|
if (!('powerStates' in value) || value['powerStates'] === undefined)
|
|
37
37
|
return false;
|
|
38
|
-
if (!('os' in value) || value['os'] === undefined)
|
|
39
|
-
return false;
|
|
40
38
|
if (!('notMigratableReasons' in value) || value['notMigratableReasons'] === undefined)
|
|
41
39
|
return false;
|
|
42
40
|
if (!('migrationWarnings' in value) || value['migrationWarnings'] === undefined)
|
|
@@ -62,7 +60,7 @@ export function VMsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
60
|
'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
|
|
63
61
|
'nicCount': json['nicCount'] == null ? undefined : VMResourceBreakdownFromJSON(json['nicCount']),
|
|
64
62
|
'powerStates': json['powerStates'],
|
|
65
|
-
'os': json['os'],
|
|
63
|
+
'os': json['os'] == null ? undefined : json['os'],
|
|
66
64
|
'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
|
|
67
65
|
'notMigratableReasons': json['notMigratableReasons'] == null ? undefined : (json['notMigratableReasons'].map(MigrationIssueFromJSON)),
|
|
68
66
|
'migrationWarnings': json['migrationWarnings'] == null ? undefined : (json['migrationWarnings'].map(MigrationIssueFromJSON)),
|
package/dist/models/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export * from './Infra';
|
|
|
13
13
|
export * from './Inventory';
|
|
14
14
|
export * from './InventoryData';
|
|
15
15
|
export * from './Ipv4Config';
|
|
16
|
+
export * from './Job';
|
|
17
|
+
export * from './JobStatus';
|
|
16
18
|
export * from './Label';
|
|
17
19
|
export * from './MigrationIssue';
|
|
18
20
|
export * from './ModelError';
|
package/dist/models/index.js
CHANGED
|
@@ -15,6 +15,8 @@ export * from './Infra';
|
|
|
15
15
|
export * from './Inventory';
|
|
16
16
|
export * from './InventoryData';
|
|
17
17
|
export * from './Ipv4Config';
|
|
18
|
+
export * from './Job';
|
|
19
|
+
export * from './JobStatus';
|
|
18
20
|
export * from './Label';
|
|
19
21
|
export * from './MigrationIssue';
|
|
20
22
|
export * from './ModelError';
|
package/dist/runtime.js
CHANGED
|
@@ -20,7 +20,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
export const BASE_PATH = "
|
|
23
|
+
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
24
24
|
export class Configuration {
|
|
25
25
|
constructor(configuration = {}) {
|
|
26
26
|
this.configuration = configuration;
|
package/package.json
CHANGED
|
@@ -0,0 +1,226 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
Job,
|
|
19
|
+
} from '../models/index';
|
|
20
|
+
import {
|
|
21
|
+
JobFromJSON,
|
|
22
|
+
JobToJSON,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
|
|
25
|
+
export interface CancelJobRequest {
|
|
26
|
+
id: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CreateRVToolsAssessmentRequest {
|
|
30
|
+
name: string;
|
|
31
|
+
file: Blob;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface GetJobRequest {
|
|
35
|
+
id: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* JobApi - interface
|
|
40
|
+
*
|
|
41
|
+
* @export
|
|
42
|
+
* @interface JobApiInterface
|
|
43
|
+
*/
|
|
44
|
+
export interface JobApiInterface {
|
|
45
|
+
/**
|
|
46
|
+
* Cancel a job
|
|
47
|
+
* @param {number} id ID of the job
|
|
48
|
+
* @param {*} [options] Override http request option.
|
|
49
|
+
* @throws {RequiredError}
|
|
50
|
+
* @memberof JobApiInterface
|
|
51
|
+
*/
|
|
52
|
+
cancelJobRaw(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Cancel a job
|
|
56
|
+
*/
|
|
57
|
+
cancelJob(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create an assessment from RVTools file asynchronously
|
|
61
|
+
* @param {string} name Name of the assessment
|
|
62
|
+
* @param {Blob} file File upload for assessment data
|
|
63
|
+
* @param {*} [options] Override http request option.
|
|
64
|
+
* @throws {RequiredError}
|
|
65
|
+
* @memberof JobApiInterface
|
|
66
|
+
*/
|
|
67
|
+
createRVToolsAssessmentRaw(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create an assessment from RVTools file asynchronously
|
|
71
|
+
*/
|
|
72
|
+
createRVToolsAssessment(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Get job status
|
|
76
|
+
* @param {number} id ID of the job
|
|
77
|
+
* @param {*} [options] Override http request option.
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
* @memberof JobApiInterface
|
|
80
|
+
*/
|
|
81
|
+
getJobRaw(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get job status
|
|
85
|
+
*/
|
|
86
|
+
getJob(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job>;
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
export class JobApi extends runtime.BaseAPI implements JobApiInterface {
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Cancel a job
|
|
97
|
+
*/
|
|
98
|
+
async cancelJobRaw(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>> {
|
|
99
|
+
if (requestParameters['id'] == null) {
|
|
100
|
+
throw new runtime.RequiredError(
|
|
101
|
+
'id',
|
|
102
|
+
'Required parameter "id" was null or undefined when calling cancelJob().'
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const queryParameters: any = {};
|
|
107
|
+
|
|
108
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
109
|
+
|
|
110
|
+
const response = await this.request({
|
|
111
|
+
path: `/api/v1/assessments/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
112
|
+
method: 'DELETE',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
}, initOverrides);
|
|
116
|
+
|
|
117
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Cancel a job
|
|
122
|
+
*/
|
|
123
|
+
async cancelJob(requestParameters: CancelJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job> {
|
|
124
|
+
const response = await this.cancelJobRaw(requestParameters, initOverrides);
|
|
125
|
+
return await response.value();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Create an assessment from RVTools file asynchronously
|
|
130
|
+
*/
|
|
131
|
+
async createRVToolsAssessmentRaw(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>> {
|
|
132
|
+
if (requestParameters['name'] == null) {
|
|
133
|
+
throw new runtime.RequiredError(
|
|
134
|
+
'name',
|
|
135
|
+
'Required parameter "name" was null or undefined when calling createRVToolsAssessment().'
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (requestParameters['file'] == null) {
|
|
140
|
+
throw new runtime.RequiredError(
|
|
141
|
+
'file',
|
|
142
|
+
'Required parameter "file" was null or undefined when calling createRVToolsAssessment().'
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const queryParameters: any = {};
|
|
147
|
+
|
|
148
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
149
|
+
|
|
150
|
+
const consumes: runtime.Consume[] = [
|
|
151
|
+
{ contentType: 'multipart/form-data' },
|
|
152
|
+
];
|
|
153
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
154
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
155
|
+
|
|
156
|
+
let formParams: { append(param: string, value: any): any };
|
|
157
|
+
let useForm = false;
|
|
158
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
159
|
+
useForm = canConsumeForm;
|
|
160
|
+
if (useForm) {
|
|
161
|
+
formParams = new FormData();
|
|
162
|
+
} else {
|
|
163
|
+
formParams = new URLSearchParams();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (requestParameters['name'] != null) {
|
|
167
|
+
formParams.append('name', requestParameters['name'] as any);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (requestParameters['file'] != null) {
|
|
171
|
+
formParams.append('file', requestParameters['file'] as any);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const response = await this.request({
|
|
175
|
+
path: `/api/v1/assessments/rvtools`,
|
|
176
|
+
method: 'POST',
|
|
177
|
+
headers: headerParameters,
|
|
178
|
+
query: queryParameters,
|
|
179
|
+
body: formParams,
|
|
180
|
+
}, initOverrides);
|
|
181
|
+
|
|
182
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Create an assessment from RVTools file asynchronously
|
|
187
|
+
*/
|
|
188
|
+
async createRVToolsAssessment(requestParameters: CreateRVToolsAssessmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job> {
|
|
189
|
+
const response = await this.createRVToolsAssessmentRaw(requestParameters, initOverrides);
|
|
190
|
+
return await response.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get job status
|
|
195
|
+
*/
|
|
196
|
+
async getJobRaw(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Job>> {
|
|
197
|
+
if (requestParameters['id'] == null) {
|
|
198
|
+
throw new runtime.RequiredError(
|
|
199
|
+
'id',
|
|
200
|
+
'Required parameter "id" was null or undefined when calling getJob().'
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const queryParameters: any = {};
|
|
205
|
+
|
|
206
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
207
|
+
|
|
208
|
+
const response = await this.request({
|
|
209
|
+
path: `/api/v1/assessments/jobs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
210
|
+
method: 'GET',
|
|
211
|
+
headers: headerParameters,
|
|
212
|
+
query: queryParameters,
|
|
213
|
+
}, initOverrides);
|
|
214
|
+
|
|
215
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JobFromJSON(jsonValue));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Get job status
|
|
220
|
+
*/
|
|
221
|
+
async getJob(requestParameters: GetJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Job> {
|
|
222
|
+
const response = await this.getJobRaw(requestParameters, initOverrides);
|
|
223
|
+
return await response.value();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
}
|
package/src/models/Infra.ts
CHANGED
|
@@ -12,19 +12,23 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
15
16
|
import type { Datastore } from './Datastore';
|
|
16
17
|
import {
|
|
17
18
|
DatastoreFromJSON,
|
|
19
|
+
DatastoreFromJSONTyped,
|
|
18
20
|
DatastoreToJSON,
|
|
19
21
|
} from './Datastore';
|
|
20
22
|
import type { Network } from './Network';
|
|
21
23
|
import {
|
|
22
24
|
NetworkFromJSON,
|
|
25
|
+
NetworkFromJSONTyped,
|
|
23
26
|
NetworkToJSON,
|
|
24
27
|
} from './Network';
|
|
25
28
|
import type { Host } from './Host';
|
|
26
29
|
import {
|
|
27
30
|
HostFromJSON,
|
|
31
|
+
HostFromJSONTyped,
|
|
28
32
|
HostToJSON,
|
|
29
33
|
} from './Host';
|
|
30
34
|
|
|
@@ -50,8 +54,9 @@ export interface Infra {
|
|
|
50
54
|
*
|
|
51
55
|
* @type {number}
|
|
52
56
|
* @memberof Infra
|
|
57
|
+
* @deprecated
|
|
53
58
|
*/
|
|
54
|
-
totalClusters
|
|
59
|
+
totalClusters?: number;
|
|
55
60
|
/**
|
|
56
61
|
*
|
|
57
62
|
* @type {Array<number>}
|
|
@@ -74,12 +79,14 @@ export interface Infra {
|
|
|
74
79
|
*
|
|
75
80
|
* @type {Array<number>}
|
|
76
81
|
* @memberof Infra
|
|
82
|
+
* @deprecated
|
|
77
83
|
*/
|
|
78
|
-
hostsPerCluster
|
|
84
|
+
hostsPerCluster?: Array<number>;
|
|
79
85
|
/**
|
|
80
86
|
*
|
|
81
87
|
* @type {Array<number>}
|
|
82
88
|
* @memberof Infra
|
|
89
|
+
* @deprecated
|
|
83
90
|
*/
|
|
84
91
|
vmsPerCluster?: Array<number>;
|
|
85
92
|
/**
|
|
@@ -107,8 +114,6 @@ export interface Infra {
|
|
|
107
114
|
*/
|
|
108
115
|
export function instanceOfInfra(value: object): value is Infra {
|
|
109
116
|
if (!('totalHosts' in value) || value['totalHosts'] === undefined) return false;
|
|
110
|
-
if (!('totalClusters' in value) || value['totalClusters'] === undefined) return false;
|
|
111
|
-
if (!('hostsPerCluster' in value) || value['hostsPerCluster'] === undefined) return false;
|
|
112
117
|
if (!('hostPowerStates' in value) || value['hostPowerStates'] === undefined) return false;
|
|
113
118
|
if (!('networks' in value) || value['networks'] === undefined) return false;
|
|
114
119
|
if (!('datastores' in value) || value['datastores'] === undefined) return false;
|
|
@@ -127,11 +132,11 @@ export function InfraFromJSONTyped(json: any, ignoreDiscriminator: boolean): Inf
|
|
|
127
132
|
|
|
128
133
|
'totalHosts': json['totalHosts'],
|
|
129
134
|
'totalDatacenters': json['totalDatacenters'] == null ? undefined : json['totalDatacenters'],
|
|
130
|
-
'totalClusters': json['totalClusters'],
|
|
135
|
+
'totalClusters': json['totalClusters'] == null ? undefined : json['totalClusters'],
|
|
131
136
|
'clustersPerDatacenter': json['clustersPerDatacenter'] == null ? undefined : json['clustersPerDatacenter'],
|
|
132
137
|
'cpuOverCommitment': json['cpuOverCommitment'] == null ? undefined : json['cpuOverCommitment'],
|
|
133
138
|
'hosts': json['hosts'] == null ? undefined : ((json['hosts'] as Array<any>).map(HostFromJSON)),
|
|
134
|
-
'hostsPerCluster': json['hostsPerCluster'],
|
|
139
|
+
'hostsPerCluster': json['hostsPerCluster'] == null ? undefined : json['hostsPerCluster'],
|
|
135
140
|
'vmsPerCluster': json['vmsPerCluster'] == null ? undefined : json['vmsPerCluster'],
|
|
136
141
|
'hostPowerStates': json['hostPowerStates'],
|
|
137
142
|
'networks': json['networks'] == null ? undefined : ((json['networks'] as Array<any>).map(NetworkFromJSON)),
|
package/src/models/Inventory.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
import type { InventoryData } from './InventoryData';
|
|
17
17
|
import {
|
|
18
18
|
InventoryDataFromJSON,
|
|
19
|
+
InventoryDataFromJSONTyped,
|
|
19
20
|
InventoryDataToJSON,
|
|
20
21
|
} from './InventoryData';
|
|
21
22
|
|
|
@@ -63,7 +64,6 @@ export function InventoryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
63
64
|
return json;
|
|
64
65
|
}
|
|
65
66
|
return {
|
|
66
|
-
|
|
67
67
|
'vcenterId': json['vcenter_id'],
|
|
68
68
|
'clusters': json['clusters'] == null ? undefined : (mapValues(json['clusters'], InventoryDataFromJSON)),
|
|
69
69
|
'vcenter': json['vcenter'] == null ? undefined : InventoryDataFromJSON(json['vcenter']),
|
|
@@ -75,7 +75,6 @@ export function InventoryToJSON(value?: Inventory | null): any {
|
|
|
75
75
|
return value;
|
|
76
76
|
}
|
|
77
77
|
return {
|
|
78
|
-
|
|
79
78
|
'vcenter_id': value['vcenterId'],
|
|
80
79
|
'clusters': value['clusters'] == null ? undefined : (mapValues(value['clusters'], InventoryDataToJSON)),
|
|
81
80
|
'vcenter': InventoryDataToJSON(value['vcenter']),
|
|
@@ -12,19 +12,23 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
15
16
|
import type { VCenter } from './VCenter';
|
|
16
17
|
import {
|
|
17
18
|
VCenterFromJSON,
|
|
19
|
+
VCenterFromJSONTyped,
|
|
18
20
|
VCenterToJSON,
|
|
19
21
|
} from './VCenter';
|
|
20
22
|
import type { Infra } from './Infra';
|
|
21
23
|
import {
|
|
22
24
|
InfraFromJSON,
|
|
25
|
+
InfraFromJSONTyped,
|
|
23
26
|
InfraToJSON,
|
|
24
27
|
} from './Infra';
|
|
25
28
|
import type { VMs } from './VMs';
|
|
26
29
|
import {
|
|
27
30
|
VMsFromJSON,
|
|
31
|
+
VMsFromJSONTyped,
|
|
28
32
|
VMsToJSON,
|
|
29
33
|
} from './VMs';
|
|
30
34
|
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
import type { JobStatus } from './JobStatus';
|
|
17
|
+
import {
|
|
18
|
+
JobStatusFromJSON,
|
|
19
|
+
JobStatusFromJSONTyped,
|
|
20
|
+
JobStatusToJSON,
|
|
21
|
+
} from './JobStatus';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Background job for async assessment creation
|
|
25
|
+
* @export
|
|
26
|
+
* @interface Job
|
|
27
|
+
*/
|
|
28
|
+
export interface Job {
|
|
29
|
+
/**
|
|
30
|
+
* Job ID
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof Job
|
|
33
|
+
*/
|
|
34
|
+
id: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {JobStatus}
|
|
38
|
+
* @memberof Job
|
|
39
|
+
*/
|
|
40
|
+
status: JobStatus;
|
|
41
|
+
/**
|
|
42
|
+
* Error message if job failed
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof Job
|
|
45
|
+
*/
|
|
46
|
+
error?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Assessment ID when job completed successfully
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof Job
|
|
51
|
+
*/
|
|
52
|
+
assessmentId?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the Job interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfJob(value: object): value is Job {
|
|
61
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
62
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function JobFromJSON(json: any): Job {
|
|
67
|
+
return JobFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function JobFromJSONTyped(json: any, ignoreDiscriminator: boolean): Job {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'id': json['id'],
|
|
77
|
+
'status': JobStatusFromJSON(json['status']),
|
|
78
|
+
'error': json['error'] == null ? undefined : json['error'],
|
|
79
|
+
'assessmentId': json['assessmentId'] == null ? undefined : json['assessmentId'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function JobToJSON(value?: Job | null): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'id': value['id'],
|
|
90
|
+
'status': JobStatusToJSON(value['status']),
|
|
91
|
+
'error': value['error'],
|
|
92
|
+
'assessmentId': value['assessmentId'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Job status:
|
|
18
|
+
* * `pending` - Job is queued
|
|
19
|
+
* * `parsing` - Parsing RVTools Excel file
|
|
20
|
+
* * `validating` - Running OPA VM validations
|
|
21
|
+
* * `completed` - Assessment created successfully
|
|
22
|
+
* * `failed` - Job failed with error
|
|
23
|
+
* * `cancelled` - Job was cancelled
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const JobStatus = {
|
|
28
|
+
Pending: 'pending',
|
|
29
|
+
Parsing: 'parsing',
|
|
30
|
+
Validating: 'validating',
|
|
31
|
+
Completed: 'completed',
|
|
32
|
+
Failed: 'failed',
|
|
33
|
+
Cancelled: 'cancelled'
|
|
34
|
+
} as const;
|
|
35
|
+
export type JobStatus = typeof JobStatus[keyof typeof JobStatus];
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
export function instanceOfJobStatus(value: any): boolean {
|
|
39
|
+
for (const key in JobStatus) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(JobStatus, key)) {
|
|
41
|
+
if (JobStatus[key as keyof typeof JobStatus] === value) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function JobStatusFromJSON(json: any): JobStatus {
|
|
50
|
+
return JobStatusFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function JobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobStatus {
|
|
54
|
+
return json as JobStatus;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function JobStatusToJSON(value?: JobStatus | null): any {
|
|
58
|
+
return value as any;
|
|
59
|
+
}
|
|
60
|
+
|
package/src/models/Snapshot.ts
CHANGED
|
@@ -11,9 +11,12 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
14
16
|
import type { Inventory } from './Inventory';
|
|
15
17
|
import {
|
|
16
18
|
InventoryFromJSON,
|
|
19
|
+
InventoryFromJSONTyped,
|
|
17
20
|
InventoryToJSON,
|
|
18
21
|
} from './Inventory';
|
|
19
22
|
|
package/src/models/VMs.ts
CHANGED
|
@@ -16,26 +16,31 @@ import { mapValues } from '../runtime';
|
|
|
16
16
|
import type { MigrationIssue } from './MigrationIssue';
|
|
17
17
|
import {
|
|
18
18
|
MigrationIssueFromJSON,
|
|
19
|
+
MigrationIssueFromJSONTyped,
|
|
19
20
|
MigrationIssueToJSON,
|
|
20
21
|
} from './MigrationIssue';
|
|
21
22
|
import type { OsInfo } from './OsInfo';
|
|
22
23
|
import {
|
|
23
24
|
OsInfoFromJSON,
|
|
25
|
+
OsInfoFromJSONTyped,
|
|
24
26
|
OsInfoToJSON,
|
|
25
27
|
} from './OsInfo';
|
|
26
28
|
import type { DiskSizeTierSummary } from './DiskSizeTierSummary';
|
|
27
29
|
import {
|
|
28
30
|
DiskSizeTierSummaryFromJSON,
|
|
31
|
+
DiskSizeTierSummaryFromJSONTyped,
|
|
29
32
|
DiskSizeTierSummaryToJSON,
|
|
30
33
|
} from './DiskSizeTierSummary';
|
|
31
34
|
import type { DiskTypeSummary } from './DiskTypeSummary';
|
|
32
35
|
import {
|
|
33
36
|
DiskTypeSummaryFromJSON,
|
|
37
|
+
DiskTypeSummaryFromJSONTyped,
|
|
34
38
|
DiskTypeSummaryToJSON,
|
|
35
39
|
} from './DiskTypeSummary';
|
|
36
40
|
import type { VMResourceBreakdown } from './VMResourceBreakdown';
|
|
37
41
|
import {
|
|
38
42
|
VMResourceBreakdownFromJSON,
|
|
43
|
+
VMResourceBreakdownFromJSONTyped,
|
|
39
44
|
VMResourceBreakdownToJSON,
|
|
40
45
|
} from './VMResourceBreakdown';
|
|
41
46
|
|
|
@@ -117,7 +122,7 @@ export interface VMs {
|
|
|
117
122
|
* @memberof VMs
|
|
118
123
|
* @deprecated
|
|
119
124
|
*/
|
|
120
|
-
os
|
|
125
|
+
os?: { [key: string]: number; };
|
|
121
126
|
/**
|
|
122
127
|
*
|
|
123
128
|
* @type {{ [key: string]: OsInfo; }}
|
|
@@ -149,7 +154,6 @@ export function instanceOfVMs(value: object): value is VMs {
|
|
|
149
154
|
if (!('diskGB' in value) || value['diskGB'] === undefined) return false;
|
|
150
155
|
if (!('diskCount' in value) || value['diskCount'] === undefined) return false;
|
|
151
156
|
if (!('powerStates' in value) || value['powerStates'] === undefined) return false;
|
|
152
|
-
if (!('os' in value) || value['os'] === undefined) return false;
|
|
153
157
|
if (!('notMigratableReasons' in value) || value['notMigratableReasons'] === undefined) return false;
|
|
154
158
|
if (!('migrationWarnings' in value) || value['migrationWarnings'] === undefined) return false;
|
|
155
159
|
return true;
|
|
@@ -176,11 +180,11 @@ export function VMsFromJSONTyped(json: any, ignoreDiscriminator: boolean): VMs {
|
|
|
176
180
|
'diskCount': VMResourceBreakdownFromJSON(json['diskCount']),
|
|
177
181
|
'nicCount': json['nicCount'] == null ? undefined : VMResourceBreakdownFromJSON(json['nicCount']),
|
|
178
182
|
'powerStates': json['powerStates'],
|
|
179
|
-
'os': json['os'],
|
|
183
|
+
'os': json['os'] == null ? undefined : json['os'],
|
|
180
184
|
'osInfo': json['osInfo'] == null ? undefined : (mapValues(json['osInfo'], OsInfoFromJSON)),
|
|
181
185
|
'notMigratableReasons': json['notMigratableReasons'] == null ? undefined : ((json['notMigratableReasons'] as Array<any>).map(MigrationIssueFromJSON)),
|
|
182
186
|
'migrationWarnings': json['migrationWarnings'] == null ? undefined : ((json['migrationWarnings'] as Array<any>).map(MigrationIssueFromJSON)),
|
|
183
|
-
|
|
187
|
+
};
|
|
184
188
|
}
|
|
185
189
|
|
|
186
190
|
export function VMsToJSON(value?: VMs | null): any {
|
package/src/models/index.ts
CHANGED
|
@@ -15,6 +15,8 @@ export * from './Infra';
|
|
|
15
15
|
export * from './Inventory';
|
|
16
16
|
export * from './InventoryData';
|
|
17
17
|
export * from './Ipv4Config';
|
|
18
|
+
export * from './Job';
|
|
19
|
+
export * from './JobStatus';
|
|
18
20
|
export * from './Label';
|
|
19
21
|
export * from './MigrationIssue';
|
|
20
22
|
export * from './ModelError';
|
package/src/runtime.ts
CHANGED