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

feature #495: Prepare ONE environment

This commit is contained in:
Daniel Molina 2011-02-28 17:08:41 +01:00
parent a963336a8f
commit d8aa8b7a48
2 changed files with 5 additions and 11 deletions

View File

@ -14,17 +14,6 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
ONE_LOCATION = ENV["ONE_LOCATION"] if !ONE_LOCATION
if !ONE_LOCATION
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
else
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'OpenNebula'
include OpenNebula

View File

@ -19,11 +19,16 @@ ONE_LOCATION = ENV["ONE_LOCATION"]
if !ONE_LOCATION
LOG_LOCATION = "/var/log/one"
VAR_LOCATION = "/var/lib/one"
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
else
VAR_LOCATION = ONE_LOCATION+"/var"
LOG_LOCATION = ONE_LOCATION+"/var"
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
end
$: << RUBY_LIB_LOCATION
$: << File.dirname(__FILE__)
require 'models/OpenNebulaJSON'
include OpenNebulaJSON