opennebula-cli 6.0.0.3 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6684e7c42c363472a8e8e6b70eb823e154b5202
4
- data.tar.gz: 2a9a2adf6d1fd6b4c0870439d2dfaab46b1826b6
3
+ metadata.gz: 0c5f86ca71a7d95f88aaf713683882a82f003992
4
+ data.tar.gz: 95fe7015ea7b87889484f625cdcd615c4bab64c7
5
5
  SHA512:
6
- metadata.gz: 8cf2cc4c8944210a31eede3cd8477053a97e28cfb4e63eb3ef64e7c6bf3ac8b767f3e54a8b545127daef1fa619fff2a8925c5d3f503d245c01e9c459df726dcd
7
- data.tar.gz: eafa428bb55bf7379447683bb842ec34cbca8bec0baeee1bb9562bc28e05abdb44f120675b713370c16879f9b6e28814f7b0aa0c00080a939e6f11f2edb33775
6
+ metadata.gz: 0dd6fc9565cc444a6d2f6f19457e9f65913b776e73cfd8421fbfba4cd0e9f42318045e64cc9028201526bb35bf2838e863912276d6f3bd2ced3e05d8a86e0b85
7
+ data.tar.gz: fc4625f40e75030009aaa17e7ffc02a54512d3858ca910054345b21c42e2f125e3ac521d39ea72c44d49a93b5773853ec60329be52ff076a7b998f21d5310f1a
data/bin/oneacct CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneacl CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onecluster CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onedatastore CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneflow CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneflow-template CHANGED
@@ -28,25 +28,14 @@ else
28
28
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
29
29
  end
30
30
 
31
- # %%RUBYGEMS_SETUP_BEGIN%%
32
31
  if File.directory?(GEMS_LOCATION)
33
32
  real_gems_path = File.realpath(GEMS_LOCATION)
34
33
  if !defined?(Gem) || Gem.path != [real_gems_path]
35
34
  $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
35
+ require 'rubygems'
36
+ Gem.use_paths(real_gems_path)
47
37
  end
48
38
  end
49
- # %%RUBYGEMS_SETUP_END%%
50
39
 
51
40
  $LOAD_PATH << RUBY_LIB_LOCATION
52
41
  $LOAD_PATH << ONEFLOW_LOCATION
data/bin/onegroup CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onehook CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -265,9 +254,9 @@ CommandParser::CmdParser.new(ARGV) do
265
254
  [Admin]: locks only Admin actions.
266
255
  EOT
267
256
 
268
- command :lock, lock_desc, [:range, :hookid_list],
257
+ command :lock, lock_desc, :hookid,
269
258
  :options => [USE, MANAGE, ADMIN, ALL] do
270
- helper.perform_actions(args[0], options, 'Hook locked') do |t|
259
+ helper.perform_action(args[0], options, 'Hook locked') do |t|
271
260
  if !options[:use].nil?
272
261
  level = 1
273
262
  elsif !options[:manage].nil?
@@ -288,8 +277,8 @@ CommandParser::CmdParser.new(ARGV) do
288
277
  Valid states are: All.
289
278
  EOT
290
279
 
291
- command :unlock, unlock_desc, [:range, :hookid_list] do
292
- helper.perform_actions(args[0], options, 'Hook unlocked') do |t|
280
+ command :unlock, unlock_desc, :hookid do
281
+ helper.perform_action(args[0], options, 'Hook unlocked') do |t|
293
282
  t.unlock
294
283
  end
295
284
  end
data/bin/onehost CHANGED
@@ -28,25 +28,14 @@ else
28
28
  REMOTES_LOCATION = ONE_LOCATION + '/var/remotes/'
29
29
  end
30
30
 
31
- # %%RUBYGEMS_SETUP_BEGIN%%
32
31
  if File.directory?(GEMS_LOCATION)
33
32
  real_gems_path = File.realpath(GEMS_LOCATION)
