Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vmId to the virtual machine properties. #230

Merged
merged 1 commit into from Apr 12, 2016
Merged

Add vmId to the virtual machine properties. #230

merged 1 commit into from Apr 12, 2016

Conversation

ivanignatiev
Copy link
Contributor

Resolve the issue #188 for the api version 2016-03-30.

Azure REST API request/response example:

https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ds-vms-rg/providers/Microsoft.Compute/virtualMachines/TestImageVMCentOS?api-version=2016-03-30
{
  "properties": {
    "vmId": "c8fdfbd8-7745-48d2-afd6-63cb6495b4c8",
    "hardwareProfile": {
      "vmSize": "Standard_A1"
    },
    "storageProfile": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "7.2",
        "version": "latest"
      },
      "osDisk": {
        "osType": "Linux",
        "name": "TestImageVMCentOS",
        "createOption": "FromImage",
        "vhd": {
          "uri": "https://storageaccount.blob.core.windows.net/vhds/OSDisk.vhd"
        },
        "caching": "ReadWrite"
      },
      "dataDisks": []
    },
    "osProfile": {
      "computerName": "TestVM",
      "adminUsername": "azureadmin",
      "linuxConfiguration": {
        "disablePasswordAuthentication": false
      },
      "secrets": []
    },
    "networkProfile": {
      "networkInterfaces": [
        {
          "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ds-vms-rg/providers/Microsoft.Network/networkInterfaces/testvmnic"
        }
      ]
    },
    "provisioningState": "Succeeded"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myTestResourceGroup/providers/Microsoft.Compute/virtualMachines/TestVM",
  "name": "TestVM",
  "type": "Microsoft.Compute/virtualMachines",
  "location": "westeurope"
}

We have the same field in the list of VMs:

https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myTestResourceGroup/providers/Microsoft.Compute/virtualMachines?api-version=2016-03-30

@azurecla
Copy link

Hi @ivanignatiev, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@amarzavery
Copy link
Contributor

@huangpf @hyonholee, @sauryadas Can you take a look?

@huangpf
Copy link
Contributor

huangpf commented Apr 12, 2016

LGTM.

@amarzavery amarzavery merged commit 3a9e2f2 into Azure:master Apr 12, 2016
blueww pushed a commit to blueww/azure-rest-api-specs that referenced this pull request Dec 8, 2017
* Initial checkin of DMS swagger

* Update readme.md and resourceschemas.md

* moving to correct folder

* Adding x-ms-example to each API

* Replace string with object for example responses.

* Adding missing response codes in examples

* Apply default VS formatting to the Data MIgration Service RP spec.

