opennebula-cli 7.1.80.pre → 7.2.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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +1 -1
  3. data/bin/oneacl +1 -1
  4. data/bin/onebackupjob +1 -1
  5. data/bin/onecluster +1 -1
  6. data/bin/onedatastore +1 -1
  7. data/bin/oneflow +1 -1
  8. data/bin/oneflow-template +1 -1
  9. data/bin/oneform +1 -1
  10. data/bin/onegroup +1 -1
  11. data/bin/onehook +1 -1
  12. data/bin/onehost +1 -1
  13. data/bin/oneimage +1 -1
  14. data/bin/oneirb +1 -1
  15. data/bin/onelog +1 -1
  16. data/bin/onemarket +1 -1
  17. data/bin/onemarketapp +1 -1
  18. data/bin/onesecgroup +1 -1
  19. data/bin/oneshowback +1 -1
  20. data/bin/onetemplate +1 -1
  21. data/bin/oneuser +1 -1
  22. data/bin/onevdc +1 -1
  23. data/bin/onevm +2 -2
  24. data/bin/onevmgroup +1 -1
  25. data/bin/onevnet +1 -1
  26. data/bin/onevntemplate +1 -1
  27. data/bin/onevrouter +1 -1
  28. data/bin/onezone +1 -1
  29. data/lib/cli_helper.rb +1 -1
  30. data/lib/command_parser.rb +135 -126
  31. data/lib/load_opennebula_paths.rb +5 -0
  32. data/lib/ods_helper.rb +541 -0
  33. data/lib/one_helper/oneacct_helper.rb +117 -109
  34. data/lib/one_helper/oneacl_helper.rb +1 -1
  35. data/lib/one_helper/onebackupjob_helper.rb +1 -1
  36. data/lib/one_helper/onecluster_helper.rb +1 -1
  37. data/lib/one_helper/onedatastore_helper.rb +87 -80
  38. data/lib/one_helper/oneflow_helper.rb +1 -1
  39. data/lib/one_helper/oneflowtemplate_helper.rb +1 -1
  40. data/lib/one_helper/oneform_helper.rb +1 -1
  41. data/lib/one_helper/onegroup_helper.rb +1 -1
  42. data/lib/one_helper/onehook_helper.rb +1 -1
  43. data/lib/one_helper/onehost_helper.rb +1 -1
  44. data/lib/one_helper/oneimage_helper.rb +1 -1
  45. data/lib/one_helper/onemarket_helper.rb +59 -58
  46. data/lib/one_helper/onemarketapp_helper.rb +1 -1
  47. data/lib/one_helper/onequota_helper.rb +240 -190
  48. data/lib/one_helper/onesecgroup_helper.rb +87 -85
  49. data/lib/one_helper/onetemplate_helper.rb +64 -64
  50. data/lib/one_helper/oneuser_helper.rb +2 -2
  51. data/lib/one_helper/onevdc_helper.rb +45 -45
  52. data/lib/one_helper/onevm_helper.rb +6 -8
  53. data/lib/one_helper/onevmgroup_helper.rb +65 -63
  54. data/lib/one_helper/onevnet_helper.rb +1 -1
  55. data/lib/one_helper/onevntemplate_helper.rb +43 -40
  56. data/lib/one_helper/onevrouter_helper.rb +86 -87
  57. data/lib/one_helper/onezone_helper.rb +98 -101
  58. data/lib/one_helper.rb +90 -71
  59. data/share/schemas/xsd/acct.xsd +3 -104
  60. data/share/schemas/xsd/cluster.xsd +4 -21
  61. data/share/schemas/xsd/datastore.xsd +4 -29
  62. data/share/schemas/xsd/document.xsd +3 -25
  63. data/share/schemas/xsd/group.xsd +2 -14
  64. data/share/schemas/xsd/group_pool.xsd +2 -14
  65. data/share/schemas/xsd/hook.xsd +2 -0
  66. data/share/schemas/xsd/host.xsd +5 -7
  67. data/share/schemas/xsd/image.xsd +2 -25
  68. data/share/schemas/xsd/marketplace.xsd +3 -22
  69. data/share/schemas/xsd/marketplaceapp.xsd +3 -25
  70. data/share/schemas/xsd/opennebula_configuration.xsd +3 -2
  71. data/share/schemas/xsd/requirements.xsd +3 -21
  72. data/share/schemas/xsd/security_group.xsd +6 -43
  73. data/share/schemas/xsd/shared.xsd +3 -3
  74. data/share/schemas/xsd/vdc.xsd +2 -7
  75. data/share/schemas/xsd/vm_group.xsd +3 -25
  76. data/share/schemas/xsd/vm_pool.xsd +2 -0
  77. data/share/schemas/xsd/vmtemplate.xsd +3 -25
  78. data/share/schemas/xsd/vnet.xsd +9 -67
  79. data/share/schemas/xsd/vnet_pool.xsd +8 -57
  80. data/share/schemas/xsd/vntemplate.xsd +3 -25
  81. data/share/schemas/xsd/vrouter.xsd +4 -32
  82. metadata +8 -6
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2025, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2026, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -17,54 +17,63 @@
17
17
  require 'optparse'
