opennebula-cli 6.4.3 → 6.5.80.pre

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 (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 +1 -1
  7. data/bin/oneflow-template +1 -1
  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 +2 -2
  20. data/bin/onevcenter +1 -1
  21. data/bin/onevdc +1 -1
  22. data/bin/onevm +137 -147
  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 +1 -1
  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 +1 -1
  35. data/lib/one_helper/oneflowtemplate_helper.rb +1 -1
  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 +13 -56
  39. data/lib/one_helper/oneimage_helper.rb +70 -9
  40. data/lib/one_helper/onemarket_helper.rb +1 -1
  41. data/lib/one_helper/onemarketapp_helper.rb +1 -1
  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 -1
  45. data/lib/one_helper/oneuser_helper.rb +1 -1
  46. data/lib/one_helper/onevcenter_helper.rb +1 -1
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +67 -51
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +36 -2
  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 -3
  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: 52e0a5a3b38c09a00791302328c27a3f181e20e0a1f4b0508130eb2a12359ae1
4
- data.tar.gz: 283952947e0a79cdae77f1b31194a00cd84d8e503dc70da22c702d64a1d95495
3
+ metadata.gz: fcdc66bd05f8d1764a49ddc05846af9544aec14538d28361836286a637db4762
4
+ data.tar.gz: c29bd48679f35bd2ad33535cb6c89c6d960eb79b9e16c19d4294c0f1646a8b77
5
5
  SHA512:
6
- metadata.gz: 36ad8f15106d0da7d365684f85e9ccc88a36298dbd27901ba347aac6eb810abbd24c661bc96e30d40ab5427bef0fd8782e9b52b4a835c15fce8e85941496a806
7
- data.tar.gz: 1d7570eb132a9d0547c6b4fda85db2975fe87969af9b8a84a11410b740f86c1db741d2c5bdb884e14ccc6d784f22480f266186391d5e804ca8b23feab8d427b0
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 #
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 #
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 #
@@ -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 #