* Correcting readme.md and renaming to consistent path. (Azure#128)

* Update AutoRest configuration file for DataMigration service

* Fix typo in DMS AutoRest configuration

* Update the AutoRest configuration file for Data Migration service (Azure#131)

* Update AutoRest configuration file for DataMigration service

* Adding Python autorest codegen configuration.

* Fixing the output-folder for Python code-gen.

* Adding Python autorest codegen configuration. (Azure#132)

Adding Python autorest codegen configuration.

* Partition some of the definitions (Azure#3)

- Separate services, tasks and projects
- Extract data models for first few scenarios into separate files

* Add Run Oracle/MySql definitions.

* Adding RunCloudDB and RunMigration scenarios.

* Add Select Oracle, MySql scenarios.

* Change database inputs.

* Add validate scenarios

* Add missing properties.

* Add missing scenarios.

* Fix task output structure.

* Minor fix.

* Minor fixes.

* Project and Connection Info changes

* Project and Connection Info changes

* Move connection info to Common.json

* Change naming conventions.

* Fix issues with merge.

* Fix build

* Change back TaskOutput/TaskResult structure.

* Add support for 3 levels of migration outputs.

* - Remove 'foreign' word references.
- Simplify naming for some scenarios.

* change to use service name in uri

* Remove wrapper object for input.

* Add error outputs to Sql to Sql and Sql to Sql DB scenarios.

* Minor bug fixes.
- Remove unused properties, some renaming.

* Clean up and removing un used def in TasksCommon.json

* Add project to the tasks url

* Remove discriminator type as enum, Swagger 2.0 spec it must be string

* Use same resource for PUT and GET operations for tasks.
- This change makes tasks similar to projects. The same object is used in all operations now. For PUT, some of the properties are not required and have been made read-only.
- Similar to Projects, all the non-common properties are under 'TaskProperties'.

* Revert "Use same resource for PUT and GET operations for tasks."

This reverts commit a7cc0a47f1659edf6d07aa88f351a8e038032e60.

* Changes to make GET/PUT object the same.
Now, based on the TaskProperties object, end user will know the input/output types.

* Minor bug fix.

* Minor fixes based on review comments.

* Fix typo

* Remove unused enum.
Swagger 2.0 does not support adding enums as discriminator.

* Add missing descriptions to fix warnings.

* Remove validationErrors from TaskOutput as it is not common for all task outputs.

* Use correct ConnectionInfo type objects.

* Add SQL as supported project source platform.

* Remove unused objects from TasksCommon.json

* Fix Cloud db output - It also has database level and migration level results.

* Fix SqlConnectionInfo.

* Fix Connect to target scenarios.
1. Rename them to 'ConnectToTarget'.
2. I still have 'ConnectToTarget.AnySql' which will be removed once we refactor Oracle/MySql to use one of the other scenarios.
3. ConnectToTargetSqlDb was missed out. It already exists today, but was missing from the spec.

* Add separate database level and top level objects for ConnectToSource.SqlServer.

This is already implemented, but was missed out from the json.

* Fix description.

* Use common objects where possible for foreign scenarios.

* Update MigrateSqlServerCloudDbTask.json

* Update MigrateSqlServerSqlDbTask.json

* Update MigrateSqlServerSqlServerTask.json

* Putting tasks directly under services as task nesting under project is still not implemented.

* Add property missed out.

* Revert "Add property missed out."

This reverts commit bdb324a86f62977618b6beae802759abb12023a0.

* Add missing property

* Revert "Putting tasks directly under services as task nesting under project is still not implemented."

This reverts commit dea7ea9b7fe2664a7a6bafca6df3b1e106ddd2b9.

* Putting tasks directly under services as task nesting under project is still not implemented.

* Revert "Putting tasks directly under services as task nesting under project is still not implemented."

This reverts commit dea7ea9b7fe2664a7a6bafca6df3b1e106ddd2b9.

* Add missing backupShareUserName property.

* Moving DMS service and Project as Tracked Resource and Task as Proxy Resource as per ARM specs
No changes to JSON structure

* Fix tasks url

* Merge from current (Azure#231)

Merge from Azure/azure-rest-api-specs-pr/current branch

* Change serverDefaultPath to serverDefaultDataPath.

* Fix Autorest linter errors.

* Remove billing 2017-11-01 from some merge in current.

* Update ResourceSchemas.md for datamigration

* Revert files to 'current' branch state.

* Revert package.json to 'current' branch state.

* Added Validation changes

* Fix url - Tasks should be under projects.

* Remove projectName from task input as it can now be obtained from RP as tasks are always nested under projects.

* Revert "Remove projectName from task input as it can now be obtained from RP as tasks are always nested under projects."

This reverts commit d8d3bd3138dc7b897ab226c9939c2c0875ba4eb6.

* Add start/stop action and examples in the Swagger spec.

* Add enums for targets MI and SQL on VM

* Fix bug with nesting of tasks under projects.

* Fix ordering - taskName should be after projectName.

* Update MigrateSqlServerSqlDbTask.json

* Updating the types for migration validation

* Updating description and removed one input from the spec to simplify the input.

* Adding security definition

* Fixing errors and updating types after testing the codegen

* Fix some typos.

* Updating documentation and naming changes missed in the previous commit (Azure#253)

* Updating documentation and naming based on comments from Pavel

* More naming changes

* fixing review comments

* Add new ProvisioningState values and new service status values.

* Remove C# specific comment in REST API

* Fix the name of samples for DMS start/stop.

* Add "force" parameter

* update DataMigrationServiceStatusResponce

* change bool to boolean

* Update DataMigrationServiceStatusResponse

* Make DMS start/stop long running operation. Add missing empty parameters property in the examples.

* Add missing parameters for DMS start/stop endpoint.

* Add skus endpoint in DMS Swagger spec. This is for the supported skus when creating new DMS instance. There is another existing skus endpoint for the supported skus for existing DMS instance.

* Change "force" to "deleteRunningTasks"

* Use discriminator value for base class.
This is based on feedback from ARM team regarding use of polymorphic hierarchy. The concern was about the use case when there are newer task type objects already created using newer sdk, but then the client uses an older sdk to access task. By default, this results in error. This change would handle the error more gracefully.

When we add newer task types, DMS service would have to handle requests based on api version and return base type objects if task is not supported by current api version.

Some of the other options to handle this were:
1. re0turning null from the server or
2. returning an exception or
3. ignoring that object (for get all requests) or
4. creating an "Unknown" discriminator type for returning an object that we don't change in the newer API versions or
5. returning the base class object.

Based on feedback from @johanste, 5. is the preferred option.

* Change UnsupportedTask to Unknown.

* Fix a typo. Use capital SKU for consistency in the descriptions.

* Make the description consistent for minimum and maximum property on ResourceSkuCapacity.

* Change from adding discriminator to base class to creating a new object for unknown type.

Also added input and output properties, since we can still send json object representing input and output.

* Add unknown type connection info object.

* Revert "Add unknown type connection info object."

This reverts commit 483eddf153361c3a32369a3b23760b50e789ba86.

* Revert "Change from adding discriminator to base class to creating a new object for unknown type."

This reverts commit 61ff5ac62de000b2d333d65e9badba7f9051a68e.

* Add unknown discriminator value for ConnectionInfo.

* Separate out public preview api.

- Removed all scenarios other than Sql-to-Sqldb
- Removed project artifacts related api from projects
- Removed MySql/Oracle Connection info objects from Common.json
- Removed objects related to foreign migrations from TasksCommon.json

* Fix bug. Change from privateprewview to preview where required for the public preview files.

* Change version from '2017-04-15-preview' to '2017-11-15-preview'

* Add "provisioningState" in ProjectProperties

* Add read-only property for "deleteRunningTasks"

* Remove unnecessary name field from task input/output.

* Remove unsupported enums from source/target platforms.

* Add readOnly property for provisioningState in Services.json

* Revert "Remove unsupported enums from source/target platforms."

This reverts commit d5622805eee2f74f965217d5dd968388f2cc5ebb.

* Remove unsupported enums from source/target platforms.

* also add "provisioningState" in public review folder

* Add skus endpoint in public preview folder.

* Add unknown to base type for public preview folder.

* Make virtualSubnetId as required.

* Remove unnecessary name field from task input/output.

* Fix formatting.

* Fix syntax error.

* Add size to database level migration output.

* Fix bug with deleteRunningTasks parameter

* Add deleteRunningTasks to common parameters.

* Revert "Add size to database level migration output."

This reverts commit 943ea3992e276b38e755dddeb06b462f0dd49543.

* Add sizeMB to database summary result.

* Update api version in the public preview folder for skus.

* Migration Validation changes (Azure#279)

* Fixing issues and adding missing attributes in the Migration Validation Results

* Updating the proper version for public preview

* Updating the comment text

* Added group permissions to the selectsource elements

* Update public preview files and enumerated the list

* Remove "kind" in the example for skus endpoint.

* Add public preview version to ResourceSchemas.md

* Add Unknown enum for Source and Target platforms.

This would be used for fallback mechanism.
Example -
Lets say, version 2 supports Oracle as source enum and version 1 sdk does not. If you create a project with enum 'Oracle' in sdk version 2 and you try to do a GET project with sdk version 1, then RP will return back enum 'Unknown'.
If user tries to do a PUT followed by GET, it would fail with error based on ARM specification.
(For now, if you do a PUT with Unknown, then it will fail with BadRequest error because Unknown is not a valid enum on backend)

* Modified the descriptions for the groups and refactored necessary groups for the public preview.

* Modified the name of the input for the source

* Add parameter "deleteRunningTasks" to delete task. (Azure#282)

* Add parameter "deleteRunningTask" to delete task.

* 2017-04-privatepreview : Add parameter "deleteRunningTask" to delete task

* Add properties missing from Swagger contract.
The properties added/updated here are already being sent by the back-end.

* Minor change - Remove quotes from boolean value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants