From 08f9ff5eed7d78ae024a0413b4d5df86f3287b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 18 Jul 2011 12:21:47 +0200 Subject: [PATCH 1/6] Fix bad ETC install of oZones Also, typo corrected in oZones Server. --- install.sh | 3 ++- src/ozones/Server/models/OzonesServer.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index cbcdd3853f..4ea4f0b4cb 100755 --- a/install.sh +++ b/install.sh @@ -159,7 +159,8 @@ else DELETE_DIRS="$MAKE_DIRS" elif [ "$OZONES" = "yes" ]; then - MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION $OZONES_LOCATION" + MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION $OZONES_LOCATION \ + $ETC_LOCATION" DELETE_DIRS="$MAKE_DIRS" else diff --git a/src/ozones/Server/models/OzonesServer.rb b/src/ozones/Server/models/OzonesServer.rb index 779dbe1f9a..a1fe754f4e 100644 --- a/src/ozones/Server/models/OzonesServer.rb +++ b/src/ozones/Server/models/OzonesServer.rb @@ -267,7 +267,7 @@ class OzonesServer else pr.update # Rewrite proxy conf file return [200, OZones.str_to_json( - "Resource #{kind} with id #{id} successfuly deleted")] + "Resource #{kind} with id #{id} successfully deleted")] end end From 36b8b5e741f8b60b7707f6d81616c28fe7745412 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 18 Jul 2011 13:07:49 +0200 Subject: [PATCH 2/6] added gem dependencies installation to install_gem --- share/install_gems/install_gems | 126 +++++++++++++++++++++++++++++--- 1 file changed, 115 insertions(+), 11 deletions(-) diff --git a/share/install_gems/install_gems b/share/install_gems/install_gems index ba58cded59..8787898279 100755 --- a/share/install_gems/install_gems +++ b/share/install_gems/install_gems @@ -21,6 +21,42 @@ GROUPS={ :acct_mysql => %w{sequel sqlite3 mysql} } +DISTRIBUTIONS={ + :debian => { + :id => ['Ubuntu', 'Debian'], + :dependencies => { + 'sqlite3' => 'libsqlite3-dev', + 'mysql' => 'libmysqlclient-dev', + 'curb' => 'libcurl4-openssl-dev', + 'nokogiri' => 'libexpat1-dev', + 'xmlparser' => %w{libxml2-dev libxslt1-dev} + }, + :install_command => 'apt-get install' + }, + :redhat => { + :id => ['CentOS', /^RedHat/], + :dependencies => { + 'sqlite3' => 'sqlite-devel', + 'mysql' => 'mysql-devel', + 'curb' => 'curl-devel', + 'nokogiri' => 'expat-devel', + 'xmlparser' => %w{libxml2-devel libxslt-devel} + }, + :install_command => 'yum install' + }, + :suse => { + :id => [/^SUSE/], + :dependencies => { + 'sqlite3' => 'sqlite3-devel' , + 'mysql' => 'libmysqlclient-devel', + 'curb' => 'libcurl-devel', + 'nokogiri' => 'libexpat-devel', + 'xmlparser' => %w{libxml2-devel libxslt-devel} + }, + :install_command => 'zypper install' + } +} + class String def unindent(spaces=4) @@ -38,18 +74,13 @@ def try_library(name, error_message) end def install_warning(packages) - puts "Use -h for help" - puts +# puts "Use -h for help" +# puts puts "About to install the gems for these components:" puts "* "< Date: Mon, 18 Jul 2011 15:09:49 +0200 Subject: [PATCH 3/6] Removed unnecessary dependency --- src/ozones/Server/models/OCAInteraction.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ozones/Server/models/OCAInteraction.rb b/src/ozones/Server/models/OCAInteraction.rb index 189bcc9dd7..d06f84422d 100644 --- a/src/ozones/Server/models/OCAInteraction.rb +++ b/src/ozones/Server/models/OCAInteraction.rb @@ -15,7 +15,6 @@ #--------------------------------------------------------------------------- # require 'OpenNebula' -require 'one_helper/onegroup_helper' class OCAInteraction From d8a485ec9fe394754b49df3c16eb271d2d37c22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 18 Jul 2011 15:19:07 +0200 Subject: [PATCH 4/6] Change client commands for coherence with the rest of the CLI --- install.sh | 4 ++-- src/ozones/Client/bin/{ovdcs => ovdc} | 0 src/ozones/Client/bin/{ozones => ozone} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/ozones/Client/bin/{ovdcs => ovdc} (100%) rename src/ozones/Client/bin/{ozones => ozone} (100%) diff --git a/install.sh b/install.sh index 4ea4f0b4cb..de3ec95519 100755 --- a/install.sh +++ b/install.sh @@ -1059,8 +1059,8 @@ OZONES_LIB_CLIENT_CLI_HELPER_FILES="\ src/ozones/Client/lib/cli/ozones_helper/vdc_helper.rb \ src/ozones/Client/lib/cli/ozones_helper/zones_helper.rb" -OZONES_BIN_CLIENT_FILES="src/ozones/Client/bin/ovdcs \ - src/ozones/Client/bin/ozones" +OZONES_BIN_CLIENT_FILES="src/ozones/Client/bin/ovdc \ + src/ozones/Client/bin/ozone" OZONES_RUBY_LIB_FILES="src/oca/ruby/OpenNebula.rb" diff --git a/src/ozones/Client/bin/ovdcs b/src/ozones/Client/bin/ovdc similarity index 100% rename from src/ozones/Client/bin/ovdcs rename to src/ozones/Client/bin/ovdc diff --git a/src/ozones/Client/bin/ozones b/src/ozones/Client/bin/ozone similarity index 100% rename from src/ozones/Client/bin/ozones rename to src/ozones/Client/bin/ozone From 40ddc00bc41e8c4afc436b09c8c9d62e655cb6b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 18 Jul 2011 15:22:04 +0200 Subject: [PATCH 5/6] Compatiblity for oZones with ruby1.9 --- src/ozones/Client/lib/OZonesClient.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ozones/Client/lib/OZonesClient.rb b/src/ozones/Client/lib/OZonesClient.rb index 3641c5319d..bc8294259d 100644 --- a/src/ozones/Client/lib/OZonesClient.rb +++ b/src/ozones/Client/lib/OZonesClient.rb @@ -94,7 +94,7 @@ EOT body_str = "" - template.strip.each{|line| + template.strip.each_line{|line| line.strip! key,value = line.split("=") body_str = body_str + key + "=" + URI.escape(value) + "&" @@ -261,4 +261,4 @@ EOT OZonesClient::Error.new(e.message) end end -end \ No newline at end of file +end From add417a37260c315dfd425aca646abfc16be95cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 18 Jul 2011 15:36:11 +0200 Subject: [PATCH 6/6] Changed oZones resource creation for ONE CLI compatiblity --- src/ozones/Client/lib/cli/ozones_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ozones/Client/lib/cli/ozones_helper.rb b/src/ozones/Client/lib/cli/ozones_helper.rb index f5813ee6b4..160062c791 100644 --- a/src/ozones/Client/lib/cli/ozones_helper.rb +++ b/src/ozones/Client/lib/cli/ozones_helper.rb @@ -22,7 +22,7 @@ module OZonesHelper if id[-1..-1] == "," id = id[0..id.size-2] end - [0, "#{kind.upcase} #{id} created successfully"] + [0, "ID: #{id}"] end end