Skip to content

Commit

Permalink
Swagger closure for Azure Migration Hub Operations (#4330)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
peetlotla authored and praries880 committed Nov 8, 2018
1 parent cda881f commit badd1de
Show file tree
Hide file tree
Showing 21 changed files with 3,496 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName":"project01",
"machineName":"vm1"
},
"responses":{
"200":{
"body":{
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/machines/vm1",
"name":"vm1",
"type":"Microsoft.Migrate/MigrateProjects/machines",
"eTag":"\"a701c63a-0000-0000-0000-59c12fe60000\"",
"properties":{
"discoveryData":[
{
"osType":"windows",
"osName":"windows server 2012 R2",
"osVersion":"10.0.01",
"enqueueTime":"2017-09-12T13:11:10.8808917Z",
"solutionName":"mysolution",
"machineId":"abcd",
"machineManagerId":"efgh",
"machineName":"vm1",
"extendedInfo":{
"custom1":"mycustomvalue"
}
}
],
"assessmentData":[
{
"assessmentId":"myid1",
"targetVMSize":"Standard_D4_v2",
"targetVMLocation":"eastus",
"targetStorageType":{
"disk1":"Standard"
},
"enqueueTime":"2017-09-12T13:11:20.8808917Z",
"solutionName":"mysolution",
"machineId":"abcd",
"machineManagerId":"efgh",
"machineName":"vm1",
"extendedInfo":{
"custom2":"mycustomvalue"
}
}
],
"migrationData":[
{
"migrationPhase":"Migrated",
"migrationTested":true,
"replicationProgressPercentage":100,
"targetVMArmId":"/subscriptions/abc/resourcegroups/rg/providers/microsoft.compute/virtualmachines/vm1",
"enqueueTime":"2017-09-12T13:11:30.8808917Z",
"solutionName":"mysolution",
"machineId":"abcd",
"machineManagerId":"efgh",
"machineName":"vm1",
"extendedInfo":{
"custom3":"mycustomvalue"
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName":"project01"
},
"responses":{
"200":{
"body":{
"value":[
{
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/machines/vm1",
"name":"vm1",
"type":"Microsoft.Migrate/MigrateProjects/machines",
"eTag":"\"b701c63a-0000-0000-0000-59c12fe60000\"",
"properties":{
"discoveryData":[
{
"osType":"windows",
"osName":"windows server 2012 R2",
"osVersion":"10.0.01",
"enqueueTime":"2017-09-12T13:11:10.8808917Z",
"solutionName":"mysolution",
"machineId":"abcd",
"machineManagerId":"efgh",
"machineName":"vm1",
"extendedInfo":{
"custom1":"mycustomvalue"
}
}
],
"assessmentData":[
{
"assessmentId":"myid1",
"targetVMSize":"Standard_D4_v2",
"targetVMLocation":"eastus",
"targetStorageType":{
"disk1":"Standard"
},
"enqueueTime":"2017-09-12T13:11:20.8808917Z",
"solutionName":"mysolution",
"machineId":"abcd",
"machineManagerId":"efgh",
"machineName":"vm1",
"extendedInfo":{
"custom2":"mycustomvalue"
}
}
],
"migrationData":[
{
"migrationPhase":"Migrated",
"migrationTested":true,
"replicationProgressPercentage":100,
"targetVMArmId":"/subscriptions/abc/resourcegroups/rg/providers/microsoft.compute/virtualmachines/vm1",
"enqueueTime":"2017-09-12T13:11:30.8808917Z",
"solutionName":"mysolution",
"machineId":"abcd",
"machineManagerId":"efgh",
"machineName":"vm1",
"extendedInfo":{
"custom3":"mycustomvalue"
}
}
]
}
},
{
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/machines/vm2",
"name":"vm2",
"type":"Microsoft.Migrate/MigrateProjects/machines",
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
"properties":{
"discoveryData":[
{
"osType":"windows",
"osName":"windows server 2012 R2",
"osVersion":"10.0.01",
"enqueueTime":"2017-09-12T13:11:10.8808917Z",
"solutionName":"mysolution",
"machineId":"xyz",
"machineManagerId":"efgh",
"machineName":"vm2",
"extendedInfo":{
"custom1":"mycustomvalue"
}
}
],
"assessmentData":[
{
"assessmentId":"myid1",
"targetVMSize":"Standard_D4_v2",
"targetVMLocation":"eastus",
"targetStorageType":{
"disk1":"Standard"
},
"enqueueTime":"2017-09-12T13:11:20.8808917Z",
"solutionName":"mysolution",
"machineId":"xyz",
"machineManagerId":"efgh",
"machineName":"vm2",
"extendedInfo":{
"custom2":"mycustomvalue"
}
}
],
"migrationData":[
{
"migrationPhase":"Migrated",
"migrationTested":true,
"replicationProgressPercentage":100,
"targetVMArmId":"/subscriptions/abc/resourcegroups/rg/providers/microsoft.compute/virtualmachines/vm2",
"enqueueTime":"2017-09-12T13:11:30.8808917Z",
"solutionName":"mysolution",
"machineId":"xyz",
"machineManagerId":"efgh",
"machineName":"vm2",
"extendedInfo":{
"custom3":"mycustomvalue"
}
}
]
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName": "project01",
"migrateErrorName":"MigrateError01"
},
"responses":{
"200":{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName": "project01",
"migrateErrorName":"MigrateError01"
},
"responses":{
"200":{
"body":{
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/MigrateError01",
"name":"MigrateError01",
"type":"Microsoft.Migrate/MigrateProjects/MigrateErrors",
"properties":{
"errorCode":1234,
"errorMessage":"Invalid machine name.",
"recommendation":"Please correct the error and retry the operation.",
"possibleCauses":"Invalid input in the data.",
"solution":"mysolution",
"machine":"mymachine1"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName": "project01"
},
"responses":{
"200":{
"body":{
"value":[
{
"properties":{
"errorCode":1234,
"errorMessage":"Invalid machine name.",
"recommendation":"Please correct the error and retry the operation.",
"possibleCauses":"Invalid input in the data.",
"solution":"mysolution",
"machine":"mymachine1"
},
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/MigrateError01",
"name":"MigrateError01",
"type":"Microsoft.Migrate/MigrateProjects/MigrateErrors"
},
{
"properties":{
"errorCode":1288,
"errorMessage":"Invalid foramt.",
"recommendation":"Please correct the error and retry the operation.",
"possibleCauses":"Invalid input in the data.",
"solution":"mysolution",
"machine":"mymachine2"
},
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01/MigrateError02",
"name":"MigrateError02",
"type":"Microsoft.Migrate/MigrateProjects/MigrateErrors"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName":"project01"
},
"responses":{
"200":{

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName":"project01"
},
"responses":{
"200":{
"body":{
"properties":{
"registeredTools":[
"SAS",
"SMS"
],
"summary":{
"discoveredCount":23223,
"assessedCount":43,
"replicatingCount":123,
"migratedCount":10023
}
},
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01",
"name":"project01",
"type":"Microsoft.Migrate/MigrateProjects",
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
"location":"West Us",
"tags":{

}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"parameters":{
"resourceGroupName":"myResourceGroup",
"api-version":"2018-09-01-preview",
"subscriptionId":"75dd7e42-4fd1-4512-af04-83ad9864335b",
"migrateProjectName":"project01",
"project":{
"properties":{
"registeredTools":[
"SMS"
],
"summary":{

}
},
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01",
"name":"project01",
"type":"Microsoft.Migrate/MigrateProjects",
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
"location":"Southeast Asia",
"tags":{

}
}
},
"responses":{
"200":{
"body":{
"properties":{
"registeredTools":[
"SMS"
],
"summary":{

}
},
"id":"/subscriptions/75dd7e42-4fd1-4512-af04-83ad9864335b/resourceGroups/myResourceGroup/providers/Microsoft.Migrate/MigrateProjects/project01",
"name":"project01",
"type":"Microsoft.Migrate/MigrateProjects",
"eTag":"\"b701c73a-0000-0000-0000-59c12ff00000\"",
"location":"Southeast Asia",
"tags":{

}
}
}
}
}
Loading

0 comments on commit badd1de

Please sign in to comment.