opennebula-cli 6.4.5 → 6.5.80.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +1 -1
  3. data/bin/oneacl +1 -1
  4. data/bin/onecluster +1 -1
  5. data/bin/onedatastore +1 -1
  6. data/bin/oneflow +2 -3
  7. data/bin/oneflow-template +2 -2
  8. data/bin/onegroup +1 -1
  9. data/bin/onehook +1 -1
  10. data/bin/onehost +1 -1
  11. data/bin/oneimage +52 -3
  12. data/bin/oneirb +1 -1
  13. data/bin/onelog +1 -1
  14. data/bin/onemarket +1 -1
  15. data/bin/onemarketapp +1 -1
  16. data/bin/onesecgroup +1 -1
  17. data/bin/oneshowback +1 -1
  18. data/bin/onetemplate +1 -1
  19. data/bin/oneuser +3 -3
  20. data/bin/onevcenter +1 -1
  21. data/bin/onevdc +1 -1
  22. data/bin/onevm +142 -154
  23. data/bin/onevmgroup +1 -1
  24. data/bin/onevnet +16 -4
  25. data/bin/onevntemplate +1 -1
  26. data/bin/onevrouter +1 -1
  27. data/bin/onezone +1 -1
  28. data/lib/cli_helper.rb +20 -20
  29. data/lib/command_parser.rb +1 -1
  30. data/lib/one_helper/oneacct_helper.rb +1 -1
  31. data/lib/one_helper/oneacl_helper.rb +1 -1
  32. data/lib/one_helper/onecluster_helper.rb +1 -1
  33. data/lib/one_helper/onedatastore_helper.rb +1 -1
  34. data/lib/one_helper/oneflow_helper.rb +2 -2
  35. data/lib/one_helper/oneflowtemplate_helper.rb +2 -2
  36. data/lib/one_helper/onegroup_helper.rb +1 -1
  37. data/lib/one_helper/onehook_helper.rb +1 -1
  38. data/lib/one_helper/onehost_helper.rb +15 -58
  39. data/lib/one_helper/oneimage_helper.rb +73 -12
  40. data/lib/one_helper/onemarket_helper.rb +1 -1
  41. data/lib/one_helper/onemarketapp_helper.rb +3 -3
  42. data/lib/one_helper/onequota_helper.rb +1 -1
  43. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  44. data/lib/one_helper/onetemplate_helper.rb +1 -2
  45. data/lib/one_helper/oneuser_helper.rb +1 -1
  46. data/lib/one_helper/onevcenter_helper.rb +7 -7
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +68 -57
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +37 -3
  51. data/lib/one_helper/onevntemplate_helper.rb +1 -1
  52. data/lib/one_helper/onevrouter_helper.rb +1 -1
  53. data/lib/one_helper/onezone_helper.rb +1 -1
  54. data/lib/one_helper.rb +3 -4
  55. data/share/schemas/xsd/acct.xsd +28 -0
  56. data/share/schemas/xsd/hook_message_state.xsd +5 -1
  57. data/share/schemas/xsd/host.xsd +3 -23
  58. data/share/schemas/xsd/image.xsd +18 -0
  59. data/share/schemas/xsd/opennebula_configuration.xsd +2 -0
  60. data/share/schemas/xsd/vm.xsd +30 -0
  61. data/share/schemas/xsd/vnet.xsd +28 -0
  62. data/share/schemas/xsd/vnet_pool.xsd +28 -0
  63. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30b1eeb0d6f269692aef6b3afd5e2ae31996d07ce53bc8a8c0ae5a7dec79e35a
4
- data.tar.gz: 253e6141092946c85fc93beb7d07ef85017e3ae0945476328fe252c29749a263
3
+ metadata.gz: fcdc66bd05f8d1764a49ddc05846af9544aec14538d28361836286a637db4762
4
+ data.tar.gz: c29bd48679f35bd2ad33535cb6c89c6d960eb79b9e16c19d4294c0f1646a8b77
5
5
  SHA512:
6
- metadata.gz: c60d3275025ab5c39ce3e900cba7742e2e96490d27d3d30fd5d1f75d7f76160f424f65c58bc765e15ff8ca07512dbe8db968647c997b1f50965e93b539ce91b9
7
- data.tar.gz: be9cbc8db9dc7c86e485e3bf690544710f082eec532f592921c5db1de17c396834227b0ab84eda0e515790441108fb1ae8522a35aff03354013c09954e97872e
6
+ metadata.gz: c9dffa57c55ca6b21db509f772754baea08f83e8313d58c76b2655a1cce55e824ef24245b971a04fa77c304ce649e5da7b9cc80e241b5d3e01a2ba22db2e6698
7
+ data.tar.gz: 3e77e5c5e2b9622c54c60e7bda07767092ab72d33a7563fb164d6da99f7befd398f19ce28b0c92281bda54a795cad5fb34222842e43c37b2d6f4f298518a8e42
data/bin/oneacct CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneacl CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onecluster CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onedatastore CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneflow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -79,7 +79,7 @@ CommandParser::CmdParser.new(ARGV) do
79
79
  DELETE = {
80
80
  :name => 'delete',
81
81
  :large => '--delete',
82
- :description => 'Force flow recover delete'
82
+ :description => 'Force flow necover delete'
83
83
  }
