From e4fc56784c24dda1f669845bb7250ad1625bb0ef Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Wed, 6 Apr 2022 11:48:14 -0700 Subject: [PATCH 1/7] GuestPatching: Adding AutomaticByPlatofrmSettings within Linux and Windows Patch settings for VM and VMSS model --- .../2022-03-01/ComputeRP/computeRPCommon.json | 44 +++++ ...inuxVmWithAutomaticByPlatformSettings.json | 169 +++++++++++++++++ ...dowsVmWithAutomaticByPlatformSettings.json | 172 ++++++++++++++++++ ...achineScaleSets_Update_MaximumSet_Gen.json | 7 +- 4 files changed, 390 insertions(+), 2 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json index 6f915250349b..1d2c777cbedd 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json @@ -1769,6 +1769,10 @@ "name": "WindowsPatchAssessmentMode", "modelAsString": true } + }, + "automaticByPlatformSettings": { + "$ref": "#/definitions/WindowsAutomaticByPatchSettings", + "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows." } }, "description": "Specifies settings related to VM Guest Patching on Windows." @@ -1798,9 +1802,49 @@ "name": "LinuxPatchAssessmentMode", "modelAsString": true } + }, + "automaticByPlatformSettings": { + "$ref": "#/definitions/LinuxAutomaticByPatchSettings", + "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux." } }, "description": "Specifies settings related to VM Guest Patching on Linux." + }, + "WindowsAutomaticByPatchSettings": { + "properties": { + "rebootSetting": { + "type": "string", + "description": "Specifies reboot setting for all AutomaticByPlatform patch installation operations.", + "enum": [ + "Unknown", + "IfRequired", + "Never", + "Always" + ], + "x-ms-enum": { + "name": "WindowsVMGuestPatchRebootSetting", + "modelAsString": true + } + } + } + }, + "LinuxAutomaticByPatchSettings": { + "properties": { + "rebootSetting": { + "type": "string", + "description": "Specifies reboot setting for all AutomaticByPlatform patch installation operations.", + "enum": [ + "Unknown", + "IfRequired", + "Never", + "Always" + ], + "x-ms-enum": { + "name": "LinuxVMGuestPatchRebootSetting", + "modelAsString": true + } + } + } } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json new file mode 100644 index 000000000000..382e7da336df --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json @@ -0,0 +1,169 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2022-03-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "storageProfile": { + "imageReference": { + "sku": "16.04-LTS", + "publisher": "Canonical", + "version": "latest", + "offer": "UbuntuServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "name": "myVMosdisk", + "createOption": "FromImage" + } + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "adminPassword": "{your-password}", + "linuxConfiguration": { + "provisionVMAgent": true, + "patchSettings": { + "patchMode": "AutomaticByPlatform", + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "linuxConfiguration": { + "provisionVMAgent": true, + "patchSettings": { + "patchMode": "AutomaticByPlatform", + "assessmentMode": "AutomaticByPlatform" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "16.04-LTS", + "publisher": "Canonical", + "version": "latest", + "offer": "UbuntuServer" + }, + "osDisk": { + "osType": "Linux", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + }, + "dataDisks": [] + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93", + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "linuxConfiguration": { + "provisionVMAgent": true, + "patchSettings": { + "patchMode": "AutomaticByPlatform", + "assessmentMode": "AutomaticByPlatform" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "16.04-LTS", + "publisher": "Canonical", + "version": "latest", + "offer": "UbuntuServer" + }, + "osDisk": { + "osType": "Linux", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + }, + "dataDisks": [] + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93", + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json new file mode 100644 index 000000000000..cfbf086c9843 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json @@ -0,0 +1,172 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2022-03-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "name": "myVMosdisk", + "createOption": "FromImage" + } + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "adminPassword": "{your-password}", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByPlatform", + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByPlatform", + "assessmentMode": "AutomaticByPlatform" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + }, + "dataDisks": [] + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93", + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type": "Microsoft.Compute/virtualMachines", + "properties": { + "osProfile": { + "adminUsername": "{your-username}", + "secrets": [], + "computerName": "myVM", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByPlatform", + "assessmentMode": "AutomaticByPlatform" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + }, + "dataDisks": [] + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93", + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + } + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json index 166cd93a10db..63ceca159db0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json @@ -41,9 +41,12 @@ "provisionVMAgent": true, "enableAutomaticUpdates": true, "patchSettings": { - "patchMode": "AutomaticByOS", + "patchMode": "AutomaticByPlatform", "enableHotpatching": true, - "assessmentMode": "ImageDefault" + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } }, "timeZone": "aaaaaaaaaaaaaaaa", "additionalUnattendContent": [ From 1bf8576f336943f025f9f9984ca2b56faf69e521 Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Wed, 6 Apr 2022 12:26:18 -0700 Subject: [PATCH 2/7] Updating examples related to AutomaticByPlatformSettings property in PatchSettings for VM and VMSS model --- ..._Create_LinuxVmWithAutomaticByPlatformSettings.json | 10 ++++++++-- ...reate_WindowsVmWithAutomaticByPlatformSettings.json | 10 ++++++++-- .../VirtualMachineScaleSets_Update_MaximumSet_Gen.json | 7 +++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json index 382e7da336df..6ec047d92cbd 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json @@ -68,7 +68,10 @@ "provisionVMAgent": true, "patchSettings": { "patchMode": "AutomaticByPlatform", - "assessmentMode": "AutomaticByPlatform" + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } } } }, @@ -123,7 +126,10 @@ "provisionVMAgent": true, "patchSettings": { "patchMode": "AutomaticByPlatform", - "assessmentMode": "AutomaticByPlatform" + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } } } }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json index cfbf086c9843..5225845ed3b9 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json @@ -70,7 +70,10 @@ "enableAutomaticUpdates": true, "patchSettings": { "patchMode": "AutomaticByPlatform", - "assessmentMode": "AutomaticByPlatform" + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } } } }, @@ -126,7 +129,10 @@ "enableAutomaticUpdates": true, "patchSettings": { "patchMode": "AutomaticByPlatform", - "assessmentMode": "AutomaticByPlatform" + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } } } }, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json index 63ceca159db0..d9f4677fc269 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_Update_MaximumSet_Gen.json @@ -370,9 +370,12 @@ } ], "patchSettings": { - "patchMode": "AutomaticByOS", + "patchMode": "AutomaticByPlatform", "enableHotpatching": true, - "assessmentMode": "ImageDefault" + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + } }, "winRM": { "listeners": [ From e886f7b3c7ba16e682d354383ac899d76d4653fa Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Wed, 6 Apr 2022 14:20:08 -0700 Subject: [PATCH 3/7] Adding useRollingUpgradePolicy property to automaticOSUpgradePolicy for VMSS and other minor changes for AutomaticByPlatfrom settings --- .../stable/2022-03-01/ComputeRP/computeRPCommon.json | 10 ++++++---- .../VirtualMachineScaleSets_List_MaximumSet_Gen.json | 6 ++++-- .../2022-03-01/ComputeRP/virtualMachineScaleSet.json | 4 ++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json index 1d2c777cbedd..c2a3efd97469 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json @@ -1822,11 +1822,12 @@ "Always" ], "x-ms-enum": { - "name": "WindowsVMGuestPatchRebootSetting", + "name": "VMGuestPatchRebootSetting", "modelAsString": true } } - } + }, + "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings." }, "LinuxAutomaticByPatchSettings": { "properties": { @@ -1840,11 +1841,12 @@ "Always" ], "x-ms-enum": { - "name": "LinuxVMGuestPatchRebootSetting", + "name": "VMGuestPatchRebootSetting", "modelAsString": true } } - } + }, + "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings." } } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_List_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_List_MaximumSet_Gen.json index 86993005325d..1ac1e8362a34 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_List_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSets_List_MaximumSet_Gen.json @@ -25,7 +25,8 @@ "mode": "Automatic", "automaticOSUpgradePolicy": { "enableAutomaticOSUpgrade": true, - "disableAutomaticRollback": true + "disableAutomaticRollback": true, + "useRollingUpgradePolicy": true }, "rollingUpgradePolicy": { "maxBatchInstancePercent": 49, @@ -360,7 +361,8 @@ "mode": "Automatic", "automaticOSUpgradePolicy": { "enableAutomaticOSUpgrade": true, - "disableAutomaticRollback": true + "disableAutomaticRollback": true, + "useRollingUpgradePolicy": true }, "rollingUpgradePolicy": { "maxBatchInstancePercent": 49, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json index b5c7f5e77148..4f63e57d91d7 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json @@ -3507,6 +3507,10 @@ "disableAutomaticRollback": { "type": "boolean", "description": "Whether OS image rollback feature should be disabled. Default value is false." + }, + "useRollingUpgradePolicy": { + "type": "boolean", + "description": "Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false." } }, "description": "The configuration parameters used for performing automatic OS upgrade." From 3e15abbc348c072aa9c5cdfc6cf4e73fc7d39a04 Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Wed, 6 Apr 2022 17:19:50 -0700 Subject: [PATCH 4/7] Addressing PR feedback --- .../stable/2022-03-01/ComputeRP/computeRPCommon.json | 12 ++++++------ .../2022-03-01/ComputeRP/virtualMachineScaleSet.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json index c2a3efd97469..06a63dc93f0b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json @@ -1771,7 +1771,7 @@ } }, "automaticByPlatformSettings": { - "$ref": "#/definitions/WindowsAutomaticByPatchSettings", + "$ref": "#/definitions/WindowsAutomaticByPlatformPatchSettings", "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows." } }, @@ -1804,17 +1804,17 @@ } }, "automaticByPlatformSettings": { - "$ref": "#/definitions/LinuxAutomaticByPatchSettings", + "$ref": "#/definitions/LinuxAutomaticByPlatformPatchSettings", "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux." } }, "description": "Specifies settings related to VM Guest Patching on Linux." }, - "WindowsAutomaticByPatchSettings": { + "WindowsAutomaticByPlatformPatchSettings": { "properties": { "rebootSetting": { "type": "string", - "description": "Specifies reboot setting for all AutomaticByPlatform patch installation operations.", + "description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.", "enum": [ "Unknown", "IfRequired", @@ -1829,11 +1829,11 @@ }, "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings." }, - "LinuxAutomaticByPatchSettings": { + "LinuxAutomaticByPlatformPatchSettings": { "properties": { "rebootSetting": { "type": "string", - "description": "Specifies reboot setting for all AutomaticByPlatform patch installation operations.", + "description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.", "enum": [ "Unknown", "IfRequired", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json index 4f63e57d91d7..773606478acc 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachineScaleSet.json @@ -3510,7 +3510,7 @@ }, "useRollingUpgradePolicy": { "type": "boolean", - "description": "Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false." + "description": "Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS." } }, "description": "The configuration parameters used for performing automatic OS upgrade." From 9214bd53b4d315a9e6be4f4e3aad291559c2f7dd Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Thu, 7 Apr 2022 13:38:08 -0700 Subject: [PATCH 5/7] Addressing PR feedback #2 --- .../stable/2022-03-01/ComputeRP/computeRPCommon.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json index 06a63dc93f0b..eedfb49260d2 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json @@ -1771,7 +1771,7 @@ } }, "automaticByPlatformSettings": { - "$ref": "#/definitions/WindowsAutomaticByPlatformPatchSettings", + "$ref": "#/definitions/WindowsVMGuestPatchAutomaticByPlatformSettings", "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows." } }, @@ -1804,13 +1804,13 @@ } }, "automaticByPlatformSettings": { - "$ref": "#/definitions/LinuxAutomaticByPlatformPatchSettings", + "$ref": "#/definitions/LinuxVMGuestPatchAutomaticByPlatformSettings", "description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux." } }, "description": "Specifies settings related to VM Guest Patching on Linux." }, - "WindowsAutomaticByPlatformPatchSettings": { + "WindowsVMGuestPatchAutomaticByPlatformSettings": { "properties": { "rebootSetting": { "type": "string", @@ -1829,7 +1829,7 @@ }, "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings." }, - "LinuxAutomaticByPlatformPatchSettings": { + "LinuxVMGuestPatchAutomaticByPlatformSettings": { "properties": { "rebootSetting": { "type": "string", From 17987a33c08520ed7f4dd8fea0ca7716519ddc5e Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Wed, 13 Apr 2022 16:27:31 -0700 Subject: [PATCH 6/7] Renaming reboot reference for windows and linux automaticbyplatform patch settings - reboot settings --- .../stable/2022-03-01/ComputeRP/computeRPCommon.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json index eedfb49260d2..70863a46e1e6 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json @@ -1822,7 +1822,7 @@ "Always" ], "x-ms-enum": { - "name": "VMGuestPatchRebootSetting", + "name": "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", "modelAsString": true } } @@ -1841,7 +1841,7 @@ "Always" ], "x-ms-enum": { - "name": "VMGuestPatchRebootSetting", + "name": "LinuxVMGuestPatchAutomaticByPlatformRebootSetting", "modelAsString": true } } From f9aabda9f4863033d3b079babdbb900fd5d80d76 Mon Sep 17 00:00:00 2001 From: Rajasi Rane Date: Thu, 14 Apr 2022 12:46:13 -0700 Subject: [PATCH 7/7] Resolving errors reported on the PR by Avocado and LintDiff --- .../stable/2022-03-01/ComputeRP/computeRPCommon.json | 2 ++ .../stable/2022-03-01/ComputeRP/virtualMachine.json | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json index 70863a46e1e6..75685519e5dc 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/computeRPCommon.json @@ -1811,6 +1811,7 @@ "description": "Specifies settings related to VM Guest Patching on Linux." }, "WindowsVMGuestPatchAutomaticByPlatformSettings": { + "type": "object", "properties": { "rebootSetting": { "type": "string", @@ -1830,6 +1831,7 @@ "description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings." }, "LinuxVMGuestPatchAutomaticByPlatformSettings": { + "type": "object", "properties": { "rebootSetting": { "type": "string", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachine.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachine.json index 8f76bff0949f..1b8cc518865b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachine.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2022-03-01/ComputeRP/virtualMachine.json @@ -595,6 +595,9 @@ "Create a Windows vm with a patch setting patchMode of AutomaticByOS.": { "$ref": "./examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithPatchSettingModeOfAutomaticByOS.json" }, + "Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.": { + "$ref": "./examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithAutomaticByPlatformSettings.json" + }, "Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform.": { "$ref": "./examples/virtualMachineExamples/VirtualMachine_Create_WindowsVmWithPatchSettingModesOfAutomaticByPlatform.json" }, @@ -613,6 +616,9 @@ "Create a Linux vm with a patch setting patchMode of ImageDefault.": { "$ref": "./examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingModeOfImageDefault.json" }, + "Create a Linux vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.": { + "$ref": "./examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithAutomaticByPlatformSettings.json" + }, "Create a Linux vm with a patch setting assessmentMode of ImageDefault.": { "$ref": "./examples/virtualMachineExamples/VirtualMachine_Create_LinuxVmWithPatchSettingAssessmentModeOfImageDefault.json" },