opennebula-cli 5.12.7 → 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: 6e29fa3ced9904d772fa21dce326f36ba53f5b5b
4
- data.tar.gz: 4423b75aac339b713828c7eaf63b85b7af6a911f
3
+ metadata.gz: 8dfcbdaca315b41d1b6a7e1727c8606726175199
4
+ data.tar.gz: aaa61e951aca56c35a1a2b010c4fe407a5968a30
5
5
  SHA512:
6
- metadata.gz: 1a878d4aa7ab7c2cabc77f933fdc95d861ee54aa97678358efafb02aff4b3a17872ce2650d8b9087d40bae38b4e2d7e63afe17ffb7f59c29b1d2ba40ed3a9ab4
7
- data.tar.gz: a32059c260cbea98f8ea3a22b887bc9032edd1091cd65e76944cef6adf22c4acc7b99a28aba8798e7f86d3a1791bf6e412edfc858841d82c51fcc75380a79adf
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'
@@ -257,10 +271,21 @@ CommandParser::CmdParser.new(ARGV) do
257
271
  importer = VCenterDriver::VcImporter.new_child(helper.client,
258
272
  vi_client,
259
273
  options[:object])
260
- importer.retrieve_resources(helper.parse_opts(options))
261
- indexes = importer.get_indexes(args.first)
262
274
 
263
- importer.process_import(indexes)
275
+ if options[:object] == "networks" && !args.first.nil?
276
+ indexes = args.first
277
+ else
278
+ importer.retrieve_resources(helper.parse_opts(options))
279
+ indexes = importer.get_indexes(args.first)
280
+ end
281
+
282
+ if indexes.nil?
283
+ raise "Could not get any unimported #{options[:object]}"\
284
+ " resources info in host: #{options[:host]} with"\
285
+ " this input: #{args.first}"
286
+ end
287
+
288
+ importer.process_import(indexes, options)
264
289
 
265
290
  importer.stdout
266
291
  rescue StandardError => e
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'
@@ -1271,7 +1285,7 @@ CommandParser::CmdParser.new(ARGV) do
1271
1285
  lock_desc = <<-EOT.unindent
1272
1286
  Locks a VM with differents levels for lock any actions with this VM, show and
1273
1287
  monitoring never will be locked.
1274
- Aalid states are: All.
1288
+ Valid states are: All.
1275
1289
  EOT
1276
1290
 
1277
1291
  command :lock, lock_desc, :vmid,
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.7
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: 2020-12-16 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,19 +16,18 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 5.12.7
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.7
26
+ version: 5.12.11
27
27
  description: Commands used to talk to OpenNebula
28
28
  email: contact@opennebula.io
29
29
  executables:
30
30
  - oneacct
31
- - onevcenter
32
31
  - oneacl
33
32
  - onecluster
34
33
  - onedatastore
@@ -44,6 +43,7 @@ executables:
44
43
  - oneshowback
45
44
  - onetemplate
46
45
  - oneuser
46
+ - onevcenter
47
47
  - onevdc
48
48
  - onevm
49
49
  - onevmgroup
@@ -55,7 +55,6 @@ extensions: []
55
55
  extra_rdoc_files: []
56
56
  files:
57
57
  - bin/oneacct
58
- - bin/onevcenter
59
58
  - bin/oneacl
60
59
  - bin/onecluster
61
60
  - bin/onedatastore
@@ -71,6 +70,7 @@ files:
71
70
  - bin/oneshowback
72
71
  - bin/onetemplate
73
72
  - bin/oneuser
73
+ - bin/onevcenter
74
74
  - bin/onevdc
75
75
  - bin/onevm
76
76
  - bin/onevmgroup
@@ -78,32 +78,32 @@ files:
78
78
  - bin/onevntemplate
79
79
  - bin/onevrouter
80
80
  - bin/onezone
81
- - lib/command_parser.rb
82
81
  - lib/cli_helper.rb
82
+ - lib/command_parser.rb
83
83
  - lib/one_helper.rb
84
+ - lib/one_helper/oneacct_helper.rb
84
85
  - lib/one_helper/oneacl_helper.rb
85
86
  - lib/one_helper/onecluster_helper.rb
87
+ - lib/one_helper/onedatastore_helper.rb
88
+ - lib/one_helper/oneflow_helper.rb
89
+ - lib/one_helper/oneflowtemplate_helper.rb
86
90
  - lib/one_helper/onegroup_helper.rb
87
91
  - lib/one_helper/onehook_helper.rb
92
+ - lib/one_helper/onehost_helper.rb
93
+ - lib/one_helper/oneimage_helper.rb
88
94
  - lib/one_helper/onemarket_helper.rb
95
+ - lib/one_helper/onemarketapp_helper.rb
96
+ - lib/one_helper/oneprovision_helper.rb
89
97
  - lib/one_helper/onequota_helper.rb
90
98
  - lib/one_helper/onesecgroup_helper.rb
99
+ - lib/one_helper/onetemplate_helper.rb
100
+ - lib/one_helper/oneuser_helper.rb
91
101
  - lib/one_helper/onevcenter_helper.rb
92
102
  - lib/one_helper/onevdc_helper.rb
93
103
  - lib/one_helper/onevm_helper.rb
94
104
  - lib/one_helper/onevmgroup_helper.rb
95
105
  - lib/one_helper/onevnet_helper.rb
96
106
  - lib/one_helper/onevntemplate_helper.rb
97
- - lib/one_helper/oneacct_helper.rb
98
- - lib/one_helper/onedatastore_helper.rb
99
- - lib/one_helper/oneflow_helper.rb
100
- - lib/one_helper/oneflowtemplate_helper.rb
101
- - lib/one_helper/onehost_helper.rb
102
- - lib/one_helper/oneimage_helper.rb
103
- - lib/one_helper/onemarketapp_helper.rb
104
- - lib/one_helper/oneprovision_helper.rb
105
- - lib/one_helper/onetemplate_helper.rb
106
- - lib/one_helper/oneuser_helper.rb
107
107
  - lib/one_helper/onevrouter_helper.rb
108
108
  - lib/one_helper/onezone_helper.rb
109
109
  - NOTICE