mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
move Base64 encoding stuff down to low level calls
This commit is contained in:
parent
7b5d28ed09
commit
5053b3e357
2 changed files with 4 additions and 2 deletions
|
@ -16,7 +16,6 @@ module Fog
|
||||||
attribute :key_name, 'keyName'
|
attribute :key_name, 'keyName'
|
||||||
attribute :launch_time, 'launchTime'
|
attribute :launch_time, 'launchTime'
|
||||||
attribute :monitoring
|
attribute :monitoring
|
||||||
attribute :placement
|
|
||||||
attribute :product_codes, 'productCodes'
|
attribute :product_codes, 'productCodes'
|
||||||
attribute :private_dns_name, 'privateDnsName'
|
attribute :private_dns_name, 'privateDnsName'
|
||||||
attribute :ramdisk_id, 'ramdiskId'
|
attribute :ramdisk_id, 'ramdiskId'
|
||||||
|
@ -97,7 +96,7 @@ module Fog
|
||||||
options['RamdiskId'] = @ramdisk_id
|
options['RamdiskId'] = @ramdisk_id
|
||||||
end
|
end
|
||||||
if @user_data
|
if @user_data
|
||||||
options['UserData'] = Base64.encode64(@user_data)
|
options['UserData'] = @user_data
|
||||||
end
|
end
|
||||||
data = connection.run_instances(@image_id, 1, 1, options)
|
data = connection.run_instances(@image_id, 1, 1, options)
|
||||||
merge_attributes(data.body['instancesSet'].first)
|
merge_attributes(data.body['instancesSet'].first)
|
||||||
|
|
|
@ -64,6 +64,9 @@ unless Fog.mocking?
|
||||||
# * 'requestId'<~String> - Id of request
|
# * 'requestId'<~String> - Id of request
|
||||||
# * 'reservationId'<~String> - Id of reservation
|
# * 'reservationId'<~String> - Id of reservation
|
||||||
def run_instances(image_id, min_count, max_count, options = {})
|
def run_instances(image_id, min_count, max_count, options = {})
|
||||||
|
if options['UserData']
|
||||||
|
options['UserData'] = Base64.encode64(options['UserData'])
|
||||||
|
end
|
||||||
request({
|
request({
|
||||||
'Action' => 'RunInstances',
|
'Action' => 'RunInstances',
|
||||||
'ImageId' => image_id,
|
'ImageId' => image_id,
|
||||||
|
|
Loading…
Reference in a new issue