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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f58b279afbf33a3a7b1a328b4f4d9ca08a434a8a
4
- data.tar.gz: 4d16da8ba66d0212c450b706abe60029db91bacb
3
+ metadata.gz: 569ac708944804df9cca52281833b1a3c382fba0
4
+ data.tar.gz: 567bc53b12a85dd81f1ef644e54373074cc8fa06
5
5
  SHA512:
6
- metadata.gz: ed53aa2554a1b4112851cdaa898f72ba8313412a31980f68ead9dd99324f8c07aad3dd24d5730112706069777642b5d1bda7053a0284bf944b7779ac949a4c5e
7
- data.tar.gz: ed7c9f250ab0fbe4ea381dbabeb47b9868946a8729b5572d772de016be08d82699a9097523fdea450f049ea21817acc445aac6864f80764540fb608c9b64d65c
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-2018, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
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
@@ -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}/. #{host}:#{remote_dir}"
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}"
@@ -50,7 +50,7 @@ end
50
50
  module CloudClient
51
51
 
52
52
  # OpenNebula version
53
- VERSION = '5.7.90'
53
+ VERSION = '5.8.0'
54
54
 
55
55
  # #########################################################################
56
56
  # Default location for the authentication file
data/lib/opennebula.rb CHANGED
@@ -71,5 +71,5 @@ require 'opennebula/vntemplate_pool'
71
71
  module OpenNebula
72
72
 
73
73
  # OpenNebula version
74
- VERSION = '5.7.90'
74
+ VERSION = '5.8.0'
75
75
  end
@@ -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 = ""
@@ -21,15 +21,15 @@
21
21
  ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION)
22
22
 
23
23
  if !ONE_LOCATION
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)
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
- 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)
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: false,
44
- vm_poweron_wait_default: 300,
45
- debug_information: false
45
+ :delete_images => false,
46
+ :vm_poweron_wait_default => 300,
47
+ :debug_information => false
46
48
  }
47
49
 
48
50
  def initialize
49
- self.replace(DEFAULT_CONFIGURATION)
51
+ replace(DEFAULT_CONFIGURATION)
50
52
  begin
51
- self.merge!(YAML.load_file("#{VAR_LOCATION}/remotes/etc/vmm/vcenter/vcenterrc"))
52
- rescue
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
- if parameter.nil? || parameter.empty?
101
- STDERR.puts error_message("The parameter '#{label}' is required for this action.")
102
- exit(-1)
103
- end
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
- begin
108
- item.name if CHECK_REFS
109
- if target_class
110
- if !item.instance_of?(target_class)
111
- raise "Expecting type 'RbVmomi::VIM::#{target_class}'. " \
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.7.90.pre
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-12 00:00:00.000000000 Z
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: 1.3.1
144
+ version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
147
  rubygems_version: 2.0.14.1