incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1178395 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
Date Mon, 03 Oct 2011 12:41:09 GMT
Author: mfojtik
Date: Mon Oct  3 12:41:08 2011
New Revision: 1178395

URL: http://svn.apache.org/viewvc?rev=1178395&view=rev
Log:
rhevm_client (create_vm): do not replace double by single quotes in user data

This is unnecessary (Nokogiri will take care of escaping quotes as char
entities) and wrong, since it alters the user data.

Signed-off-by: David Lutterkort <lutter@redhat.com>

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb?rev=1178395&r1=1178394&r2=1178395&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb Mon Oct
 3 12:41:08 2011
@@ -102,12 +102,6 @@ module RHEVM
       (result_xml/'/cluster/version').first[:major].strip == major
     end
 
-    def escape_user_data(data)
-      # Replace " with ' to keep quotes in XML attribute safe
-      data.gsub!(/"/, "'")
-      data
-    end
-
     def create_vm(template_id, opts={})
       opts ||= {}
       builder = Nokogiri::XML::Builder.new do
@@ -130,7 +124,7 @@ module RHEVM
                 #
                 custom_property({
                   :name => "floppyinject",
-                  :value => "#{RHEVM::FILEINJECT_PATH}:#{escape_user_data(Base64.decode64(opts[:user_data]))}",
+                  :value => "#{RHEVM::FILEINJECT_PATH}:#{Base64.decode64(opts[:user_data])}",
                   :regexp => "^.*:.*$"})
               }
             else



Mime
View raw message