Skip to content

Commit badd1de

Browse files
peetlotlapraries880
authored andcommitted
Swagger closure for Azure Migration Hub Operations (#4330)
* Swagger coverage for Azure Migrate Hub operations * Adding Operation_List.json to examples * adding operation result definitions to migrate.json * Update specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json Fixing the JSON schema validation for migrate.json * Update specification/migrateprojects/resource-manager/readme.md Fixing the code generation path for preview swagger. * Update specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json Fixing potential SDK and security errors. * Update specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json Fixing potential new SDK errors. * Proving x-ms-exmaples for response/request payloads for operations. * Fixing schema validation for azure-sdk-for-go. * Fixing schema validation for azure-sdk-for-go. * Added missing patch and delete operations per the feedback. * Swagger fixes for azure-sdk-for-go * Swagger fixes for azure-sdk-for-go * Swagger fixes for azure-sdk-for-go * Fixing schema validation for azure-sdk-for-go. * Adding delete method for migrate errors.
1 parent cda881f commit badd1de

21 files changed

+3496
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName":"project01",
7+
"machineName":"vm1"
8+
},
9+
"responses":{
10+
"200":{
11+
"body":{
12+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/machines/vm1",
13+
"name":"vm1",
14+
"type":"Microsoft.Migrate/MigrateProjects/machines",
15+
"eTag":"\"a701c63a-0000-0000-0000-59c12fe60000\"",
16+
"properties":{
17+
"discoveryData":[
18+
{
19+
"osType":"windows",
20+
"osName":"windows server 2012 R2",
21+
"osVersion":"10.0.01",
22+
"enqueueTime":"2017-09-12T13:11:10.8808917Z",
23+
"solutionName":"mysolution",
24+
"machineId":"abcd",
25+
"machineManagerId":"efgh",
26+
"machineName":"vm1",
27+
"extendedInfo":{
28+
"custom1":"mycustomvalue"
29+
}
30+
}
31+
],
32+
"assessmentData":[
33+
{
34+
"assessmentId":"myid1",
35+
"targetVMSize":"Standard_D4_v2",
36+
"targetVMLocation":"eastus",
37+
"targetStorageType":{
38+
"disk1":"Standard"
39+
},
40+
"enqueueTime":"2017-09-12T13:11:20.8808917Z",
41+
"solutionName":"mysolution",
42+
"machineId":"abcd",
43+
"machineManagerId":"efgh",
44+
"machineName":"vm1",
45+
"extendedInfo":{
46+
"custom2":"mycustomvalue"
47+
}
48+
}
49+
],
50+
"migrationData":[
51+
{
52+
"migrationPhase":"Migrated",
53+
"migrationTested":true,
54+
"replicationProgressPercentage":100,
55+
"targetVMArmId":"/subscriptions/abc/resourcegroups/rg/providers/microsoft.compute/virtualmachines/vm1",
56+
"enqueueTime":"2017-09-12T13:11:30.8808917Z",
57+
"solutionName":"mysolution",
58+
"machineId":"abcd",
59+
"machineManagerId":"efgh",
60+
"machineName":"vm1",
61+
"extendedInfo":{
62+
"custom3":"mycustomvalue"
63+
}
64+
}
65+
]
66+
}
67+
}
68+
}
69+
}
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName":"project01"
7+
},
8+
"responses":{
9+
"200":{
10+
"body":{
11+
"value":[
12+
{
13+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/machines/vm1",
14+
"name":"vm1",
15+
"type":"Microsoft.Migrate/MigrateProjects/machines",
16+
"eTag":"\"b701c63a-0000-0000-0000-59c12fe60000\"",
17+
"properties":{
18+
"discoveryData":[
19+
{
20+
"osType":"windows",
21+
"osName":"windows server 2012 R2",
22+
"osVersion":"10.0.01",
23+
"enqueueTime":"2017-09-12T13:11:10.8808917Z",
24+
"solutionName":"mysolution",
25+
"machineId":"abcd",
26+
"machineManagerId":"efgh",
27+
"machineName":"vm1",
28+
"extendedInfo":{
29+
"custom1":"mycustomvalue"
30+
}
31+
}
32+
],
33+
"assessmentData":[
34+
{
35+
"assessmentId":"myid1",
36+
"targetVMSize":"Standard_D4_v2",
37+
"targetVMLocation":"eastus",
38+
"targetStorageType":{
39+
"disk1":"Standard"
40+
},
41+
"enqueueTime":"2017-09-12T13:11:20.8808917Z",
42+
"solutionName":"mysolution",
43+
"machineId":"abcd",
44+
"machineManagerId":"efgh",
45+
"machineName":"vm1",
46+
"extendedInfo":{
47+
"custom2":"mycustomvalue"
48+
}
49+
}
50+
],
51+
"migrationData":[
52+
{
53+
"migrationPhase":"Migrated",
54+
"migrationTested":true,
55+
"replicationProgressPercentage":100,
56+
"targetVMArmId":"/subscriptions/abc/resourcegroups/rg/providers/microsoft.compute/virtualmachines/vm1",
57+
"enqueueTime":"2017-09-12T13:11:30.8808917Z",
58+
"solutionName":"mysolution",
59+
"machineId":"abcd",
60+
"machineManagerId":"efgh",
61+
"machineName":"vm1",
62+
"extendedInfo":{
63+
"custom3":"mycustomvalue"
64+
}
65+
}
66+
]
67+
}
68+
},
69+
{
70+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/machines/vm2",
71+
"name":"vm2",
72+
"type":"Microsoft.Migrate/MigrateProjects/machines",
73+
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
74+
"properties":{
75+
"discoveryData":[
76+
{
77+
"osType":"windows",
78+
"osName":"windows server 2012 R2",
79+
"osVersion":"10.0.01",
80+
"enqueueTime":"2017-09-12T13:11:10.8808917Z",
81+
"solutionName":"mysolution",
82+
"machineId":"xyz",
83+
"machineManagerId":"efgh",
84+
"machineName":"vm2",
85+
"extendedInfo":{
86+
"custom1":"mycustomvalue"
87+
}
88+
}
89+
],
90+
"assessmentData":[
91+
{
92+
"assessmentId":"myid1",
93+
"targetVMSize":"Standard_D4_v2",
94+
"targetVMLocation":"eastus",
95+
"targetStorageType":{
96+
"disk1":"Standard"
97+
},
98+
"enqueueTime":"2017-09-12T13:11:20.8808917Z",
99+
"solutionName":"mysolution",
100+
"machineId":"xyz",
101+
"machineManagerId":"efgh",
102+
"machineName":"vm2",
103+
"extendedInfo":{
104+
"custom2":"mycustomvalue"
105+
}
106+
}
107+
],
108+
"migrationData":[
109+
{
110+
"migrationPhase":"Migrated",
111+
"migrationTested":true,
112+
"replicationProgressPercentage":100,
113+
"targetVMArmId":"/subscriptions/abc/resourcegroups/rg/providers/microsoft.compute/virtualmachines/vm2",
114+
"enqueueTime":"2017-09-12T13:11:30.8808917Z",
115+
"solutionName":"mysolution",
116+
"machineId":"xyz",
117+
"machineManagerId":"efgh",
118+
"machineName":"vm2",
119+
"extendedInfo":{
120+
"custom3":"mycustomvalue"
121+
}
122+
}
123+
]
124+
}
125+
}
126+
]
127+
}
128+
}
129+
}
130+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName": "project01",
7+
"migrateErrorName":"MigrateError01"
8+
},
9+
"responses":{
10+
"200":{
11+
12+
}
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName": "project01",
7+
"migrateErrorName":"MigrateError01"
8+
},
9+
"responses":{
10+
"200":{
11+
"body":{
12+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/MigrateError01",
13+
"name":"MigrateError01",
14+
"type":"Microsoft.Migrate/MigrateProjects/MigrateErrors",
15+
"properties":{
16+
"errorCode":1234,
17+
"errorMessage":"Invalid machine name.",
18+
"recommendation":"Please correct the error and retry the operation.",
19+
"possibleCauses":"Invalid input in the data.",
20+
"solution":"mysolution",
21+
"machine":"mymachine1"
22+
}
23+
}
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName": "project01"
7+
},
8+
"responses":{
9+
"200":{
10+
"body":{
11+
"value":[
12+
{
13+
"properties":{
14+
"errorCode":1234,
15+
"errorMessage":"Invalid machine name.",
16+
"recommendation":"Please correct the error and retry the operation.",
17+
"possibleCauses":"Invalid input in the data.",
18+
"solution":"mysolution",
19+
"machine":"mymachine1"
20+
},
21+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/MigrateError01",
22+
"name":"MigrateError01",
23+
"type":"Microsoft.Migrate/MigrateProjects/MigrateErrors"
24+
},
25+
{
26+
"properties":{
27+
"errorCode":1288,
28+
"errorMessage":"Invalid foramt.",
29+
"recommendation":"Please correct the error and retry the operation.",
30+
"possibleCauses":"Invalid input in the data.",
31+
"solution":"mysolution",
32+
"machine":"mymachine2"
33+
},
34+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/MigrateError02",
35+
"name":"MigrateError02",
36+
"type":"Microsoft.Migrate/MigrateProjects/MigrateErrors"
37+
}
38+
]
39+
}
40+
}
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName":"project01"
7+
},
8+
"responses":{
9+
"200":{
10+
11+
}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName":"project01"
7+
},
8+
"responses":{
9+
"200":{
10+
"body":{
11+
"properties":{
12+
"registeredTools":[
13+
"SAS",
14+
"SMS"
15+
],
16+
"summary":{
17+
"discoveredCount":23223,
18+
"assessedCount":43,
19+
"replicatingCount":123,
20+
"migratedCount":10023
21+
}
22+
},
23+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01",
24+
"name":"project01",
25+
"type":"Microsoft.Migrate/MigrateProjects",
26+
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
27+
"location":"West Us",
28+
"tags":{
29+
30+
}
31+
}
32+
}
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"parameters":{
3+
"resourceGroupName":"myResourceGroup",
4+
"api-version":"2018-09-01-preview",
5+
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
6+
"migrateProjectName":"project01",
7+
"project":{
8+
"properties":{
9+
"registeredTools":[
10+
"SMS"
11+
],
12+
"summary":{
13+
14+
}
15+
},
16+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01",
17+
"name":"project01",
18+
"type":"Microsoft.Migrate/MigrateProjects",
19+
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
20+
"location":"Southeast Asia",
21+
"tags":{
22+
23+
}
24+
}
25+
},
26+
"responses":{
27+
"200":{
28+
"body":{
29+
"properties":{
30+
"registeredTools":[
31+
"SMS"
32+
],
33+
"summary":{
34+
35+
}
36+
},
37+
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01",
38+
"name":"project01",
39+
"type":"Microsoft.Migrate/MigrateProjects",
40+
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
41+
"location":"Southeast Asia",
42+
"tags":{
43+
44+
}
45+
}
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)