-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Swagger change for getting all availability sets in a subscription and StandardSSD #3302
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
474690a
First commit
dochung4 c60eb5a
Small change
dochung4 8ba6300
Added an example for listing all the availability sets in a subscription
dochung4 41175e4
Addressed comments - added missing StandardSSD_LRS in 2018-04-01, upd…
dochung4 e6bffd7
Added nextLink to AvailabilitySetListResult
dochung4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...soft.Compute/preview/2016-04-30-preview/examples/ListAvailabilitySetsInASubscription.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "{subscriptionId}", | ||
"api-version": "2016-04-30-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"properties": { | ||
"platformUpdateDomainCount": 5, | ||
"platformFaultDomainCount": 2 | ||
}, | ||
"type": "Microsoft.Compute/availabilitySets", | ||
"location": "centralus", | ||
"tags": { | ||
"{tagName}": "{tagValue}" | ||
}, | ||
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", | ||
"name": "{availabilitySetName}", | ||
"sku": { | ||
"name": "Aligned" | ||
} | ||
}, | ||
{ | ||
"properties": { | ||
"platformUpdateDomainCount": 3, | ||
"platformFaultDomainCount": 2 | ||
}, | ||
"type": "Microsoft.Compute/availabilitySets", | ||
"location": "westus", | ||
"tags": { | ||
"{tagName}": "{tagValue}" | ||
}, | ||
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", | ||
"name": "{availabilitySetName}", | ||
"sku": { | ||
"name": "Classic" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ger/Microsoft.Compute/stable/2017-03-30/examples/ListAvailabilitySetsInASubscription.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "{subscriptionId}", | ||
"api-version": "2017-03-30" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"properties": { | ||
"platformUpdateDomainCount": 5, | ||
"platformFaultDomainCount": 2 | ||
}, | ||
"type": "Microsoft.Compute/availabilitySets", | ||
"location": "centralus", | ||
"tags": { | ||
"{tagName}": "{tagValue}" | ||
}, | ||
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", | ||
"name": "{availabilitySetName}", | ||
"sku": { | ||
"name": "Aligned" | ||
} | ||
}, | ||
{ | ||
"properties": { | ||
"platformUpdateDomainCount": 3, | ||
"platformFaultDomainCount": 2 | ||
}, | ||
"type": "Microsoft.Compute/availabilitySets", | ||
"location": "westus", | ||
"tags": { | ||
"{tagName}": "{tagValue}" | ||
}, | ||
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", | ||
"name": "{availabilitySetName}", | ||
"sku": { | ||
"name": "Classic" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provided example creates a linter error:
Could you either:
Whatever you do, do NOT remove "x-ms-pageable", that's the right thing to do since it's a method that has the semantic of a list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check again? I think the issue is not that nextLink is missing in the example, but that nextLink is missing AvailabilitySetListResult in compute.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see what you mean, you re-used
AvailabilitySetListResult
as it was defined. Let me check what should be the correct way to remove this warning then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dochung4 I made an actual call to the endpoint, and didn't get a nextLink back in the JSON. But maybe I didn't have enough resource to trigger the nextLink. But if it's the truth and the endpoint always returns a unique page whatever the number of AS, then the correct definition is to use
null
.Could you confirm the actual server behavior:
null
nextLink
Swagger must described accurately the server, and since I don't own the server implementation I don't know which one is the truth. Your last commit changed a lot of
null
tonextLink
and that concerns me a bit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For which call did you not get a nextLink back? Currently we have nextLink for listing all availability sets in a subscription, but not for listing all resource groups in a resource group. But I discussed this with my team and I added nextLink to the latter too, because it will be enabled very soon.
Please let me know if you have other thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked listing AS in a RG indeed. So if I understand you correctly:
Is this accurate?
If this is accurate, I'm good with the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's correct.