18
18
  require 'pp'
19
19
 
20
+ # String class extension to include unindent method
20
21
  class String
21
- def unindent(spaces=nil)
22
+
23
+ # Unindent the string by removing leading spaces.
24
+ # @param [Integer] spaces to remove, if nil the size of the first match
25
+ # of leading spaces is used.
26
+ def unindent(spaces = nil)
22
27
  unless spaces
23
- m = self.match(/^(\s*)/)
28
+ m = match(/^(\s*)/)
24
29
  spaces = m[1].size
25
30
  end
26
31
 
27
- self.gsub!(/^ {#{spaces}}/, '')
32
+ gsub!(/^ {#{spaces}}/, '')
28
33
  end
34
+
29
35
  end
30
36
 
31
37
  module CommandParser
38
+
32
39
  OPTIONS = [
33
40
  VERBOSE={
34
- :name => "verbose",
35
- :short => "-v",
36
- :large => "--verbose",
37
- :description => "Verbose mode"
41
+ :name => 'verbose',
42
+ :short => '-v',
43
+ :large => '--verbose',
44
+ :description => 'Verbose mode'
38
45
  },
39
46
  HELP={
40
- :name => "help",
41
- :short => "-h",
42
- :large => "--help",
43
- :description => "Show this message"
47
+ :name => 'help',
48
+ :short => '-h',
49
+ :large => '--help',
50
+ :description => 'Show this message'
44
51
  },
45
52
  VERSION={
46
- :name => "version",
47
- :short => "-V",
48
- :large => "--version",
49
- :description => "Show version and copyright information",
53
+ :name => 'version',
54
+ :short => '-V',
55
+ :large => '--version',
56
+ :description => 'Show version and copyright information'
50
57
  }
51
58
  ]
52
59
 
60
+ # CmdParser class to handle command line arguments and options
53
61
  class CmdParser
62
+
54
63
  attr_reader :options, :args
55
64
 
56
- def initialize(args=[], &block)
57
- @available_options = Array.new
58
- @commands = Hash.new
59
- @command_list = Array.new
60
- @formats = Hash.new
65
+ def initialize(args = [], &block)
66
+ @available_options = []
67
+ @commands = {}
68
+ @command_list = []
69
+ @formats = {}
61
70
 
62
71
  @main = nil
63
72
 
64
73
  @exit_code = nil
65
74
 
66
75
  @args = args
67
- @options = Hash.new
76
+ @options = {}
68
77
 
69
78
  @before_proc=nil
70
79
  @comm_name=nil
@@ -73,22 +82,24 @@ module CommandParser
73
82
 
74
83
  instance_eval(&block)
75
84
 
76
- addons = Dir["#{OpenNebulaHelper::CLI_ADDONS_LOCATION}/#{File.basename($0)}/*"]
77
- if defined?(addons) and !addons.nil?
78
- addons.each do |addon_path|
79
- addon_code = File.read(addon_path)
80
- instance_eval(addon_code)
81
- end
85
+ addons = Dir["#{OpenNebulaHelper::CLI_ADDONS_LOCATION}/#{File.basename($PROGRAM_NAME)}/*"]
86
+ if defined?(addons) && !addons.nil?
87
+ addons.each do |addon_path|
88
+ addon_code = File.read(addon_path)
89
+ instance_eval(addon_code)
90
+ end
82
91
  end
83
92
 
84
- self.run
93
+ run
85
94
  end
86
95
 
87
96
  # Defines the usage information of the command
88
97
  # @param [String] str
89
98
  def usage(str)
90
99
  @usage = str
100
+ # rubocop:disable Naming/MemoizedInstanceVariableName
91
101
  @name ||= @usage.split(' ').first
102
+ # rubocop:enable Naming/MemoizedInstanceVariableName
92
103
  end
93
104
 
94
105
  # Defines the version the command
@@ -180,7 +191,7 @@ module CommandParser
180
191
  #
181
192
  def option(options)
182
193
  if options.instance_of?(Array)
183
- options.each { |o| @available_options << o }
194
+ options.each {|o| @available_options << o }
184
195
  elsif options.instance_of?(Hash)
185
196
  @available_options << options
186
197
  end
@@ -192,7 +203,7 @@ module CommandParser
192
203
  @exit_code = code
193
204
  end
194
205
 
195
- def exit_with_code(code, output=nil)
206
+ def exit_with_code(code, output = nil)
196
207
  puts output if output
197
208
  exit code
198
209
  end
@@ -281,16 +292,16 @@ module CommandParser
281
292
  # end
282
293
  #
283
294
  def command(name, desc, *args_format, &block)
284
- if name.is_a? (Array)
285
- name = name.join(" ").to_sym
295
+ if name.is_a?(Array)
296
+ name = name.join(' ').to_sym
286
297
  end
287
298
 
288
- cmd = Hash.new
299
+ cmd = {}
289
300
  cmd[:desc] = desc
290
301
  cmd[:arity] = 0
291
302
  cmd[:options] = []
292
- cmd[:args_format] = Array.new
293
- args_format.each {|args|
303
+ cmd[:args_format] = []
304
+ args_format.each do |args|
294
305
  if args.instance_of?(Array)
295
306
  cmd[:arity]+=1 unless args.include?(nil)
296
307
  cmd[:args_format] << args
@@ -305,14 +316,14 @@ module CommandParser
305
316
  cmd[:arity]+=1
306
317
  cmd[:args_format] << [args]
307
318
  end
308
- }
319
+ end
309
320
  cmd[:proc] = block
310
321
  @command_list << name.to_sym
311
322
  @commands[name.to_sym] = cmd
312
323
  end
313
324
 
314
325
  def deprecated_command(name, new_command)
315
- cmd = @commands[name.to_sym] || Hash.new
326
+ cmd = @commands[name.to_sym] || {}
316
327
  cmd[:desc] += "\nDeprecated, use #{new_command} instead"
317
328
  cmd[:deprecated] = new_command
318
329
 
@@ -399,10 +410,10 @@ module CommandParser
399
410
  # end
400
411
  #
401
412
  def main(*args_format, &block)
402
- @main=Hash.new
413
+ @main={}
403
414
  @main[:arity] = 0
404
- @main[:args_format] = Array.new
405
- args_format.collect {|args|
415
+ @main[:args_format] = []
416
+ args_format.collect do |args|
406
417
  if args.instance_of?(Array)
407
418
  @main[:arity]+=1 unless args.include?(nil)
408
419
  @main[:args_format] << args
@@ -412,7 +423,7 @@ module CommandParser
412
423
  @main[:arity]+=1
413
424
  @main[:args_format] << [args]
414
425
  end
415
- }
426
+ end
416
427
 
417
428
  @main[:proc] = block
418
429
  end
@@ -427,26 +438,23 @@ module CommandParser
427
438
  end
428
439
  end
429
440
 
430
-
431
441
  def run
432
- comm_name=""
442
+ comm_name=''
433
443
 
434
444
  if @main
435
445
  comm_name = @name
436
446
  comm = @main
437
- elsif
438
- if @args[0] && !@args[0].match(/^-/)
439
- while comm.nil? and @args.size > 0 do
440
- current = @args.shift
441
-
442
- if comm_name.empty?
443
- @comm_name = comm_name = "#{current}".to_sym
444
- else
445
- @comm_name = comm_name = "#{comm_name} #{current}".to_sym
446
- end
447
+ elsif @args[0] && !@args[0].match(/^-/)
448
+ while comm.nil? && !@args.empty?
449
+ current = @args.shift
447
450
 
448
- comm = @commands[comm_name]
451
+ if comm_name.empty?
452
+ (@comm_name = (comm_name = current.to_s.to_sym))
453
+ else
454
+ (@comm_name = (comm_name = "#{comm_name} #{current}".to_sym))
449
455
  end
456
+
457
+ comm = @commands[comm_name]
450
458
  end
451
459
  end
452
460
 
@@ -494,7 +502,7 @@ module CommandParser
494
502
  private
495
503
 
496
504
  def parse(extra_options)
497
- with_proc=Array.new
505
+ with_proc=[]
498
506
 
499
507
  @cmdparse=OptionParser.new do |opts|
500
508
  merge = @available_options
@@ -512,10 +520,10 @@ module CommandParser
512
520
  if e[:proc] && !e[:multiple]
513
521
  @options[e[:name].to_sym]=o
514
522
  with_proc<<e
515
- elsif e[:name]=="help"
523
+ elsif e[:name]=='help'
516
524
  print_help
517
525
  exit 0
518
- elsif e[:name]=="version"
526
+ elsif e[:name]=='version'
519
527
  puts @version
520
528
  exit 0
521
529
  elsif !e[:multiple]
@@ -533,20 +541,20 @@ module CommandParser
533
541
 
534
542
  begin
535
543
  @cmdparse.parse!(@args)
536
- rescue => e
544
+ rescue StandardError => e
537
545
  STDERR.puts e.message
538
- exit -1
546
+ exit(-1)
539
547
  end
540
548
 
541
- with_proc.each do |e|
542
- rc = e[:proc].call(@options[e[:name].to_sym], @options)
549
+ with_proc.each do |proc_opt|
550
+ rc = proc_opt[:proc].call(@options[proc_opt[:name].to_sym], @options)
543
551
  if rc.instance_of?(Array)
544
552
  if rc[0] == 0
545
- @options[e[:name].to_sym] = rc[1]
553
+ @options[proc_opt[:name].to_sym] = rc[1]
546
554
  else
547
555
  STDERR.puts rc[1]
548
- STDERR.puts "option #{e[:name]}: Parsing error"
549
- exit -1
556
+ STDERR.puts "option #{proc_opt[:name]}: Parsing error"
557
+ exit(-1)
550
558
  end
551
559
  end
552
560
  end
@@ -558,37 +566,37 @@ module CommandParser
558
566
  if arity>1
559
567
  STDERR.puts "#{args_format.length} parameters to run."
560
568
  else
561
- STDERR.puts "one parameter to run"
569
+ STDERR.puts 'one parameter to run'
562
570
  end
563
571
 
564
572
  print_command_help(name)
565
573
 
566
- exit -1
574
+ exit(-1)
567
575
  else
568
576
  id=0
569
- @args.collect!{|arg|
570
- unless format=args_format[id]
571
- args_str=args_format.collect{ |a|
577
+ @args.collect! do |arg|
578
+ unless args_format[id]
579
+ args_str=args_format.collect do |a|
572
580
  if a.include?(nil)
573
- "[#{a.compact.join("|")}]"
581
+ "[#{a.compact.join('|')}]"
574
582
  else
575
- "<#{a.join("|")}>"
583
+ "<#{a.join('|')}>"
576
584
  end
577
- }.join(' ')
585
+ end.join(' ')
578
586
 
579
- STDERR.puts "Wrong number of arguments"
587
+ STDERR.puts 'Wrong number of arguments'
580
588
  if args_str.empty?
581
- STDERR.puts "No argument is required"
589
+ STDERR.puts 'No argument is required'
582
590
  else
583
591
  STDERR.puts "The arguments should be: #{args_str}"
584
592
  end
585
- exit -1
593
+ exit(-1)
586
594
  end
587
595
 
588
596
  format = args_format[id]
589
597
  argument = nil
590
598
  error_msg = nil
591
- format.each { |f|
599
+ format.each do |f|
592
600
  if @formats[f]
593
601
  format_hash = @formats[f]
594
602
  elsif f.nil?
@@ -606,20 +614,21 @@ module CommandParser
606
614
  error_msg=rc[1]
607
615
  next
608
616
  end
609
- }
617
+ end
610
618
 
611
619
  unless argument
612
620
  if error_msg
613
621
  STDERR.puts error_msg
614
622
  else
615
- STDERR.puts "command #{name}: argument #{id} must be one of #{format.join(', ')}"
623
+ STDERR.puts "command #{name}: argument #{id} must " \
624
+ "be one of #{format.join(', ')}"
616
625
  end
617
- exit -1
626
+ exit(-1)
618
627
  end
619
628
 
620
629
  id+=1
621
630
  argument
622
- }
631
+ end
623
632
  end
624
633
  end
625
634
 
@@ -637,7 +646,7 @@ module CommandParser
637
646
 
638
647
  def print_all_commands_help
639
648
  if @usage
640
- puts "## SYNOPSIS"
649
+ puts '## SYNOPSIS'
641
650
  puts
642
651
  puts @usage
643
652
  puts
@@ -651,7 +660,7 @@ module CommandParser
651
660
  print_formatters
652
661
  puts
653
662
  if @version
654
- puts "## VERSION"
663
+ puts '## VERSION'
655
664
  puts @version
656
665
  end
657
666
  end
@@ -664,11 +673,11 @@ module CommandParser
664
673
  return print_all_commands_help
665
674
  end
666
675
 
667
- puts "## USAGE"
676
+ puts '## USAGE'
668
677
  print "#{name} "
669
678
  print_command(@commands[name])
670
679
 
671
- puts "## OPTIONS"
680
+ puts '## OPTIONS'
672
681
  command[:options].flatten.each do |o|
673
682
  print_option(o)
674
683
  end
@@ -679,7 +688,7 @@ module CommandParser
679
688
  end
680
689
 
681
690
  def print_options
682
- puts "## OPTIONS"
691
+ puts '## OPTIONS'
683
692
 
684
693
  shown_opts = []
685
694
  options = []
@@ -709,27 +718,27 @@ module CommandParser
709
718
  def print_option(o)
710
719
  opt_format = "#{' '*5}%-25s"
711
720
 
712
- str = ""
721
+ str = ''
713
722
  str << o[:short].split(' ').first << ', ' if o[:short]
714
723
  str << o[:large]
715
724
 
716
- params=sprintf(opt_format, str)
725
+ params = Kernel.format(opt_format, str)
717
726
 
718
727
  first_line=80-params.length
719
728
 
720
- description=word_wrap(80-32, o[:description], first_line).
721
- join(("\n"+" "*31))
729
+ description=word_wrap(80-32, o[:description], first_line)
730
+ .join("\n"+' '*31)
722
731
 
723
732
  puts "#{params} #{description}"
724
733
  end
725
734
 
726
735
  def print_commands
727
- cmd_format5 = "#{' '*3}%s"
736
+ cmd_format5 = "#{' '*3}%s"
728
737
 
729
738
  if @main
730
739
  print_command(@main)
731
740
  else
732
- puts "## COMMANDS"
741
+ puts '## COMMANDS'
733
742
 
734
743
  @command_list.sort! if @command_list
735
744
 
@@ -743,27 +752,27 @@ module CommandParser
743
752
  end
744
753
 
745
754
  def print_command(command)
746
- cmd_format10 = "#{' '*8}%s"
755
+ cmd_format10 = "#{' '*8}%s"
747
756
 
748
- args_str=command[:args_format].collect{ |a|
757
+ args_str=command[:args_format].collect do |a|
749
758
  if a.include?(nil)
750
- "[<#{a.compact.join("|")}>]"
759
+ "[<#{a.compact.join('|')}>]"
751
760
  else
752
- "<#{a.join("|")}>"
761
+ "<#{a.join('|')}>"
753
762
  end
754
- }.join(' ')
755
- printf "#{args_str}"
763
+ end.join(' ')
764
+ printf args_str.to_s
756
765
  puts
757
766
 
758
- command[:desc].split("\n").each { |l|
767
+ command[:desc].split("\n").each do |l|
759
768
  printf cmd_format10, l
760
769
  puts
761
- } if command[:desc]
770
+ end if command[:desc]
762
771
 
763
772
  if command[:options] && !command[:options].empty?
764
- opts_str=command[:options].flatten.collect{|o|
773
+ opts_str=command[:options].flatten.collect do |o|
765
774
  o[:name]
766
- }.join(', ')
775
+ end.join(', ')
767
776
  printf cmd_format10, "valid options: #{opts_str}"
768
777
  puts
769
778
  end
@@ -771,34 +780,34 @@ module CommandParser
771
780
  end
772
781
 
773
782
  def print_formatters
774
- puts "## ARGUMENT FORMATS"
783
+ puts '## ARGUMENT FORMATS'
775
784
 
776
- cmd_format5 = "#{' '*3}%s"
777
- cmd_format10 = "#{' '*8}%s"
785
+ cmd_format5 = "#{' '*3}%s"
786
+ cmd_format10 = "#{' '*8}%s"
778
787
 
779
788
  @formats = @formats.sort_by {|key, _| key } if @formats
780
789
 
781
- @formats.each{ |key,value|
790
+ @formats.each do |key, value|
782
791
  printf cmd_format5, "* #{key}"
783
792
  puts
784
793
 
785
- value[:desc].split("\n").each { |l|
794
+ value[:desc].split("\n").each do |l|
786
795
  printf cmd_format10, l
787
796
  puts
788
- }
797
+ end
789
798
 
790
799
  puts
791
- }
800
+ end
792
801
  end
793
802
 
794
803
  def print_deprecated(new_command)
795
- puts "This command is deprecated, use instead:"
796
- puts " $ #{File.basename $0} #{new_command}"
804
+ puts 'This command is deprecated, use instead:'
805
+ puts " $ #{File.basename $PROGRAM_NAME} #{new_command}"
797
806
  end
798
807
 
799
- def word_wrap(size, text, first_size=nil)
808
+ def word_wrap(size, text, first_size = nil)
800
809
  output=[]
801
- line=""
810
+ line=''
802
811
  if first_size
803
812
  line_size=first_size
804
813
  else
@@ -824,39 +833,39 @@ module CommandParser
824
833
  # Default Formatters for arguments
825
834
  ########################################################################
826
835
  def format_text(arg)
827
- arg.instance_of?(String) ? [0,arg] : [-1]
836
+ arg.instance_of?(String) ? [0, arg] : [-1]
828
837
  end
829
838
 
830
839
  def format_int(arg)
831
- arg.match(/^\d+$/) ? [0,arg] : [-1, "Argument '#{arg}' is not a valid ID"]
840
+ arg.match(/^\d+$/) ? [0, arg] : [-1, "Argument '#{arg}' is not a valid ID"]
832
841
  end
833
842
 
834
843
  def format_file(arg)
835
- File.file?(arg) ? [0,arg] : [-1]
844
+ File.file?(arg) ? [0, arg] : [-1]
836
845
  end
837
846
 
838
847
  REG_RANGE=/^(?:(?:\d+\.\.\d+|\d+),)*(?:\d+\.\.\d+|\d+)$/
839
848
 
840
849
  def format_range(arg)
841
- arg_s = arg.gsub(" ","").to_s
850
+ arg_s = arg.gsub(' ', '').to_s
842
851
  return [-1] unless arg_s.match(REG_RANGE)
843
852
 
844
- ids = Array.new
845
- arg_s.split(',').each { |e|
853
+ ids = []
854
+ arg_s.split(',').each do |e|
846
855
  if e.match(/^\d+$/)
847
856
  ids << e.to_i
848
- elsif m = e.match(/^(\d+)\.\.(\d+)$/)
857
+ elsif (m = e.match(/^(\d+)\.\.(\d+)$/))
849
858
  ids += (m[1].to_i..m[2].to_i).to_a
850
859
  else
851
860
  return [-1]
852
861
  end
853
- }
862
+ end
854
863
 
855
- return 0,ids.uniq
864
+ return 0, ids.uniq
856
865
  end
857
866
 
858
867
  def define_default_formats
859
- format :file, "Path to a file" do |arg|
868
+ format :file, 'Path to a file' do |arg|
860
869
  format_file(arg)
861
870
  end
862
871
 
@@ -864,11 +873,11 @@ module CommandParser
864
873
  format_range(arg)
865
874
  end
866
875
 
867
- format :text, "String" do |arg|
876
+ format :text, 'String' do |arg|
868
877
  format_text(arg)
869
878
  end
870
879
  end
871
- end
872
- end
873
880
 
881
+ end
874
882
 
883
+ end
@@ -0,0 +1,5 @@
1
+ # Stub for RubyGems installations. When the CLI is installed via
2
+ # `gem install opennebula-cli`, RubyGems already configures the load paths
3
+ # through its binstub mechanism. This file satisfies the
4
+ # `require 'load_opennebula_paths'` present in every CLI script without
5
+ # overriding the gem-managed paths.