Adding support for delegations on a subnet#3693
Adding support for delegations on a subnet#3693rupalivohra wants to merge 4 commits intoAzure:Network-September-Releasefrom
Conversation
|
Can one of the admins verify this patch? |
Automation for azure-sdk-for-rubyNothing to generate for azure-sdk-for-ruby |
Automation for azure-sdk-for-pythonA PR has been created for you: |
Automation for azure-sdk-for-goA PR has been created for you: |
Automation for azure-sdk-for-nodeA PR has been created for you: |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
c1cfa85 to
0985af5
Compare
6b10c04 to
8ef462d
Compare
There was a problem hiding this comment.
Parameter "location" is required.
...anager/Microsoft.Network/stable/2018-08-01/examples/AvailableDelegationsSubscriptionGet.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Missing parameter "location".
...nager/Microsoft.Network/stable/2018-08-01/examples/AvailableDelegationsResourceGroupGet.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
According to the spec, "delegations" is a list of ServiceDelegationPropertiesFormat which doesn't contain name, id, properties.
There was a problem hiding this comment.
Hey Jianghao - I noticed that "id" isn't included in most of the resources, but is included in the examples (as it is in the response of the request).
There was a problem hiding this comment.
Does your service return "id", "name", etc? The spec and examples must match the service behavior.
There was a problem hiding this comment.
"provisioningState" in "properties" is not defined in the spec.
There was a problem hiding this comment.
Id, name comes from the SubResource.
And provisioningState is included here:
"ServiceDelegationPropertiesFormat": {
"properties": {
"serviceName": {
"type": "string",
"description": "The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)"
},
"actions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Describes the actions permitted to the service upon delegation"
},
"provisioningState": {
"type": "string",
"description": "The provisioning state of the resource."
}
},
...k/resource-manager/Microsoft.Network/stable/2018-08-01/examples/SubnetGetWithDelegation.json
Outdated
Show resolved
Hide resolved
...k/resource-manager/Microsoft.Network/stable/2018-08-01/examples/SubnetGetWithDelegation.json
Outdated
Show resolved
Hide resolved
...esource-manager/Microsoft.Network/stable/2018-08-01/examples/SubnetCreateWithDelegation.json
Outdated
Show resolved
Hide resolved
...esource-manager/Microsoft.Network/stable/2018-08-01/examples/SubnetCreateWithDelegation.json
Outdated
Show resolved
Hide resolved
...esource-manager/Microsoft.Network/stable/2018-08-01/examples/SubnetCreateWithDelegation.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Is this a special character?
There was a problem hiding this comment.
looks like it just denotes that there is no newline at the EOF. Since none of the other files are saying that, I'll just add a newline
...ation/network/resource-manager/Microsoft.Network/stable/2018-08-01/availableDelegations.json
Outdated
Show resolved
Hide resolved
...ation/network/resource-manager/Microsoft.Network/stable/2018-08-01/availableDelegations.json
Outdated
Show resolved
Hide resolved
8ef462d to
222ffaf
Compare
There was a problem hiding this comment.
You need to include the "purpose" property as a read-only property or the SDK (and thus CLI) will not see it.
7fec20d to
09faf04
Compare
8a7d951 to
a35f946
Compare
jianghaolu
left a comment
There was a problem hiding this comment.
Most errors are repeated across examples - I'm not going to post them all since they could be spec errors. Once spec errors are fixed we may see a significant decrease in model validation errors.
...anager/Microsoft.Network/stable/2018-08-01/examples/AvailableDelegationsSubscriptionGet.json
Outdated
Show resolved
Hide resolved
...nager/Microsoft.Network/stable/2018-08-01/examples/AvailableDelegationsResourceGroupGet.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Does your service return "id", "name", etc? The spec and examples must match the service behavior.
There was a problem hiding this comment.
According the spec you are returning a "Delegation" instead of an "AvailableDelegation" here. "Delegation"'s properties don't contain provisioningState and `actions': https://github.com/Azure/azure-rest-api-specs/pull/3693/files#diff-48ae68150e376ac636b1bc2e92b09b32R868.
There was a problem hiding this comment.
Maybe the service is actually returning "AvailableDelegation"? Please double check.
There was a problem hiding this comment.
AvailableDelegation and ServiceDelegation are two different resources on the backend
There was a problem hiding this comment.
Jianghaolu - I do not see any problem here. Rupali is returning Delegations. Can you please confirm and explain more on what you are saying?
a35f946 to
ea8045e
Compare
There was a problem hiding this comment.
There was a problem hiding this comment.
Couple of questions:
- Why?
- How?
There was a problem hiding this comment.
Because if it IS a proxy resource then extending it from proxy resource is the CORRECT way.
There was a problem hiding this comment.
You may also extend from SubResource and get rid of the id property, that's okay too
21773b5 to
0139e0a
Compare
| }, | ||
| "Delegation": { | ||
| "properties": { | ||
| "properties": { |
There was a problem hiding this comment.
Property missing: "type"
| ], | ||
| "purpose": "" | ||
| }, | ||
| "type": "Microsoft.Network/virtualNetworks/subnets" |
There was a problem hiding this comment.
"type" property is also missing in the definition of "Subnet"
|
This PR was completed via #3805 |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-versionin the path should match theapi-versionin the spec).Quality of Swagger