84
84
 
85
85
  APPEND = {
@@ -162,7 +162,6 @@ CommandParser::CmdParser.new(ARGV) do
162
162
 
163
163
  delete_desc = <<-EOT.unindent
164
164
  Delete a given service
165
- To force service removal please use 'oneflow recover --delete <service_id>' command
166
165
  EOT
167
166
 
168
167
  command :delete, delete_desc, [:range, :service_id_list] do
data/bin/oneflow-template CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -78,7 +78,7 @@ CommandParser::CmdParser.new(ARGV) do
78
78
 
79
79
  RECURSIVE = {
80
80
  :name => 'recursive',
81
- :short => '-R',
81
+ :short => '-r',
82
82
  :large => '--recursive',
83
83
  :description => 'Clone the template recursively (templates and images)'
84
84
  }
data/bin/onegroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onehook CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onehost CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneimage CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -94,6 +94,18 @@ CommandParser::CmdParser.new(ARGV) do
94
94
  :description => 'Do not add context when building from Dockerfile'
95
95
  }
96
96
 
97
+ NO_IP = {
98
+ :name => 'no_ip',
99
+ :large => '--no_ip',
100
+ :description => 'Do not keep NIC addresses (MAC, IP and IP6)'
101
+ }
102
+
103
+ NO_NIC = {
104
+ :name => 'no_nic',
105
+ :large => '--no_nic',
106
+ :description => 'Do not keep network mappings'
107
+ }
108
+
97
109
  ########################################################################
98
110
  # Global Options
99
111
  ########################################################################
@@ -251,9 +263,11 @@ CommandParser::CmdParser.new(ARGV) do
251
263
  Deletes the given Image
252
264
  EOT
253
265
 
254
- command :delete, delete_desc, [:range, :imageid_list] do
266
+ command :delete, delete_desc, [:range, :imageid_list],
267
+ :options => [OpenNebulaHelper::FORCE] do
268
+ force = (options[:force] == true)
255
269
  helper.perform_actions(args[0], options, 'deleting') do |image|
256
- image.delete
270
+ image.delete(force)
257
271
  end
258
272
  end
259
273
 
@@ -410,6 +424,41 @@ CommandParser::CmdParser.new(ARGV) do
410
424
  end
411
425
  end
412
426
 
427
+ restore_desc = <<-EOT.unindent
428
+ Restore a backup image. It will restore the associated VM template to the VM template pool and
429
+ the disk images to the selected image datastore.
430
+ EOT
431
+
432
+ command :restore,
433
+ restore_desc,
434
+ :imageid,
435
+ :options => [OneDatastoreHelper::DATASTORE, NO_NIC, NO_IP] do
436
+ helper.perform_action(args[0], options, 'vm backup restored') do |o|
437
+ if options[:datastore].nil?
438
+ STDERR.puts 'Datastore to restore the backup is mandatory: '
439
+ STDERR.puts "\t -d datastore_id | name"
440
+ exit(-1)
441
+ end
442
+
443
+ restore_opts = ''
444
+
445
+ restore_opts << "NO_NIC=\"YES\"\n" if options[:no_nic]
446
+ restore_opts << "NO_IP=\"YES\"\n" if options[:no_ip]
447
+
448
+ rc = o.restore(options[:datastore].to_i, restore_opts)
449
+
450
+ if !OpenNebula.is_error?(rc)
451
+ ids = rc.split(' ')
452
+
453
+ puts "VM Template: #{ids[0]}" if ids[0]
454
+ puts "Images: #{ids[1..-1].join(' ')}" if ids.length > 1
455
+ else
456
+ puts rc.message
457
+ exit(-1)
458
+ end
459
+ end
460
+ end
461
+
413
462
  list_desc = <<-EOT.unindent
414
463
  Lists Images in the pool
415
464
  EOT
data/bin/oneirb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onelog CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onemarket CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onemarketapp CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onesecgroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneshowback CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onetemplate CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneuser CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -603,7 +603,7 @@ CommandParser::CmdParser.new(ARGV) do
603
603
 
604
604
  command :passwdsearch, passwdsearch_desc, :driver, :password,
605
605
  :options => [CLIHelper::CSV_OPT, OpenNebulaHelper::XML] do
606
- options[:list] = ['ID', 'NAME', 'AUTH', 'PASSWORD']
606
+ options[:list] = %w[ID NAME AUTH PASSWORD]
607
607
  options[:filter] = ["AUTH=#{args[0]}", "PASSWORD=#{args[1]}"]
608
608
 
609
609
  helper.list_pool(options)
@@ -708,7 +708,7 @@ CommandParser::CmdParser.new(ARGV) do
708
708
 
709
709
  tokens = helper.find_token(user, token_hint, group, false)
710
710
 
711
- if tokens.empty?
711
+ if tokens.length.zero?
712
712
  exit_with_code 1, 'No valid tokens found.'
713
713
  end
714
714
 
data/bin/onevcenter CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onevdc CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #