From cd49f9c6fb2566fddcfaff90f5cd1df89bd495b3 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 24 Sep 2011 19:55:42 +0200 Subject: [PATCH 1/3] Bug #820: Saveas fails if image name has spaces. Now the template is generated to deal with this case (cherry picked from commit e92b0f2bfacec91da30ae956441e5504e4eb3cec) --- src/rm/RequestManagerVirtualMachine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rm/RequestManagerVirtualMachine.cc b/src/rm/RequestManagerVirtualMachine.cc index efae90e0f7..cdbef2c83e 100644 --- a/src/rm/RequestManagerVirtualMachine.cc +++ b/src/rm/RequestManagerVirtualMachine.cc @@ -408,7 +408,7 @@ void VirtualMachineSaveDisk::request_execute(xmlrpc_c::paramList const& paramLis // ------------------ Template for the new image ------------------ - oss << "NAME= " << img_name << endl; + oss << "NAME= \"" << img_name << "\"" << endl; oss << "PUBLIC = NO " << endl; oss << "SOURCE = - " << endl; From 7a530fb77c0334d36b4b2404fc09792e1444197b Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 24 Sep 2011 20:34:38 +0200 Subject: [PATCH 2/3] Bug #827: Removed unneeded Configuration file an associated requires. Added yaml explicit require as it seems to be needed by some ruby versions --- install.sh | 3 +- src/cloud/common/Configuration.rb | 115 ------------------------------ src/cloud/common/cloud.conf | 35 --------- src/cloud/ec2/lib/econe-server.rb | 2 +- src/cloud/occi/lib/occi-server.rb | 1 + src/sunstone/sunstone-server.rb | 1 + 6 files changed, 4 insertions(+), 153 deletions(-) delete mode 100644 src/cloud/common/Configuration.rb delete mode 100644 src/cloud/common/cloud.conf diff --git a/install.sh b/install.sh index 9deb718b85..72fb72b1d7 100755 --- a/install.sh +++ b/install.sh @@ -791,8 +791,7 @@ RUBY_OPENNEBULA_LIB_FILES="src/oca/ruby/OpenNebula/Host.rb \ COMMON_CLOUD_LIB_FILES="src/cloud/common/CloudServer.rb \ src/cloud/common/CloudClient.rb \ - src/cloud/common/CloudAuth.rb - src/cloud/common/Configuration.rb" + src/cloud/common/CloudAuth.rb" COMMON_CLOUD_CLIENT_LIB_FILES="src/cloud/common/CloudClient.rb" diff --git a/src/cloud/common/Configuration.rb b/src/cloud/common/Configuration.rb deleted file mode 100644 index 2189e4ad1a..0000000000 --- a/src/cloud/common/Configuration.rb +++ /dev/null @@ -1,115 +0,0 @@ -# -------------------------------------------------------------------------- # -# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - -############################################################################### -# The Configuration Class represents a simple configuration file for the -# Cloud servers. It does not check syntax. -############################################################################### -class Configuration - - ########################################################################### - # Patterns to parse the Configuration File - ########################################################################### - - NAME_REG =/[\w\d_-]+/ - VARIABLE_REG =/\s*(#{NAME_REG})\s*=\s*/ - - SIMPLE_VARIABLE_REG =/#{VARIABLE_REG}([^\[]+?)(#.*)?/ - SINGLE_VARIABLE_REG =/^#{SIMPLE_VARIABLE_REG}$/ - ARRAY_VARIABLE_REG =/^#{VARIABLE_REG}\[(.*?)\]/m - - ########################################################################### - ########################################################################### - - def initialize(file) - @conf=parse_conf(file) - end - - def add_configuration_value(key,value) - add_value(@conf,key,value) - end - - def [](key) - @conf[key.to_s.upcase] - end - - ########################################################################### - ########################################################################### - -private - - # - # - # - def add_value(conf, key, value) - if conf[key] - if !conf[key].kind_of?(Array) - conf[key]=[conf[key]] - end - conf[key]< Date: Sat, 24 Sep 2011 20:47:22 +0200 Subject: [PATCH 3/3] bug #829: Error when accessing /login in sunstone. Misspelled class --- src/sunstone/sunstone-server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sunstone/sunstone-server.rb b/src/sunstone/sunstone-server.rb index 392579bb1c..8935afd89e 100755 --- a/src/sunstone/sunstone-server.rb +++ b/src/sunstone/sunstone-server.rb @@ -167,7 +167,7 @@ end get '/login' do if !authorized? - templ = settings.confing[:auth]=="basic"? "login.html" : "login_x509.html" + templ = settings.config[:auth]=="basic"? "login.html" : "login_x509.html" return File.read(File.dirname(__FILE__)+'/templates/'+templ) end end