opennebula-cli 5.12.10 → 5.12.11

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: 6d5ed0a1d868288e4d2bfb291b538e7afa587f37
4
- data.tar.gz: 8c56ddc028460bd04f20df45edb7b759708bc036
3
+ metadata.gz: 8dfcbdaca315b41d1b6a7e1727c8606726175199
4
+ data.tar.gz: aaa61e951aca56c35a1a2b010c4fe407a5968a30
5
5
  SHA512:
6
- metadata.gz: fe1905ab4bbe431528d99cabd55b2f4af5b26dbe26d6e5314b637cd2d90bf720aafd5fa586dd1e49c82074fa082c64db113e5150abf869480d559fb6d24c963f
7
- data.tar.gz: 876f36863cc63ee69cdd7234ca7348e4197f822a563f8952eb1595d0f33e3936769134645e4bf2ee4aeb29ff0b0bdd963cb794581df314c993c139e4e81d8f4e
6
+ metadata.gz: 234caf8c1c92887f92b77d64447e6896ad315d7df4d0273c73af4499a2e6751b9e9e8219d0ba43b7c1840013faca8fc983532a556cfb8c665876b5278e7e2b27
7
+ data.tar.gz: cdc563ecf243364402ce65633d2d27359c08f852249be40f7ad30eec27185fe40204363505fb4e415d0da59fc94220af67675bc87ae11100aad531d1ca349faf
data/bin/oneacct CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneacl CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onecluster CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onedatastore CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneflow CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneflow-template CHANGED
@@ -28,11 +28,25 @@ else
28
28
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
29
29
  end
30
30
 
31
+ # %%RUBYGEMS_SETUP_BEGIN%%
31
32
  if File.directory?(GEMS_LOCATION)
32
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
33
- require 'rubygems'
34
- Gem.use_paths(File.realpath(GEMS_LOCATION))
33
+ real_gems_path = File.realpath(GEMS_LOCATION)
34
+ if !defined?(Gem) || Gem.path != [real_gems_path]
35
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
36
+
37
+ # Suppress warnings from Rubygems
38
+ # https://github.com/OpenNebula/one/issues/5379
39
+ begin
40
+ verb = $VERBOSE
41
+ $VERBOSE = nil
42
+ require 'rubygems'
43
+ Gem.use_paths(real_gems_path)
44
+ ensure
45
+ $VERBOSE = verb
46
+ end
47
+ end
35
48
  end
49
+ # %%RUBYGEMS_SETUP_END%%
36
50
 
37
51
  $LOAD_PATH << RUBY_LIB_LOCATION
38
52
  $LOAD_PATH << ONEFLOW_LOCATION
data/bin/onegroup CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onehook CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onehost CHANGED
@@ -28,11 +28,25 @@ else
28
28
  REMOTES_LOCATION = ONE_LOCATION + '/var/remotes/'
29
29
  end
30
30
 
31
+ # %%RUBYGEMS_SETUP_BEGIN%%
31
32
  if File.directory?(GEMS_LOCATION)
32
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
33
- require 'rubygems'
34
- Gem.use_paths(File.realpath(GEMS_LOCATION))
33
+ real_gems_path = File.realpath(GEMS_LOCATION)
34
+ if !defined?(Gem) || Gem.path != [real_gems_path]
35
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
36
+
37
+ # Suppress warnings from Rubygems
38
+ # https://github.com/OpenNebula/one/issues/5379
39
+ begin
40
+ verb = $VERBOSE
41
+ $VERBOSE = nil
42
+ require 'rubygems'
43
+ Gem.use_paths(real_gems_path)
44
+ ensure
45
+ $VERBOSE = verb
46
+ end
47
+ end
35
48
  end
49
+ # %%RUBYGEMS_SETUP_END%%
36
50
 
37
51
  $LOAD_PATH << RUBY_LIB_LOCATION
38
52
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneimage CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onemarket CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onemarketapp CHANGED
@@ -28,11 +28,25 @@ else
28
28
  VAR_LOCATION = ONE_LOCATION + '/var'
29
29
  end
30
30
 
31
+ # %%RUBYGEMS_SETUP_BEGIN%%
31
32
  if File.directory?(GEMS_LOCATION)
32
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
33
- require 'rubygems'
34
- Gem.use_paths(File.realpath(GEMS_LOCATION))
33
+ real_gems_path = File.realpath(GEMS_LOCATION)
34
+ if !defined?(Gem) || Gem.path != [real_gems_path]
35
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
36
+
37
+ # Suppress warnings from Rubygems
38
+ # https://github.com/OpenNebula/one/issues/5379
39
+ begin
40
+ verb = $VERBOSE
41
+ $VERBOSE = nil
42
+ require 'rubygems'
43
+ Gem.use_paths(real_gems_path)
44
+ ensure
45
+ $VERBOSE = verb
46
+ end
47
+ end
35
48
  end
49
+ # %%RUBYGEMS_SETUP_END%%
36
50
 
37
51
  $LOAD_PATH << RUBY_LIB_LOCATION
