Use default availability zone when creating EBS volumes #1437

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@naftulikay

Presently, in the EC2Connection.create_volume method, zone is a required parameter despite the fact that the CreateVolume describes it as being optional. Thus, with this patch, we only include it if it's not None.

Use default availability zone when creating EBS volumes
Presently, in the `EC2Connection.create_volume` method, `zone` is a required parameter despite the fact that the [CreateVolume](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html) describes it as being optional. Thus, with this patch, we only include it if it's not `None`.
@@ -1662,7 +1662,7 @@ def modify_volume_attribute(self, volume_id, attribute, new_value):
params['AutoEnableIO.Value'] = new_value
return self.get_status('ModifyVolumeAttribute', params, verb='POST')
- def create_volume(self, size, zone, snapshot=None,
+ def create_volume(self, size, zone = None, snapshot=None,

This comment has been minimized.

@toastdriven

toastdriven Jul 16, 2013

Contributor

PEP-8/consistency with the rest of the code.

@toastdriven

toastdriven Jul 16, 2013

Contributor

PEP-8/consistency with the rest of the code.

@toastdriven

This comment has been minimized.

Show comment
Hide comment
@toastdriven

toastdriven Jul 16, 2013

Contributor

Thanks for the pull request, patch looks good save for the one bit of feedback I had. However, to get this merged, we need some tests to make sure we don't regress as mentioned in the contributing guide.

If you could write some tests, that would help a lot. Otherwise this will have to wait until a core dev can find some time to write tests for this.

Thanks again for the pull request.

Contributor

toastdriven commented Jul 16, 2013

Thanks for the pull request, patch looks good save for the one bit of feedback I had. However, to get this merged, we need some tests to make sure we don't regress as mentioned in the contributing guide.

If you could write some tests, that would help a lot. Otherwise this will have to wait until a core dev can find some time to write tests for this.

Thanks again for the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment