mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #847: Udate EC2_AUTH and OCCI_AUTH location
This commit is contained in:
parent
c27b3ad024
commit
7ab03f0ecb
@ -21,17 +21,18 @@ ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
|
||||
VAR_LOCATION = "/var/lib/one"
|
||||
CONFIGURATION_FILE = "/etc/one/econe.conf"
|
||||
TEMPLATE_LOCATION = "/etc/one/ec2query_templates"
|
||||
EC2_AUTH = "/etc/one/auth/ec2_auth"
|
||||
else
|
||||
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
|
||||
VAR_LOCATION = ONE_LOCATION+"/var"
|
||||
CONFIGURATION_FILE = ONE_LOCATION+"/etc/econe.conf"
|
||||
TEMPLATE_LOCATION = ONE_LOCATION+"/etc/ec2query_templates"
|
||||
EC2_AUTH = ONE_LOCATION + "/etc/auth/ec2_auth"
|
||||
end
|
||||
|
||||
VIEWS_LOCATION = RUBY_LIB_LOCATION + "/cloud/econe/views"
|
||||
EC2_AUTH = VAR_LOCATION + "/ec2_auth"
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
@ -76,13 +77,13 @@ if CloudServer.is_port_open?(settings.config[:server],
|
||||
puts "Port busy, please shutdown the service or move econe server port."
|
||||
exit 1
|
||||
end
|
||||
|
||||
begin
|
||||
|
||||
begin
|
||||
ENV["ONE_CIPHER_AUTH"] = EC2_AUTH
|
||||
cloud_auth = CloudAuth.new(settings.config)
|
||||
rescue => e
|
||||
puts "Error initializing authentication system"
|
||||
puts e.message
|
||||
puts e.message
|
||||
exit -1
|
||||
end
|
||||
|
||||
@ -91,7 +92,7 @@ set :cloud_auth, cloud_auth
|
||||
econe_host = conf[:ssl_server]
|
||||
econe_host ||= conf[:server]
|
||||
econe_port = conf[:port]
|
||||
|
||||
|
||||
set :econe_host, econe_host
|
||||
set :econe_port, econe_port
|
||||
|
||||
|
@ -26,16 +26,18 @@ ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION="/usr/lib/one/ruby"
|
||||
VAR_LOCATION = "/var/lib/one"
|
||||
TEMPLATE_LOCATION="/etc/one/occi_templates"
|
||||
CONFIGURATION_FILE = "/etc/one/occi-server.conf"
|
||||
OCCI_AUTH = "/etc/one/auth/occi_auth"
|
||||
else
|
||||
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
|
||||
VAR_LOCATION = ONE_LOCATION+"/var"
|
||||
TEMPLATE_LOCATION=ONE_LOCATION+"/etc/occi_templates"
|
||||
CONFIGURATION_FILE = ONE_LOCATION+"/etc/occi-server.conf"
|
||||
OCCI_AUTH = ONE_LOCATION + "/etc/auth/occi_auth"
|
||||
end
|
||||
|
||||
OCCI_AUTH = VAR_LOCATION + "/occi_auth"
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud/occi"
|
||||
$: << RUBY_LIB_LOCATION+"/cloud" # For the Repository Manager
|
||||
@ -80,15 +82,15 @@ end
|
||||
set :host, settings.config[:server]
|
||||
set :port, settings.config[:port]
|
||||
|
||||
begin
|
||||
begin
|
||||
ENV["ONE_CIPHER_AUTH"] = OCCI_AUTH
|
||||
cloud_auth = CloudAuth.new(settings.config)
|
||||
rescue => e
|
||||
puts "Error initializing authentication system"
|
||||
puts e.message
|
||||
puts e.message
|
||||
exit -1
|
||||
end
|
||||
|
||||
|
||||
set :cloud_auth, cloud_auth
|
||||
|
||||
##############################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user