34
33
  if !defined?(Gem) || Gem.path != [real_gems_path]
35
34
  $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
35
+ require 'rubygems'
36
+ Gem.use_paths(real_gems_path)
47
37
  end
48
38
  end
49
- # %%RUBYGEMS_SETUP_END%%
50
39
 
51
40
  $LOAD_PATH << RUBY_LIB_LOCATION
52
41
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneimage CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -445,9 +434,9 @@ CommandParser::CmdParser.new(ARGV) do
445
434
  [Admin]: locks only Admin actions.
446
435
  EOT
447
436
 
448
- command :lock, lock_desc, [:range, :imageid_list],
437
+ command :lock, lock_desc, :imageid,
449
438
  :options => [USE, MANAGE, ADMIN, ALL] do
450
- helper.perform_actions(args[0], options, 'Image locked') do |i|
439
+ helper.perform_action(args[0], options, 'Image locked') do |i|
451
440
  if !options[:use].nil?
452
441
  level = 1
453
442
  elsif !options[:manage].nil?
@@ -468,8 +457,8 @@ CommandParser::CmdParser.new(ARGV) do
468
457
  Valid states are: All.
469
458
  EOT
470
459
 
471
- command :unlock, unlock_desc, [:range, :imageid_list] do
472
- helper.perform_actions(args[0], options, 'Image unlocked') do |i|
460
+ command :unlock, unlock_desc, :imageid do
461
+ helper.perform_action(args[0], options, 'Image unlocked') do |i|
473
462
  i.unlock
474
463
  end
475
464
  end
data/bin/onemarket CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onemarketapp CHANGED
@@ -28,25 +28,14 @@ else
28
28
  VAR_LOCATION = ONE_LOCATION + '/var'
29
29
  end
30
30
 
31
- # %%RUBYGEMS_SETUP_BEGIN%%
32
31
  if File.directory?(GEMS_LOCATION)
33
32
  real_gems_path = File.realpath(GEMS_LOCATION)
34
33
  if !defined?(Gem) || Gem.path != [real_gems_path]
35
34
  $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
35
+ require 'rubygems'
36
+ Gem.use_paths(real_gems_path)
47
37
  end
48
38
  end
49
- # %%RUBYGEMS_SETUP_END%%
50
39
 
51
40
  $LOAD_PATH << RUBY_LIB_LOCATION
52
41
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -449,11 +438,11 @@ CommandParser::CmdParser.new(ARGV) do
449
438
  [Admin]: locks only Admin actions.
450
439
  EOT
451
440
 
452
- command :lock, lock_desc, [:range, :appid_list],
441
+ command :lock, lock_desc, :appid,
453
442
  :options => [USE, MANAGE, ADMIN, ALL] do
454
- helper.perform_actions(args[0],
455
- options,
456
- 'MarketPlaceApp locked') do |app|
443
+ helper.perform_action(args[0],
444
+ options,
445
+ 'MarketPlaceApp locked') do |app|
457
446
  if !options[:use].nil?
458
447
  level = 1
459
448
  elsif !options[:manage].nil?
@@ -474,10 +463,10 @@ CommandParser::CmdParser.new(ARGV) do
474
463
  Valid states are: All.
475
464
  EOT
476
465
 
477
- command :unlock, unlock_desc, [:range, :appid_list] do
478
- helper.perform_actions(args[0],
479
- options,
480
- 'MarketPlaceApp unlocked') do |app|
466
+ command :unlock, unlock_desc, :appid do
467
+ helper.perform_action(args[0],
468
+ options,
469
+ 'MarketPlaceApp unlocked') do |app|
481
470
  app.unlock
482
471
  end
483
472
  end
data/bin/onesecgroup CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/oneshowback CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onetemplate CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -225,17 +214,8 @@ CommandParser::CmdParser.new(ARGV) do
225
214
  Creates a new VM instance from the given Template. This VM can be
