incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] EC2: Disable base64 decoding for the user_data parameter
Date Mon, 31 Oct 2011 14:30:05 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 753a2aa..ca253ae 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -212,9 +212,7 @@ module Deltacloud
         def create_instance(credentials, image_id, opts={})
           ec2 = new_client(credentials)
           instance_options = {}
-          if opts[:user_data]
-            instance_options[:user_data] = Base64::decode64(opts[:user_data])
-          end
+          instance_options[:user_data] = opts[:user_data] if opts[:user_data]
           instance_options[:key_name] = opts[:keyname] if opts[:keyname]
           instance_options[:availability_zone] = opts[:realm_id] if opts[:realm_id]
           instance_options[:instance_type] = opts[:hwp_id] if opts[:hwp_id] && opts[:hwp_id].length
> 0
-- 
1.7.4.4


Mime
View raw message