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

Get the correct zone_id from oned.conf file

This commit is contained in:
Tino Vazquez 2014-02-03 16:06:23 +01:00
parent 7a7c03ee95
commit 5354996243

View File

@ -208,7 +208,11 @@ helpers do
env['rack.session.options'][:expire_after] = 30*60*60*24-1
end
zone = OpenNebula::Zone.new_with_id(0, client)
rc = OpenNebula::System.new(client).get_configuration
return [500, rc.message] if OpenNebula.is_error?(rc)
return [500, "Couldn't find out zone identifier"] if !rc['FEDERATION/ZONE_ID']
zone = OpenNebula::Zone.new_with_id(rc['FEDERATION/ZONE_ID'].to_i, client)
zone.info
session[:zone_name] = zone.name