Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
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 @@ -2137,6 +2137,60 @@
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage": {
"post": {
"tags": [
"VirtualMachines"
],
"operationId": "VirtualMachines_Reimage",
"description": "Reimages (upgrade the operating system) virtual machine. This operation is only supported for differencing OS disks.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine."
},
{
"name": "parameters",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineReimageParameters"
},
"description": "Parameters supplied to the Reimage Virtual Machine operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"202": {
"description": "Accepted"
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Reimage a Virtual Machine.": {
"$ref": "./examples/ReimageVirtualMachine.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance": {
"post": {
"tags": [
Expand Down Expand Up @@ -3202,13 +3256,13 @@
"description": "The name of the VM scale set."
},
{
"name": "vmInstanceIDs",
"name": "vmScaleSetReimageInput",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetVMInstanceIDs"
"$ref": "#/definitions/VirtualMachineScaleSetReimageParameters"
Copy link
Member

Choose a reason for hiding this comment

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

This introduces breaking changes in SDK codegen, is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi, VirtualMachineScaleSetReimageParameters is the wrapper class around the VirtualMachineScaleSetVMInstanceIDs containing new inputs like osdisk, datadisk list of lun values and temp disk reiamge inputs for the customer. This needs to be added

},
"description": "A list of virtual machine instance IDs from the VM scale set."
"description": "Parameters for Reimaging VM ScaleSet."
},
{
"$ref": "#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -3516,6 +3570,15 @@
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "vmScaleSetVMReimageInput",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetVMReimageParameters"
},
"description": "Parameters for the Reimaging Virtual machine in ScaleSet."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
Expand Down Expand Up @@ -4851,6 +4914,19 @@
],
"description": "The List Usages operation response."
},
"VirtualMachineReimageParameters": {
"properties": {
"osDisk": {
"type": "boolean",
"description": "Specified whether to reimage os disk. Default value: true."
},
"tempDisk": {
"type": "boolean",
"description": "Specified whether to reimage temp disk. Default value: false."
}
},
"description": "Paramaters for Reimaging Virtual Machine."
},
"VirtualMachineCaptureParameters": {
"properties": {
"vhdPrefix": {
Expand Down Expand Up @@ -7300,6 +7376,40 @@
],
"description": "Describes a Virtual Machine Scale Set."
},
"VirtualMachineScaleSetVMReimageParameters": {
"properties": {
"dataDisks": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Luns of dataDisks in the virtual machine scale set VM to reimage."
}
},
"allOf": [
{
"$ref": "#/definitions/VirtualMachineReimageParameters"
}
],
"description": "Describes a Virtual Machine Scale Set VM Reimage Parameters."
},
"VirtualMachineScaleSetReimageParameters": {
"properties": {
"instanceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set."
}
},
"allOf": [
{
"$ref": "#/definitions/VirtualMachineScaleSetVMReimageParameters"
}
],
"description": "Describes a Virtual Machine Scale Set VM Reimage Parameters."
},
"VirtualMachineScaleSetUpdate": {
"properties": {
"sku": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"api-version": "2018-06-01",
"vmName": "myVMName",
"parameters": {
"location": "West US",
Copy link
Member

Choose a reason for hiding this comment

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

This isn't in the schema and is causing one of the model validation failures.

"properties": {
"osDisk": true,
"tempDisk": true
}
}
},
"responses": {
"200": {
},
"202": {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,60 @@
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage": {
"post": {
"tags": [
"VirtualMachines"
],
"operationId": "VirtualMachines_Reimage",
"description": "Reimages (upgrade the operating system) virtual machine. This operation is only supported for differencing OS disks.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual machine."
},
{
"name": "parameters",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineReimageParameters"
},
"description": "Parameters supplied to the Reimage Virtual Machine operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"202": {
"description": "Accepted"
}
},
"x-ms-long-running-operation": true,
"x-ms-examples": {
"Reimage a Virtual Machine.": {
"$ref": "./examples/ReimageVirtualMachine.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance": {
"post": {
"tags": [
Expand Down Expand Up @@ -3202,13 +3256,13 @@
"description": "The name of the VM scale set."
},
{
"name": "vmInstanceIDs",
"name": "vmScaleSetReimageInput",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetVMInstanceIDs"
"$ref": "#/definitions/VirtualMachineScaleSetReimageParameters"
},
"description": "A list of virtual machine instance IDs from the VM scale set."
"description": "Parameters for Reimaging VM ScaleSet."
},
{
"$ref": "#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -3516,6 +3570,15 @@
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "vmScaleSetVMReimageInput",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetVMReimageParameters"
},
"description": "Parameters for the Reimaging Virtual machine in ScaleSet."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
Expand Down Expand Up @@ -4866,6 +4929,19 @@
],
"description": "The List Usages operation response."
},
"VirtualMachineReimageParameters": {
"properties": {
"osDisk": {
"type": "boolean",
"description": "Specified whether to reimage os disk. Default value: true."
},
"tempDisk": {
"type": "boolean",
"description": "Specified whether to reimage temp disk. Default value: false."
}
},
"description": "Paramaters for Reimaging Virtual Machine."
},
"VirtualMachineCaptureParameters": {
"properties": {
"vhdPrefix": {
Expand Down Expand Up @@ -7315,6 +7391,40 @@
],
"description": "Describes a Virtual Machine Scale Set."
},
"VirtualMachineScaleSetVMReimageParameters": {
"properties": {
"dataDisks": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Luns of dataDisks in the virtual machine scale set VM to reimage."
}
},
"allOf": [
{
"$ref": "#/definitions/VirtualMachineReimageParameters"
}
],
"description": "Describes a Virtual Machine Scale Set VM Reimage Parameters."
},
"VirtualMachineScaleSetReimageParameters": {
"properties": {
"instanceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set."
}
},
"allOf": [
{
"$ref": "#/definitions/VirtualMachineScaleSetVMReimageParameters"
}
],
"description": "Describes a Virtual Machine Scale Set VM Reimage Parameters."
},
"VirtualMachineScaleSetUpdate": {
"properties": {
"sku": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"api-version": "2018-10-01",
"vmName": "myVMName",
"parameters": {
"location": "West US",
Copy link
Member

Choose a reason for hiding this comment

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

This isn't in the schema and is causing one of the model validation failures.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Joel, is location parameter culprit?

Copy link
Member

Choose a reason for hiding this comment

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

Yes I believe so. Note that you can run this validation locally to verify the fix before updating the PR, see the docs here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Joel for the tool to validate locally. I had updated the examples and validated it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

However I see there are other validation errors coming for others unrelated to mine

"properties": {
"osDisk": true,
"tempDisk": true
}
}
},
"responses": {
"200": {
},
"202": {
}
}
}