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

Move RestorePoint properties into new properties bag for restore point #14638

Merged
merged 24 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cd6edc2
added
roipmsft Feb 12, 2021
211fa72
Merge branch 'master' of github.com:roipmsft/azure-rest-api-specs
roipmsft Feb 12, 2021
e089b2c
remove hello
roipmsft Feb 12, 2021
3bea092
Merge remote-tracking branch 'upstream/master'
roipmsft Apr 14, 2021
c0e75fb
Merge branch 'Azure:master' into master
roipmsft May 21, 2021
9ec452b
Merge branch 'master' of github.com:roipmsft/azure-rest-api-specs
roipmsft May 21, 2021
6c9f65a
add excludeDisks to new RestorePoint properties bag
roipmsft May 21, 2021
a88e10b
update examples
roipmsft May 21, 2021
de5c751
move all properties to properties bag
roipmsft Jun 2, 2021
e719aa8
add sourceMetadata.location
roipmsft Jun 3, 2021
cd7d985
Merge remote-tracking branch 'upstream/master' into dev/roip/Properti…
roipmsft Jun 8, 2021
3337772
Merge branch 'Azure:master' into dev/roip/PropertiesBagRestorePoint
roipmsft Jun 8, 2021
cf19429
remove vmName
roipmsft Jun 21, 2021
5f76cb6
remove properties fromp parameters
roipmsft Jun 21, 2021
bff31f8
Merge branch 'Azure:master' into master
roipmsft Jun 21, 2021
81099e3
Merge branch 'master' of github.com:roipmsft/azure-rest-api-specs int…
roipmsft Jun 21, 2021
40bb463
Merge branch 'dev/roip/PropertiesBagRestorePoint' of github.com:roipm…
roipmsft Jun 21, 2021
7f6c001
use westus
roipmsft Jun 21, 2021
ef90439
update region to westus
roipmsft Jun 21, 2021
ec9da33
add type object
roipmsft Jun 25, 2021
85458c5
Merge branch 'master' of github.com:roipmsft/azure-rest-api-specs
roipmsft Jun 29, 2021
8b64b70
Merge branch 'master' into dev/roip/PropertiesBagRestorePoint
roipmsft Jun 29, 2021
87d608f
Merge branch 'Azure:master' into dev/roip/PropertiesBagRestorePoint
roipmsft Jun 29, 2021
4b1e092
Merge branch 'Azure:master' into dev/roip/PropertiesBagRestorePoint
roipmsft Jun 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7538,6 +7538,10 @@
"securityProfile": {
"$ref": "#/definitions/SecurityProfile",
"description": "Gets the security profile."
},
"location": {
"type": "string",
"description": "Location of the VM from which the restore point was created."
}
},
"description": "Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation."
Expand Down Expand Up @@ -7657,6 +7661,28 @@
},
"RestorePoint": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, why this property need x-ms-client-flatten true? this extension will impact sdk and cli generation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yungezz this is the pattern followed in the compute.json file

x-ms-client-flatten

https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md
This extension allows to flatten deeply nested payloads into a more user friendly object.

Can you please elaborate, what do you mean by 'impact sdk and cli generation'?
Does using "x-ms-client-flatten"=true break something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customers are not using RestorePoint yet, so we dont have to worry about breaking changes for restore points

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what I mean is the extension will cause different generation logic in sdk/cli genertor, thus different interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not sure I understand, sorry.

Are you saying "x-ms-client-flatten"=true should never be used?
Am I using "x-ms-client-flatten"=true incorrectly?
Are there some cases, where it can be used, and other cases where it should not be used? What are those cases?

