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]<