opennebula 5.7.90.pre → 5.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NOTICE +1 -1
- data/lib/CommandManager.rb +1 -1
- data/lib/cloud/CloudClient.rb +1 -1
- data/lib/opennebula.rb +1 -1
- data/lib/opennebula/virtual_machine.rb +10 -10
- data/lib/vcenter_driver.rb +35 -27
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 569ac708944804df9cca52281833b1a3c382fba0
|
4
|
+
data.tar.gz: 567bc53b12a85dd81f1ef644e54373074cc8fa06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee01e030e359ca720b7069750f9fa6522a89757eadbf5d96d225c30666f14da876f584aadaff373e371e173e61f753f0995fc8a3d6a38c8e775d181f4a8a8155
|
7
|
+
data.tar.gz: c9a50bd7207e7373e2a675471ea905210ded882ecb710a1877eb0656de777c46160c387009b7ef32998e87a58742818a85d13815baba0d1a08705475df7a4db2
|
data/NOTICE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
OpenNebula Open Source Project
|
2
2
|
--------------------------------------------------------------------------------
|
3
|
-
Copyright 2002-
|
3
|
+
Copyright 2002-2019, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
|
4
4
|
--------------------------------------------------------------------------------
|
5
5
|
|
6
6
|
You can find more information about the project, release notes and
|
data/lib/CommandManager.rb
CHANGED
@@ -268,7 +268,7 @@ private
|
|
268
268
|
SSHCommand.run("mkdir -p #{remote_dir}",host,logger)
|
269
269
|
|
270
270
|
# Use SCP to sync:
|
271
|
-
sync_cmd = "scp -rp #{REMOTES_LOCATION}
|
271
|
+
sync_cmd = "scp -rp #{REMOTES_LOCATION}/* #{host}:#{remote_dir}"
|
272
272
|
|
273
273
|
# Use rsync to sync:
|
274
274
|
# sync_cmd = "rsync -Laz #{REMOTES_LOCATION} #{host}:#{@remote_dir}"
|
data/lib/cloud/CloudClient.rb
CHANGED
data/lib/opennebula.rb
CHANGED
@@ -947,16 +947,6 @@ module OpenNebula
|
|
947
947
|
end
|
948
948
|
end
|
949
949
|
|
950
|
-
private
|
951
|
-
def action(name)
|
952
|
-
return Error.new('ID not defined') if !@pe_id
|
953
|
-
|
954
|
-
rc = @client.call(VM_METHODS[:action], name, @pe_id)
|
955
|
-
rc = nil if !OpenNebula.is_error?(rc)
|
956
|
-
|
957
|
-
return rc
|
958
|
-
end
|
959
|
-
|
960
950
|
def wait_state(state, timeout=10)
|
961
951
|
vm_state = ""
|
962
952
|
lcm_state = ""
|
@@ -979,6 +969,16 @@ module OpenNebula
|
|
979
969
|
"VM is in state #{vm_state}, #{lcm_state}")
|
980
970
|
end
|
981
971
|
|
972
|
+
private
|
973
|
+
def action(name)
|
974
|
+
return Error.new('ID not defined') if !@pe_id
|
975
|
+
|
976
|
+
rc = @client.call(VM_METHODS[:action], name, @pe_id)
|
977
|
+
rc = nil if !OpenNebula.is_error?(rc)
|
978
|
+
|
979
|
+
return rc
|
980
|
+
end
|
981
|
+
|
982
982
|
def wait_lcm_state(state, timeout=10)
|
983
983
|
vm_state = ""
|
984
984
|
lcm_state = ""
|
data/lib/vcenter_driver.rb
CHANGED
@@ -21,15 +21,15 @@
|
|
21
21
|
ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION)
|
22
22
|
|
23
23
|
if !ONE_LOCATION
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
BIN_LOCATION = '/usr/bin' unless defined?(BIN_LOCATION)
|
25
|
+
LIB_LOCATION = '/usr/lib/one' unless defined?(LIB_LOCATION)
|
26
|
+
ETC_LOCATION = '/etc/one/' unless defined?(ETC_LOCATION)
|
27
|
+
VAR_LOCATION = '/var/lib/one' unless defined?(VAR_LOCATION)
|
28
28
|
else
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
BIN_LOCATION = ONE_LOCATION + '/bin' unless defined?(BIN_LOCATION)
|
30
|
+
LIB_LOCATION = ONE_LOCATION + '/lib' unless defined?(LIB_LOCATION)
|
31
|
+
ETC_LOCATION = ONE_LOCATION + '/etc/' unless defined?(ETC_LOCATION)
|
32
|
+
VAR_LOCATION = ONE_LOCATION + '/var/' unless defined?(VAR_LOCATION)
|
33
33
|
end
|
34
34
|
|
35
35
|
ENV['LANG'] = 'C'
|
@@ -38,20 +38,26 @@ $LOAD_PATH << LIB_LOCATION + '/ruby/vendors/rbvmomi/lib'
|
|
38
38
|
$LOAD_PATH << LIB_LOCATION + '/ruby'
|
39
39
|
$LOAD_PATH << LIB_LOCATION + '/ruby/vcenter_driver'
|
40
40
|
|
41
|
+
# Holds vCenter configuration parameters
|
41
42
|
class VCenterConf < Hash
|
43
|
+
|
42
44
|
DEFAULT_CONFIGURATION = {
|
43
|
-
delete_images
|
44
|
-
vm_poweron_wait_default
|
45
|
-
debug_information
|
45
|
+
:delete_images => false,
|
46
|
+
:vm_poweron_wait_default => 300,
|
47
|
+
:debug_information => false
|
46
48
|
}
|
47
49
|
|
48
50
|
def initialize
|
49
|
-
|
51
|
+
replace(DEFAULT_CONFIGURATION)
|
50
52
|
begin
|
51
|
-
|
52
|
-
|
53
|
+
vcenterrc_path = "#{VAR_LOCATION}/remotes/etc/vmm/vcenter/vcenterrc"
|
54
|
+
merge!(YAML.load_file(vcenterrc_path))
|
55
|
+
rescue StandardError => e
|
56
|
+
STDERR.puts error_message("Couldn't load vcenterrc. \
|
57
|
+
Reason #{e.message}.")
|
53
58
|
end
|
54
59
|
end
|
60
|
+
|
55
61
|
end
|
56
62
|
|
57
63
|
require 'rbvmomi'
|
@@ -81,7 +87,9 @@ require 'file_helper'
|
|
81
87
|
CHECK_REFS = true
|
82
88
|
|
83
89
|
module VCenterDriver
|
90
|
+
|
84
91
|
CONFIG = VCenterConf.new
|
92
|
+
|
85
93
|
end
|
86
94
|
|
87
95
|
# ---------------------------------------------------------------------------- #
|
@@ -97,22 +105,22 @@ def error_message(message)
|
|
97
105
|
end
|
98
106
|
|
99
107
|
def check_valid(parameter, label)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
108
|
+
return unless parameter.nil? || parameter.empty?
|
109
|
+
|
110
|
+
STDERR.puts error_message("The parameter '#{label}'\
|
111
|
+
is required for this action.")
|
112
|
+
exit(-1)
|
104
113
|
end
|
105
114
|
|
106
115
|
def check_item(item, target_class)
|
107
|
-
|
108
|
-
|
109
|
-
if target_class
|
110
|
-
|
111
|
-
|
112
|
-
"Got '#{item.class} instead."
|
113
|
-
end
|
116
|
+
item.name if CHECK_REFS
|
117
|
+
if target_class
|
118
|
+
if !item.instance_of?(target_class)
|
119
|
+
raise "Expecting type 'RbVmomi::VIM::#{target_class}'. " \
|
120
|
+
"Got '#{item.class} instead."
|
114
121
|
end
|
115
|
-
rescue RbVmomi::Fault => e
|
116
|
-
raise "Reference \"#{item._ref}\" error [#{e.message}]. The reference does not exist"
|
117
122
|
end
|
123
|
+
rescue RbVmomi::Fault => e
|
124
|
+
raise "Reference \"#{item._ref}\" error [#{e.message}]. \
|
125
|
+
The reference does not exist"
|
118
126
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opennebula
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -139,9 +139,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - '
|
142
|
+
- - '>='
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
147
|
rubygems_version: 2.0.14.1
|