lib/ec2/ec2.rb in aws-2.4.2 vs lib/ec2/ec2.rb in aws-2.4.3

- old
+ new

@@ -1108,13 +1108,13 @@ # :zone => "merlot", # :aws_created_at => Tue Jun 24 18:13:32 UTC 2008, # :aws_size => 94} # def create_volume(snapshot_id, size, zone) + params = {'Size' => size.to_s, 'AvailabilityZone' => zone.to_s} + params['SnapshotId'] = snapshot_id if snapshot_id && snapshot_id.length > 0 # snapshotId is conditional link = generate_request("CreateVolume", - "SnapshotId" => snapshot_id.to_s, - "Size" => size.to_s, - "AvailabilityZone" => zone.to_s) + params) request_info(link, QEc2CreateVolumeParser.new(:logger => @logger)) rescue Exception on_exception end