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

[Cognitive Services] Add Microsoft.CognitiveServices/skus operation #2666

Merged
merged 4 commits into from
Apr 6, 2018

Conversation

felixwa
Copy link
Contributor

@felixwa felixwa commented Mar 15, 2018

Add Microsoft.CognitiveServices/skus operation
Add its example

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

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

Add Microsoft.CognitiveServices/skus operation
Add its example
@AutorestCI
Copy link

AutorestCI commented Mar 15, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2615

@AutorestCI
Copy link

AutorestCI commented Mar 15, 2018

Automation for azure-sdk-for-python

Encountered a Subprocess error: (azure-sdk-for-python)

Command: ['/usr/local/bin/autorest', '/tmp/tmp9j53ewto/rest/specification/cognitiveservices/resource-manager/readme.md', '--multiapi', '--python', '--python-mode=update', '--python-sdks-folder=/tmp/tmp9j53ewto/sdk', '--use=@microsoft.azure/autorest.python@~3.0', '--version=preview']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4262; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Failure:
Error: Unable to resolve package '@microsoft.azure/autorest-core@preview'.
Error: Unable to resolve package '@microsoft.azure/autorest-core@preview'.
    at fetch (/node_modules/@microsoft.azure/extension/dist/main.js:295:26)
    at /node_modules/npm/node_modules/call-limit/call-limit.js:22:12
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

@AutorestCI
Copy link

AutorestCI commented Mar 15, 2018

Automation for azure-libraries-for-java

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
AutorestCI/azure-libraries-for-java#40

@AutorestCI
Copy link

AutorestCI commented Mar 15, 2018

Automation for azure-sdk-for-go

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-go#1521

"get": {
"tags": [
"Skus",
"AvailabilitySets"
Copy link
Member

Choose a reason for hiding this comment

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

not sure AvailabilitySets make sense here, if not please remove 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.

Right, that does not make sense, put CognitiveServicesAccounts there.

"items": {
"type": "string"
},
"description": "Locations where the SKU is restricted"
Copy link
Member

Choose a reason for hiding this comment

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

just confirming - this is the list of location where the specific sku is not available, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so...but actually I took this from Compute/Skus.

@anuchandy
Copy link
Member

@felixwa thank you. one question (this is just to understand the behavior of the API) Let say a specific resourceType, name, tier, kind combination is supported in multiple regions (locations). In this case, do we return (1). one entry with locations property with value as all locations or (2). we return one entry per location?

@anuchandy
Copy link
Member

@ravbhatnagar PR enables new endpoint to retrieve SKUs, there is no breaking change. But in case you want to take a look to ensure that the API shape follows standard pattern defined for SKU API across RPs.

],
"x-ms-enum": {
"name": "ResourceSkuRestrictionsReasonCode",
"modelAsString": false
Copy link
Member

Choose a reason for hiding this comment

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

It's recommended to use "modelAsString": true so that languages generate extendable enum.

@anuchandy anuchandy added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Mar 16, 2018
reasonCode modelAsString = true
@felixwa
Copy link
Contributor Author

felixwa commented Mar 19, 2018

@anuchandy , for your question wrt the behavior, I believe it is (2). we return one entry per location. You can also verify this in the example file (GetSkus.json) of this PR.

@anuchandy
Copy link
Member

@felixwa thank you for confirming.

@ravbhatnagar are you fine with these changes?

@ravbhatnagar
Copy link
Contributor

Looks good. Signing off!

@ravbhatnagar ravbhatnagar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Mar 21, 2018
@felixwa
Copy link
Contributor Author

felixwa commented Mar 22, 2018

@anuchandy , Gaurave has signed off, could you merge the change now?

@lmazuel
Copy link
Member

lmazuel commented Mar 28, 2018

@felixwa could you take the opportunity of this PR to change the incorrect value of usageFilterParameter for x-ms-parameter-location from client to method? Thank you!

x-ms-parameter-location 'client' to 'method'
@felixwa
Copy link
Contributor Author

felixwa commented Mar 29, 2018

@lmazuel, done

@anuchandy anuchandy merged commit a93922b into Azure:master Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants