From fbbce209d5df5c86a14449c6a23b3058252d4f75 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Wed, 29 Feb 2012 11:09:14 +0100 Subject: [PATCH 1/4] Sunstone: small improvements to passwd operations Inform user that password change was successful. Empty the new password box when dialog is re-opened. (cherry picked from commit 519b7f263b5cb4b399b67cb9259d9e8fff2e84c6) --- src/sunstone/public/js/plugins/users-tab.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index a9d35c164f..19d48435e1 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -131,9 +131,11 @@ var user_actions = { "User.passwd" : { type: "multiple", call: OpenNebula.User.passwd, - //nocallback + callback: function(req,res){ + notifyMessage(tr("Change password successful")); + }, elements: userElements, - error: onError + error: onError, }, "User.chgrp" : { type: "multiple", @@ -492,6 +494,7 @@ function popUpCreateUserDialog(){ function popUpUpdatePasswordDialog(){ + $('#new_password',$update_pw_dialog).val(""); $update_pw_dialog.dialog('open'); } From deb5e8d025f1a2e2bd312a0bc6127ae97230f688 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Wed, 29 Feb 2012 17:55:39 +0100 Subject: [PATCH 2/4] Feature #1109: Self service support in oZones server Needs testing & GUI extension --- src/ozones/Server/lib/OZones/ApacheWritter.rb | 8 ++++++++ src/ozones/Server/lib/OZones/Zones.rb | 1 + 2 files changed, 9 insertions(+) diff --git a/src/ozones/Server/lib/OZones/ApacheWritter.rb b/src/ozones/Server/lib/OZones/ApacheWritter.rb index 327874a2e4..ca3ae1fdd3 100644 --- a/src/ozones/Server/lib/OZones/ApacheWritter.rb +++ b/src/ozones/Server/lib/OZones/ApacheWritter.rb @@ -28,12 +28,20 @@ module OZones zone.vdcs.all.each{|vdc| htaccess << "RewriteRule ^#{vdc.NAME} " + "#{zone.ENDPOINT} [P]\n" + if zone.SUNSENDPOINT != nil htaccess << "RewriteRule ^sunstone_#{vdc.NAME}/(.+) " + "#{zone.SUNSENDPOINT}/$1 [P]\n" htaccess << "RewriteRule ^sunstone_#{vdc.NAME} " + "#{zone.SUNSENDPOINT}/ [P]\n" end + + if zone.SELFENDPOINT != nil + htaccess << "RewriteRule ^self_#{vdc.NAME}/(.+) " + + "#{zone.SELFENDPOINT}/$1 [P]\n" + htaccess << "RewriteRule ^self_#{vdc.NAME} " + + "#{zone.SELFENDPOINT}/ [P]\n" + end } } diff --git a/src/ozones/Server/lib/OZones/Zones.rb b/src/ozones/Server/lib/OZones/Zones.rb index 5c1230945f..6e9aae9db7 100644 --- a/src/ozones/Server/lib/OZones/Zones.rb +++ b/src/ozones/Server/lib/OZones/Zones.rb @@ -30,6 +30,7 @@ module OZones property :ONEPASS, String, :required => true property :ENDPOINT, String, :required => true property :SUNSENDPOINT, String + property :SELFENDPOINT, String has n, :vdcs From f50df547e8c26942d503233afe0e2917ca955720 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Thu, 1 Mar 2012 18:55:42 +0100 Subject: [PATCH 3/4] Feature #1073: Add support for mysql and posgresql in oZones server --- src/ozones/Server/etc/ozones-server.conf | 1 + src/ozones/Server/ozones-server.rb | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ozones/Server/etc/ozones-server.conf b/src/ozones/Server/etc/ozones-server.conf index 022158205e..8b09856d69 100644 --- a/src/ozones/Server/etc/ozones-server.conf +++ b/src/ozones/Server/etc/ozones-server.conf @@ -23,6 +23,7 @@ ###################### :databasetype: sqlite +#:databaseserver: dbuser:dbpassword@localhost #:htaccess: /var/www/.htaccess :dbdebug: no diff --git a/src/ozones/Server/ozones-server.rb b/src/ozones/Server/ozones-server.rb index 84dc77d9b7..a3fb9d8b85 100755 --- a/src/ozones/Server/ozones-server.rb +++ b/src/ozones/Server/ozones-server.rb @@ -57,7 +57,20 @@ config=YAML::load(config_data) db_type = config[:databasetype] -db_url = db_type + "://" + VAR_LOCATION + "/ozones.db" +case db_type + when "sqlite" then + db_url = db_type + "://" + VAR_LOCATION + "/ozones.db" + when "mysql","postgres" then + if config[:databaseserver].nil? + warn "DB server needed for this type of DB backend" + exit -1 + end + + db_url = db_type + "://" + config[:databaseserver] + "/ozones" + else + warn "DB type #{db_type} not recognized" + exit -1 +end ############################################################################## # DB bootstrapping From ecb7120d2b248616611d3ac82aca93cc9a6d4c3e Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Fri, 2 Mar 2012 12:05:45 +0100 Subject: [PATCH 4/4] Avoid possible issues with old migrators --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index fa2b593fe0..322a9065c2 100755 --- a/install.sh +++ b/install.sh @@ -1430,6 +1430,9 @@ if [ "$UNINSTALL" = "no" ] ; then for d in $MAKE_DIRS; do mkdir -p $DESTDIR$d done + + # Remove old migrators + rm $LIB_LOCATION/ruby/onedb/*.rb fi # --- Install/Uninstall files ---