1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Hector Sanjuan 2012-03-02 12:50:17 +01:00
commit 43c7fb0147
5 changed files with 27 additions and 1 deletions

View File

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

View File

@ -23,6 +23,7 @@
######################
:databasetype: sqlite
#:databaseserver: dbuser:dbpassword@localhost
#:htaccess: /var/www/.htaccess
:dbdebug: no

View File

@ -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
}
}

View File

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

View File

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