-
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
Adding new properties to Consumption Usage Details #3357
Conversation
Automation for azure-sdk-for-pythonThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
@sandeepnl @asarkar84 @ms-premp Please review Usage Details changes |
Automation for azure-sdk-for-rubyThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service 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.
Looks good.
@@ -0,0 +1,45 @@ | |||
{ | |||
"parameters": { | |||
"api-version": "2018-05-31", |
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.
Let's update the api version to 2018-06-30 in all examples.
Thanks @ampravinr! |
@annatisch Thanks for the review. That is not intentional. Found one issue from my side and working on fixing the same. |
… that those operations will be supported in the new version as well.
…e automatic system since we are manually generating the SDK for Python.
@annatisch I have made the changes (merged all required operations for the new version and removed the python sdk from the list of auto generated SDK generation - since Python SDK is manually generated). Please review and let me know if any issues. |
If i remember correctly python auto-gen was added to handle cases where there were minor non-breaking chganges which can be done without any human intervention. |
@annatisch - I have made all the necessary changes. Could you please verify and let me know if any issues. |
Thanks @ampravinr - the diff is still showing the loss of some operations groups: Have these been removed or renamed? |
@annatisch - I verified these changes and the latest changes are good to go. None of these operations are present in our existing "azure-sdk-for-python/azure-mgmt-consumption/azure/mgmt/consumption/models/init.py" file. Also these operations are suppose to belongs to other namespace (cost-management). I believe the last commits - 7d850c0#diff-ebc1cee9670996e7d7037ed33bd69b9a and 30f1846#diff-ebc1cee9670996e7d7037ed33bd69b9a might have caused this. We are good with the current changes since those which are missing is not supposed to be in there. Let me know if any issues. |
Thanks for the confirmation @ampravinr. Could you take a look? |
On it now. Thanks. |
"tags": [ | ||
"Balances" | ||
], | ||
"operationId": "GetBalancesByBillingAccount", |
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.
You cannot have at the same time:
- GetBalancesByBillingAccount_ByBillingPeriod
- GetBalancesByBillingAccount
Since the syntax XXX_YYY means for Autorest "Creates an operation group called XXX with operation YYY", while the syntax XXX means create "XXX operation". So there is conflict, if GetBalancesByBillingAccount means functions or operation group.
Seeing the url, I would instinctively do:
- Balances_GetByBillingAccount
- Balances_GetByBillingPeriod
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 got it. I will make the changes. Thanks a lot @lmazuel
@annatisch , @lmazuel, @sandeepnl - I have made the necessary changes. Could you please review and let me know if any issue. I see errors in #10878.14 and #10878.15 which I think is not because of our changes. Please let me know if its something I need to fix. Thanks. |
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLink |
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.
You have both at the same time a model called ReservationRecommendations and an operation ID called ReservationRecommendations.
Usually, the operation is the plural form and the model the singular form: Operation ID ReservationRecommendations has operations that returns list of ReservationRecommendation
Is this true that this model "ReservationRecommendations" is actually ONE recommendation. If yes, please rename it "ReservationRecommendation" (and ReservationRecommendationProperties and ReservationRecommendationListResult)
Having the same string for Operation group ID and a model might (depending of the language) create troubles.
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.
Sure, got it. Let me take a look and will change it accordingly. Thanks again.
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.
One final comment you may address if it makes sense for your service.
@ampravinr Just to triple-check, with this new api version I see that "report_config/billing_account_dimensions/subscription_dimensions/resource_group_dimensions" no longer exists in the final SDK. Could you confirm it's on purpose? |
@lmazuel - I verified the same and we are good here. ResourceGroupDimensions_List operation is moved from Consumption to another namespace\swagger. The same is moved to - "\azure-rest-api-specs\specification\cost-management\resource-manager\Microsoft.CostManagement\stable\2018-05-31\costmanagement.json" now. |
…ry), ReservationDetails (now: ReservationDetail) and ReservationRecommendations (now: ReservationRecommendation)
@annatisch - I have made the required changes and not seeing any errors from my side. Please review and let me know if any issues or if any concerns. |
Thanks @ampravinr - a couple of things:
Thanks! Thanks @lmazuel for taking a look :) |
@annatisch - please find below:
|
…nged operations - Marketplaces_ListByEnrollmentAccount and Marketplaces_ListForBillingPeriodByEnrollmentAccount.
Hi @annatisch, I have made the above changes. Please review and let me know your thoughts. (I have reverted CostTagsResult to CostTag and the operations are now CostTags_*. Let me know if any issues) |
Thanks @annatisch , @lmazuel , @sandeepnl for all the comments and help. |
@ampravinr About Python, you can fork this branch to save you Autorest call: |
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-version
in the path should match theapi-version
in the spec).Quality of Swagger