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

Compute Swagger spec update :- Add the missing PATCH for VmssExtension operation #7724

Merged
merged 12 commits into from
Nov 18, 2019
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -3589,6 +3589,60 @@
},
"x-ms-long-running-operation": true
},
"patch": {
"tags": [
"VirtualMachineScaleSetExtensions"
],
"operationId": "VirtualMachineScaleSetExtensions_Update",
"description": "The operation to update an extension.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set where the extension should be updated."
},
{
"name": "vmssExtensionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set extension."
},
{
"name": "extensionParameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetExtensionUpdate"
srinath9795 marked this conversation as resolved.
Show resolved Hide resolved
},
"description": "Parameters supplied to the Update VM scale set Extension operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetExtension"
}
}
},
"x-ms-long-running-operation": true
Copy link
Member

Choose a reason for hiding this comment

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

As this is a long running operation, is it better to return 202 instead of 200?

Copy link
Contributor Author

@srinath9795 srinath9795 Nov 14, 2019

Choose a reason for hiding this comment

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

I see that for all the other existing resources (VM, VMSS, AvSet, Image, VMExtension..) as well, only 200 (OK) is specified in the spec.

But from the code, and as CRP treats "patch" & "put" the same way -- added 201 (Created) as well.

@hyonholee to help confirm as well.

},
"delete": {
"tags": [
"VirtualMachineScaleSetExtensions"
Expand Down Expand Up @@ -8998,6 +9052,35 @@
"type": "string",
"description": "The name of the extension."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/VirtualMachineScaleSetExtensionProperties"
}
},
"allOf": [
{
"$ref": "#/definitions/SubResourceReadOnly"
}
],
"description": "Describes a Virtual Machine Scale Set Extension."
},
"VirtualMachineScaleSetExtensionUpdate": {
"properties": {
"name": {
"readOnly": true,
srinath9795 marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"description": "The name of the extension."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/VirtualMachineScaleSetExtensionProperties"
Expand Down