-
Notifications
You must be signed in to change notification settings - Fork 10
/
oneirb
executable file
·67 lines (56 loc) · 1.38 KB
/
oneirb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/ruby
ONE_LOCATION=ENV["ONE_LOCATION"]
if !ONE_LOCATION
RUBY_LIB_LOCATION="/usr/lib/one/ruby"
VAR_LOCATION = "/var/lib/one"
LIB_LOCATION = "/usr/lib/one"
ETC_LOCATION = "/etc/one"
else
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
VAR_LOCATION = ONE_LOCATION+"/var"
LIB_LOCATION = ONE_LOCATION+"/lib"
ETC_LOCATION = ONE_LOCATION + "/etc"
end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud" # For the Repository Manager
$: << RUBY_LIB_LOCATION+"/cli" # For the Repository Manager
$: << LIB_LOCATION+'/oneflow/lib'
################################################
# Required libraries
################################################
require 'base64'
require 'csv'
require 'date'
require 'digest/md5'
require 'erb'
require 'fileutils'
require 'json'
require 'nokogiri'
require 'openssl'
require 'ox'
require 'set'
require 'socket'
require 'sqlite3'
require 'tempfile'
require 'time'
require 'uri'
require 'yaml'
require 'pp'
require 'opennebula'
require 'vcenter_driver'
include OpenNebula
@client = Client.new
module OpenNebula
class XMLElement
def self.from_xml(s)
m = s.match(/^<(\w+)>/)
root_element = m[1]
elem = XMLElement.new
elem.initialize_xml(s, root_element)
return elem
end
end
end
version = ">= 0"
gem 'pry', version
load Gem.bin_path('pry', 'pry', version)