38
52
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onesecgroup CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneshowback CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onetemplate CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneuser CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevcenter CHANGED
@@ -28,11 +28,25 @@ else
28
28
  REMOTES_LOCATION = ONE_LOCATION + '/var/remotes/'
29
29
  end
30
30
 
31
+ # %%RUBYGEMS_SETUP_BEGIN%%
31
32
  if File.directory?(GEMS_LOCATION)
32
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
33
- require 'rubygems'
34
- Gem.use_paths(File.realpath(GEMS_LOCATION))
33
+ real_gems_path = File.realpath(GEMS_LOCATION)
34
+ if !defined?(Gem) || Gem.path != [real_gems_path]
35
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
36
+
37
+ # Suppress warnings from Rubygems
38
+ # https://github.com/OpenNebula/one/issues/5379
39
+ begin
40
+ verb = $VERBOSE
41
+ $VERBOSE = nil
42
+ require 'rubygems'
43
+ Gem.use_paths(real_gems_path)
44
+ ensure
45
+ $VERBOSE = verb
46
+ end
47
+ end
35
48
  end
49
+ # %%RUBYGEMS_SETUP_END%%
36
50
 
37
51
  $LOAD_PATH << RUBY_LIB_LOCATION
38
52
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevdc CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevm CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevmgroup CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevnet CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevntemplate CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevrouter CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onezone CHANGED
@@ -26,11 +26,25 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
29
30
  if File.directory?(GEMS_LOCATION)
30
- $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
31
- require 'rubygems'
32
- Gem.use_paths(File.realpath(GEMS_LOCATION))
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
34
+
35
+ # Suppress warnings from Rubygems
36
+ # https://github.com/OpenNebula/one/issues/5379
37
+ begin
38
+ verb = $VERBOSE
39
+ $VERBOSE = nil
40
+ require 'rubygems'
41
+ Gem.use_paths(real_gems_path)
42
+ ensure
43
+ $VERBOSE = verb
44
+ end
45
+ end
33
46
  end
47
+ # %%RUBYGEMS_SETUP_END%%
34
48
 
35
49
  $LOAD_PATH << RUBY_LIB_LOCATION
36
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -227,11 +227,15 @@ class AcctHelper < OpenNebulaHelper::OneHelper
227
227
  d["HOURS"]
228
228
  end
229
229
 
230
+ column :RUNNING_HOURS, "Running hours", :size=>7 do |d|
231
+ d["RHOURS"] || '-'
232
+ end
233
+
230
234
  column :COST, "Cost", :size=>15 do |d|
231
235
  d["TOTAL_COST"]
232
236
  end
233
237
 
234
- default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :COST
238
+ default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :RUNNING_HOURS, :COST
235
239
  end
236
240
 
237
241
  def self.print_start_end_time_header(start_time, end_time)
@@ -124,7 +124,8 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
124
124
  :name => 'weekly',
125
125
  :large => '--weekly days',
126
126
  :description => 'Repeats the schedule action the days of the week ' \
127
- 'specified, it can be a number between 0,6 separated with commas.' \
127
+ 'specified, it can be a number between 0 (Sunday) to 6 (Saturday) ' \
128
+ 'separated with commas. ' \
128
129
  'For example: onevm resume 0 --schedule "09/23 14:15" --weekly 0,2,4',
129
130
  :format => String
130
131
  }
@@ -133,8 +134,8 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
133
134
  :name => 'monthly',
134
135
  :large => '--monthly days',
135
136
  :description => 'Repeats the schedule action the days of the month ' \
136
- 'specified, it can be a number between 0,31 separated with commas.' \
137
- 'For example: onevm resume 0 --schedule "09/23 14:15" --monthly 0,14',
137
+ 'specified, it can be a number between 1,31 separated with commas. ' \
138
+ 'For example: onevm resume 0 --schedule "09/23 14:15" --monthly 1,14',
138
139
  :format => String
139
140
  }
140
141
 
@@ -142,7 +143,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
142
143
  :name => 'yearly',
143
144
  :large => '--yearly days',
144
145
  :description => 'Repeats the schedule action the days of the year ' \
145
- 'specified, it can be a number between 0,365 separated with commas.' \
146
+ 'specified, it can be a number between 0,365 separated with commas. ' \
146
147
  'For example: onevm resume 0 --schedule "09/23 14:15" --yearly 30,60',
147
148
  :format => String
148
149
  }
@@ -151,7 +152,7 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
151
152
  :name => 'hourly',
152
153
  :large => '--hourly hour',
153
154
  :description => 'Repeats the schedule action each hours specified,' \
154
- 'it can be a number between 0,168 separated with commas.' \
155
+ 'it can be a number between 0,168 separated with commas. ' \
155
156
  'For example: onevm resume 0 --schedule "09/23 14:15" --hourly 1,5',
156
157
  :format => Numeric
157
158
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.12.10
4
+ version: 5.12.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opennebula
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 5.12.10
19
+ version: 5.12.11
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 5.12.10
26
+ version: 5.12.11
27
27
  description: Commands used to talk to OpenNebula
28
28
  email: contact@opennebula.io
29
29
  executables: