You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2022/08/15 19:45:26 UTC
[GitHub] [libcloud] jwk404 opened a new pull request, #1744: Azure: Add the ability to use Ultra SSDs
jwk404 opened a new pull request, #1744:
URL: https://github.com/apache/libcloud/pull/1744
This change adds a function to update additional_capabilities so that
Ultra SSDs can be added. Additional changes allow specific provisioned
IOPS and throughput.
## Azure: Add the ability to use Ultra SSDs
### Description
To add UltraSSD disks in Azure, a flag must be toggled on the VM
itself. Once the flag is enabled, a disk of this type may be
provisioned with a specific cap on IOPS and throughput. This commit
adds a function to toggle the compatibility flag, and adds the ability
to specify IOPS and throughput numbers.
### Status
- done, ready for review
### Checklist (tick everything that applies)
- [x] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide) (required, can be done after the PR checks)
- [ ] Documentation
- [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
- [ ] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes) (required for bigger changes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] Kami commented on a diff in pull request #1744: Azure: Add the ability to use Ultra SSDs
Posted by GitBox <gi...@apache.org>.
Kami commented on code in PR #1744:
URL: https://github.com/apache/libcloud/pull/1744#discussion_r961954814
##########
libcloud/compute/drivers/azure_arm.py:
##########
@@ -2065,6 +2079,41 @@ def ex_create_tags(self, resource, tags, replace=False):
method="PATCH",
)
+ def ex_create_additional_capabilities(
+ self, node, additional_capabilities, resource_group,
+ ):
+ """
+ Set the additional capabilities on a stopped node.
+
+ :param node: The node to be updated
+ :type node: ``str``
+ :param ex_additional_capabilities: Optional additional capabilities
+ allowing Ultra SSD and hibernation on this node.
+ :type ex_additional_capabilities: ``dict``
+ :param resource_group: The resource group of the node to be updated
+ :type resource_group: ``str``
+ """
+
+ target = (
+ "/subscriptions/%s/resourceGroups/%s/providers"
+ "/Microsoft.Compute/virtualMachines/%s"
+ % (self.subscription_id, resource_group, node.name)
+ )
+
+ data = {
+ "location": node.extra["location"],
+ "properties": {
+ "additionalCapabilities": additional_capabilities
+ }
+ }
+
+ self.connection.request(
+ target,
+ data=data,
+ params={"api-version": VM_API_VERSION},
+ method="PUT",
+ )
+
Review Comment:
Does this API operation return some kind of response? Would it make sense to return something from this method (depending also on what API operation returns)? Perhaps True on success?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] codecov-commenter commented on pull request #1744: Azure: Add the ability to use Ultra SSDs
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1744:
URL: https://github.com/apache/libcloud/pull/1744#issuecomment-1235843409
# [Codecov](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1744](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b7708ce) into [trunk](https://codecov.io/gh/apache/libcloud/commit/26f07ac1a28b35953b84c592d6476bf65e5aacf7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (26f07ac) will **increase** coverage by `0.00%`.
> The diff coverage is `100.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/libcloud/pull/1744/graphs/tree.svg?width=650&height=150&src=pr&token=PYoduksh69&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## trunk #1744 +/- ##
=======================================
Coverage 83.29% 83.29%
=======================================
Files 400 400
Lines 87770 87786 +16
Branches 9331 9333 +2
=======================================
+ Hits 73104 73120 +16
Misses 11486 11486
Partials 3180 3180
```
| [Impacted Files](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [libcloud/compute/drivers/azure\_arm.py](https://codecov.io/gh/apache/libcloud/pull/1744/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliY2xvdWQvY29tcHV0ZS9kcml2ZXJzL2F6dXJlX2FybS5weQ==) | `58.25% <100.00%> (+0.50%)` | :arrow_up: |
| [libcloud/test/compute/test\_azure\_arm.py](https://codecov.io/gh/apache/libcloud/pull/1744/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliY2xvdWQvdGVzdC9jb21wdXRlL3Rlc3RfYXp1cmVfYXJtLnB5) | `98.83% <100.00%> (+0.02%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [26f07ac...b7708ce](https://codecov.io/gh/apache/libcloud/pull/1744?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] asfgit merged pull request #1744: Azure: Add the ability to use Ultra SSDs
Posted by GitBox <gi...@apache.org>.
asfgit merged PR #1744:
URL: https://github.com/apache/libcloud/pull/1744
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] Kami commented on pull request #1744: Azure: Add the ability to use Ultra SSDs
Posted by GitBox <gi...@apache.org>.
Kami commented on PR #1744:
URL: https://github.com/apache/libcloud/pull/1744#issuecomment-1235839006
Thanks for the contribution.
I added a comment / question on the method return value, besides that, LGTM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] jwk404 commented on a diff in pull request #1744: Azure: Add the ability to use Ultra SSDs
Posted by GitBox <gi...@apache.org>.
jwk404 commented on code in PR #1744:
URL: https://github.com/apache/libcloud/pull/1744#discussion_r976947124
##########
libcloud/compute/drivers/azure_arm.py:
##########
@@ -2065,6 +2079,41 @@ def ex_create_tags(self, resource, tags, replace=False):
method="PATCH",
)
+ def ex_create_additional_capabilities(
+ self, node, additional_capabilities, resource_group,
+ ):
+ """
+ Set the additional capabilities on a stopped node.
+
+ :param node: The node to be updated
+ :type node: ``str``
+ :param ex_additional_capabilities: Optional additional capabilities
+ allowing Ultra SSD and hibernation on this node.
+ :type ex_additional_capabilities: ``dict``
+ :param resource_group: The resource group of the node to be updated
+ :type resource_group: ``str``
+ """
+
+ target = (
+ "/subscriptions/%s/resourceGroups/%s/providers"
+ "/Microsoft.Compute/virtualMachines/%s"
+ % (self.subscription_id, resource_group, node.name)
+ )
+
+ data = {
+ "location": node.extra["location"],
+ "properties": {
+ "additionalCapabilities": additional_capabilities
+ }
+ }
+
+ self.connection.request(
+ target,
+ data=data,
+ params={"api-version": VM_API_VERSION},
+ method="PUT",
+ )
+
Review Comment:
Thanks for catching that. I updated the method as suggested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [libcloud] Kami commented on pull request #1744: Azure: Add the ability to use Ultra SSDs
Posted by GitBox <gi...@apache.org>.
Kami commented on PR #1744:
URL: https://github.com/apache/libcloud/pull/1744#issuecomment-1257159959
I've fixed a small typo in docstring (c48b456af7dc243a6ccf00d53408f0494e961f79) and merged changes into trunk. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org