"$ref": "#/definitions/RestorePointProperties"
}
},
"allOf": [
{
"$ref": "#/definitions/ProxyResource"
}
],
"description": "Restore Point details."
},
"RestorePointProperties": {
"type": "object",
"properties": {
"excludeDisks": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiEntityReference"
},
"description": "List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included."
},
"sourceMetadata": {
"readOnly": true,
"$ref": "#/definitions/RestorePointSourceMetadata",
Expand Down Expand Up @@ -7685,21 +7711,9 @@
"$ref": "#/definitions/RestorePointProvisioningDetails",
"readOnly": true,
"description": "Gets the provisioning details set by the server during Create restore point operation."
},
"excludeDisks": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiEntityReference"
},
"description": "List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included."
}
},
"allOf": [
{
"$ref": "#/definitions/ProxyResource"
}
],
"description": "Restore Point details."
"description": "The restore point properties."
},
"ComputeOperationListResult": {
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,84 +4,88 @@
"resourceGroupName": "myResourceGroup",
"restorePointCollectionName": "rpcName",
"restorePointName": "rpName",
"vmName": "myVM",
"api-version": "2021-03-01",
"parameters": {
roipmsft marked this conversation as resolved.
Show resolved Hide resolved
"excludeDisks": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f"
}
]
"properties": {
"excludeDisks": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123"
}
]
}
}
},
"responses": {
"201": {
"body": {
"name": "rpName",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName",
"sourceMetadata": {
"vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7",
"hardwareProfile": {
"vmSize": "Standard_B1s"
},
"storageProfile": {
"osDisk": {
"osType": "Windows",
"name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57"
}
"properties": {
"excludeDisks": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123"
}
],
"sourceMetadata": {
"vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7",
"hardwareProfile": {
"vmSize": "Standard_B1s"
},
"dataDisks": [
{
"lun": 1,
"name": "testingexcludedisk_DataDisk_1",
"caching": "None",
"storageProfile": {
"osDisk": {
"osType": "Windows",
"name": "osDisk123",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1"
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk123"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5"
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/osDisk123_22b4bdfe-6c54-4f72-84d8-85d8860f0c57"
}
},
"dataDisks": [
{
"lun": 1,
"name": "dataDisk123",
"caching": "None",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/dataDisk123"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/dataDisk123_68785190-1acb-4d5e-a8ae-705b45f3dca5"
}
}
]
},
"osProfile": {
"computerName": "computerName",
"adminUsername": "admin",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
]
},
"osProfile": {
"computerName": "computerName",
"adminUsername": "admin",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
"location": "westus"
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
"provisioningState": "Succeeded",
"consistencyMode": "ApplicationConsistent",
"provisioningDetails": {
"creationTime": "2021-01-27T20:35:05.8401519+00:00",
"totalUsedSizeInBytes": 10835349504,
"statusCode": 0,
"statusMessage": "{\"jobMessage\":\"\",\"messageStr\":\"1/27/2021 8:35:56 PM , snapshotCreator=guestExtension, hostStatusCodePreSnapshot=200, Plugin enable Succeeded (command: Snapshot) Snapshot command completed \",\"snapshotConsistency\":2}"
}
},
"provisioningState": "Succeeded",
"consistencyMode": "ApplicationConsistent",
"provisioningDetails": {
"creationTime": "2021-01-27T20:35:05.8401519+00:00",
"totalUsedSizeInBytes": 10835349504,
"statusCode": 0,
"statusMessage": "{\"jobMessage\":\"\",\"messageStr\":\"1/27/2021 8:35:56 PM , snapshotCreator=guestExtension, hostStatusCodePreSnapshot=200, Plugin enable Succeeded (command: Snapshot) Snapshot command completed \",\"snapshotConsistency\":2}"
},
"excludeDisks": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f"
}
]
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,69 +11,72 @@
"body": {
"name": "rpName",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName",
"sourceMetadata": {
"vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7",
"hardwareProfile": {
"vmSize": "Standard_B1s"
},
"storageProfile": {
"osDisk": {
"osType": "Windows",
"name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57"
}
"properties": {
"excludeDisks": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f"
}
],
"sourceMetadata": {
"vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7",
"hardwareProfile": {
"vmSize": "Standard_B1s"
},
"dataDisks": [
{
"lun": 1,
"name": "testingexcludedisk_DataDisk_1",
"caching": "None",
"storageProfile": {
"osDisk": {
"osType": "Windows",
"name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1"
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5"
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57"
}
},
"dataDisks": [
{
"lun": 1,
"name": "testingexcludedisk_DataDisk_1",
"caching": "None",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1"
},
"diskRestorePoint": {
"id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5"
}
}
]
},
"osProfile": {
"computerName": "computerName",
"adminUsername": "admin",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
]
},
"osProfile": {
"computerName": "computerName",
"adminUsername": "admin",
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true
},
"secrets": [],
"allowExtensionOperations": true,
"requireGuestProvisionSignal": true
"location": "westus"
},
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true
}
}
},
"provisioningState": "Succeeded",
"consistencyMode": "ApplicationConsistent",
"provisioningDetails": {
"creationTime": "2021-01-27T20:35:05.8401519+00:00",
"totalUsedSizeInBytes": 10835349504,
"statusCode": 0,
"statusMessage": "{\"jobMessage\":\"\",\"messageStr\":\"1/27/2021 8:35:56 PM , snapshotCreator=guestExtension, hostStatusCodePreSnapshot=200, Plugin enable Succeeded (command: Snapshot) Snapshot command completed \",\"snapshotConsistency\":2}"
},
"excludeDisks": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f"
"provisioningState": "Succeeded",
"consistencyMode": "ApplicationConsistent",
"provisioningDetails": {
"creationTime": "2021-01-27T20:35:05.8401519+00:00",
"totalUsedSizeInBytes": 10835349504,
"statusCode": 0,
"statusMessage": "{\"jobMessage\":\"\",\"messageStr\":\"1/27/2021 8:35:56 PM , snapshotCreator=guestExtension, hostStatusCodePreSnapshot=200, Plugin enable Succeeded (command: Snapshot) Snapshot command completed \",\"snapshotConsistency\":2}"
}
]
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "myRpc",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc",
"type": "Microsoft.Compute/restorePointCollections",
"location": "West US",
"location": "westus",
"tags": {
"myTag1": "tagValue1"
},
Expand Down
Loading