From 600ae481534a55cba4cd47bdba3822aff132c586 Mon Sep 17 00:00:00 2001 From: Rajalakshmi Swaminathan Date: Mon, 21 Nov 2022 11:55:04 +0530 Subject: [PATCH 1/4] Changes to virtualMachineImage.json to include ImageDeprecationStatus properties --- .../2022-11-01/virtualMachineImage.json | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json index 139e40becf41..d0749f52d025 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json @@ -905,6 +905,54 @@ ], "description": "Describes automatic OS upgrade properties on the image." }, + "ImageDeprecationStatus": { + "properties": { + "imageState": { + "type": "string", + "description": "Describes the state of the image.", + "enum": [ + "Active", + "ScheduledForDeprecation", + "Deprecated" + ], + "x-ms-enum": { + "name": "ImageState", + "modelAsString": true + } + }, + "scheduledDeprecationTime": { + "type": "string", + "format": "date-time", + "description": "The time when the image is scheduled to be deprecated by the Publisher." + }, + "alternativeOption": { + "$ref": "#/definitions/AlternativeOption" + } + }, + "description": "Describes image deprecation status properties on the image." + }, + "AlternativeOption": { + "properties": { + "type": { + "type": "string", + "description": "Describes the type of the alternative option.", + "enum": [ + "None", + "Offer", + "Plan" + ], + "x-ms-enum": { + "name": "AlternativeType", + "modelAsString": true + } + }, + "value": { + "type": "string", + "description": "Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan." + } + }, + "description": "Describes the alternative option specified by the Publisher for this image when this image is deprecated." + }, "VirtualMachineImageFeature": { "properties": { "name": { @@ -938,6 +986,9 @@ "automaticOSUpgradeProperties": { "$ref": "#/definitions/AutomaticOSUpgradeProperties" }, + "imageDeprecationStatus": { + "$ref": "#/definitions/ImageDeprecationStatus" + }, "hyperVGeneration": { "$ref": "./computeRPCommon.json#/definitions/HyperVGenerationType" }, From 44e7dc5bdbc73c12826998cef58234eefbd0a2a0 Mon Sep 17 00:00:00 2001 From: Rajalakshmi Swaminathan Date: Mon, 21 Nov 2022 12:24:19 +0530 Subject: [PATCH 2/4] Changes to example json --- .../VirtualMachineImages_Get_MaximumSet_Gen.json | 8 ++++++++ .../ComputeRP/stable/2022-11-01/virtualMachineImage.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json index 052435b265d7..668be38e319b 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json @@ -28,6 +28,14 @@ "automaticOSUpgradeProperties": { "automaticOSUpgradeSupported": true }, + "imageDeprecationStatus": { + "imageState": "ScheduledForDeprecation", + "scheduledDeprecationTime": "2023-01-13T00:00:00+00:00", + "alternativeOption": { + "type": "Offer", + "value": "aaaaaaa" + } + }, "hyperVGeneration": "V1", "disallowed": { "vmDiskType": "None" diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json index d0749f52d025..37434c508b00 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json @@ -923,7 +923,7 @@ "scheduledDeprecationTime": { "type": "string", "format": "date-time", - "description": "The time when the image is scheduled to be deprecated by the Publisher." + "description": "The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher." }, "alternativeOption": { "$ref": "#/definitions/AlternativeOption" From 5f3c8d908ec8cff281ab0b2e8c0dc0a0276999e0 Mon Sep 17 00:00:00 2001 From: Rajalakshmi Swaminathan Date: Mon, 21 Nov 2022 12:37:00 +0530 Subject: [PATCH 3/4] Fixed LintDiff errors --- .../ComputeRP/stable/2022-11-01/virtualMachineImage.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json index 37434c508b00..a04fc0d8e675 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json @@ -906,6 +906,7 @@ "description": "Describes automatic OS upgrade properties on the image." }, "ImageDeprecationStatus": { + "type": "object", "properties": { "imageState": { "type": "string", @@ -932,6 +933,7 @@ "description": "Describes image deprecation status properties on the image." }, "AlternativeOption": { + "type": "object", "properties": { "type": { "type": "string", From e5f4f0f98ed6417790f8ea0db56b20a3f71dbeff Mon Sep 17 00:00:00 2001 From: Rajalakshmi Swaminathan Date: Tue, 29 Nov 2022 10:05:03 +0530 Subject: [PATCH 4/4] Addressed review comment --- ...irtualMachineImages_Get_MaximumSet_Gen.json | 18 +++++++++--------- .../stable/2022-11-01/virtualMachineImage.json | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json index 668be38e319b..f363ff38c32f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/examples/virtualMachineImageExamples/VirtualMachineImages_Get_MaximumSet_Gen.json @@ -28,14 +28,6 @@ "automaticOSUpgradeProperties": { "automaticOSUpgradeSupported": true }, - "imageDeprecationStatus": { - "imageState": "ScheduledForDeprecation", - "scheduledDeprecationTime": "2023-01-13T00:00:00+00:00", - "alternativeOption": { - "type": "Offer", - "value": "aaaaaaa" - } - }, "hyperVGeneration": "V1", "disallowed": { "vmDiskType": "None" @@ -45,7 +37,15 @@ "name": "aaaaaaaaaaaaaaaaaaaaa", "value": "aaaaaaaaaaaaaaaaaaaa" } - ] + ], + "imageDeprecationStatus": { + "imageState": "ScheduledForDeprecation", + "scheduledDeprecationTime": "2023-01-13T00:00:00+00:00", + "alternativeOption": { + "type": "Offer", + "value": "aaaaaaa" + } + } }, "name": "aaaaaaaaa", "location": "aaaaa", diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json index a04fc0d8e675..45a12c2740da 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-11-01/virtualMachineImage.json @@ -988,9 +988,6 @@ "automaticOSUpgradeProperties": { "$ref": "#/definitions/AutomaticOSUpgradeProperties" }, - "imageDeprecationStatus": { - "$ref": "#/definitions/ImageDeprecationStatus" - }, "hyperVGeneration": { "$ref": "./computeRPCommon.json#/definitions/HyperVGenerationType" }, @@ -1009,6 +1006,9 @@ }, "architecture": { "$ref": "#/definitions/ArchitectureType" + }, + "imageDeprecationStatus": { + "$ref": "#/definitions/ImageDeprecationStatus" } }, "description": "Describes the properties of a Virtual Machine Image."