226
215
  managed with the 'onevm' command.
227
216
 
228
- The source Template can be modified by replacing existing attributes; or
229
- adding new DISK or NIC elements. The new attributes can be specified with the
230
- command options or the file argument.
231
-
232
- Example:
233
-
234
- - Instantiate a template and add a new NIC
235
- onetemplate instantiate 23 --nic private_net
236
-
237
- - Instantiate a template and replace CONTEXT with a new one
238
- onetemplate instantiate 23 --startscript /path/to/my/start_script
217
+ The source Template can be modified adding or replacing attributes with
218
+ the optional file argument, or with the options.
239
219
  EOT
240
220
 
241
221
  command :instantiate, instantiate_desc, :templateid, [:file, nil],
@@ -415,9 +395,9 @@ CommandParser::CmdParser.new(ARGV) do
415
395
  [Admin]: locks only Admin actions.
416
396
  EOT
417
397
 
418
- command :lock, lock_desc, [:range, :templateid_list],
398
+ command :lock, lock_desc, :templateid,
419
399
  :options => [USE, MANAGE, ADMIN, ALL] do
420
- helper.perform_actions(args[0], options, 'Template locked') do |t|
400
+ helper.perform_action(args[0], options, 'Template locked') do |t|
421
401
  if !options[:use].nil?
422
402
  level = 1
423
403
  elsif !options[:manage].nil?
@@ -438,8 +418,8 @@ CommandParser::CmdParser.new(ARGV) do
438
418
  Valid states are: All.
439
419
  EOT
440
420
 
441
- command :unlock, unlock_desc, [:range, :templateid_list] do
442
- helper.perform_actions(args[0], options, 'Template unlocked') do |t|
421
+ command :unlock, unlock_desc, :templateid do
422
+ helper.perform_action(args[0], options, 'Template unlocked') do |t|
443
423
  t.unlock
444
424
  end
445
425
  end
data/bin/oneuser CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
data/bin/onevcenter CHANGED
@@ -28,25 +28,14 @@ else
28
28
  REMOTES_LOCATION = ONE_LOCATION + '/var/remotes/'
29
29
  end
30
30
 
31
- # %%RUBYGEMS_SETUP_BEGIN%%
32
31
  if File.directory?(GEMS_LOCATION)
33
32
  real_gems_path = File.realpath(GEMS_LOCATION)
34
33
  if !defined?(Gem) || Gem.path != [real_gems_path]
35
34
  $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
35
+ require 'rubygems'
36
+ Gem.use_paths(real_gems_path)
47
37
  end
48
38
  end
49
- # %%RUBYGEMS_SETUP_END%%
50
39
 
51
40
  $LOAD_PATH << RUBY_LIB_LOCATION
52
41
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
@@ -272,7 +261,7 @@ CommandParser::CmdParser.new(ARGV) do
272
261
  vi_client,
273
262
  options[:object])
274
263
 
275
- if options[:object] == 'networks' && !args.first.nil?
264
+ if options[:object] == "networks" && !args.first.nil?
276
265
  indexes = args.first
277
266
  else
278
267
  importer.retrieve_resources(helper.parse_opts(options))
data/bin/onevdc CHANGED
@@ -26,25 +26,14 @@ else
26
26
  GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
27
  end
28
28
 
29
- # %%RUBYGEMS_SETUP_BEGIN%%
30
29
  if File.directory?(GEMS_LOCATION)
31
30
  real_gems_path = File.realpath(GEMS_LOCATION)
32
31
  if !defined?(Gem) || Gem.path != [real_gems_path]
33
32
  $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
33
+ require 'rubygems'
34
+ Gem.use_paths(real_gems_path)
45
35
  end
46
36
  end
47
- # %%RUBYGEMS_SETUP_END%%
48
37
 
49
38
  $LOAD_PATH << RUBY_LIB_LOCATION
50
39
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'