deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] Removed base64 requirement for user-data. User data are now passed in client given format.
Date Tue, 27 Sep 2011 09:42:21 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/base_driver/features.rb      |    2 +-
 .../lib/deltacloud/drivers/rhevm/rhevm_client.rb   |    2 +-
 .../drivers/vsphere/vsphere_filemanager.rb         |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/lib/deltacloud/base_driver/features.rb b/server/lib/deltacloud/base_driver/features.rb
index af1a9c5..32257ed 100644
--- a/server/lib/deltacloud/base_driver/features.rb
+++ b/server/lib/deltacloud/base_driver/features.rb
@@ -171,7 +171,7 @@ module Deltacloud
       description "Make user-defined data available on a special webserver"
       operation :create do
         param :user_data, :string, :optional, [],
-        "Base64 encoded user data will be published to internal webserver"
+        "User data will be published to internal webserver"
       end
     end
 
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
index 79d4441..8669850 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
@@ -130,7 +130,7 @@ module RHEVM
                 #
                 custom_property({
                   :name => "floppyinject",
-                  :value => "#{RHEVM::FILEINJECT_PATH}:#{escape_user_data(Base64.decode64(opts[:user_data]))}",
+                  :value => "#{RHEVM::FILEINJECT_PATH}:#{escape_user_data(opts[:user_data])}",
                   :regexp => "^.*:.*$"})
               }
             else
diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
index ce99af6..c0f6970 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb
@@ -42,11 +42,11 @@ module VSphere
       uploadFile(datastore, file, file_name)
     end
 
-    def user_data!(datastore,base64_content,file_name)
+    def user_data!(datastore,content,file_name)
       command="#{MKISOFS_EXECUTABLE} -stream-file-name deltacloud-user-data.txt -stream-media-size
#{ISO_SECTORS}"
       iso_file=''
       Open3::popen3(command) do |stdin, stdout, stderr|
-        stdin.write(base64_content.unpack("m"))
+        stdin.write(content)
         stdin.close()
         iso_file=StringIO::new(stdout.read)
       end
-- 
1.7.4.1


Mime
View raw message