palashgandhi opened a new pull request #1372: Fix Azure compute driver to allow adding maximum number of disks when LUN is unspecified URL: https://github.com/apache/libcloud/pull/1372 ## Fix Azure compute driver to allow adding maximum number of disks when LUN is unspecified ### Description When the LUN is unspecified in the `attach_volume` method, it finds the lowest available number to attach the volume to. The maximum number of data disks on an Azure VM is 64, which means LUNs can range from 0 to 63. The current logic to figure out the LUN iterates from 0 to 62: `for lun in range(0, 63)`. When you try to add the Nth device where N = maximum number of data disks allowed for that instance size, this code raises `LibcloudError("No LUN available to attach new disk.")`. This PR fixes this to ensure the last LUN is usable. ### 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) - [x] Documentation - [] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html) - [x] [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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
