opennebula-cli 6.10.2 → 6.99.85.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +5 -18
  3. data/bin/oneacl +2 -18
  4. data/bin/onebackupjob +2 -18
  5. data/bin/onecluster +36 -18
  6. data/bin/onedatastore +2 -18
  7. data/bin/oneflow +2 -18
  8. data/bin/oneflow-template +8 -24
  9. data/bin/onegroup +2 -18
  10. data/bin/onehook +2 -18
  11. data/bin/onehost +4 -48
  12. data/bin/oneimage +2 -18
  13. data/bin/oneirb +2 -61
  14. data/bin/onelog +3 -22
  15. data/bin/onemarket +2 -18
  16. data/bin/onemarketapp +2 -30
  17. data/bin/onesecgroup +2 -18
  18. data/bin/oneshowback +2 -18
  19. data/bin/onetemplate +2 -19
  20. data/bin/oneuser +2 -18
  21. data/bin/onevdc +2 -18
  22. data/bin/onevm +21 -19
  23. data/bin/onevmgroup +2 -18
  24. data/bin/onevnet +2 -18
  25. data/bin/onevntemplate +2 -18
  26. data/bin/onevrouter +13 -20
  27. data/bin/onezone +2 -18
  28. data/lib/cli_helper.rb +1 -1
  29. data/lib/command_parser.rb +1 -1
  30. data/lib/one_helper/oneacct_helper.rb +10 -2
  31. data/lib/one_helper/oneacl_helper.rb +1 -1
  32. data/lib/one_helper/onebackupjob_helper.rb +1 -1
  33. data/lib/one_helper/onecluster_helper.rb +49 -1
  34. data/lib/one_helper/onedatastore_helper.rb +1 -1
  35. data/lib/one_helper/oneflow_helper.rb +1 -1
  36. data/lib/one_helper/oneflowtemplate_helper.rb +17 -17
  37. data/lib/one_helper/onegroup_helper.rb +4 -55
  38. data/lib/one_helper/onehook_helper.rb +1 -1
  39. data/lib/one_helper/onehost_helper.rb +29 -87
  40. data/lib/one_helper/oneimage_helper.rb +2 -19
  41. data/lib/one_helper/onemarket_helper.rb +1 -1
  42. data/lib/one_helper/onemarketapp_helper.rb +13 -3
  43. data/lib/one_helper/onequota_helper.rb +35 -8
  44. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  45. data/lib/one_helper/onetemplate_helper.rb +1 -8
  46. data/lib/one_helper/oneuser_helper.rb +41 -75
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +119 -102
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +1 -1
  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 +10 -23
  54. data/lib/one_helper.rb +34 -156
  55. data/share/schemas/xsd/acct.xsd +2 -0
  56. data/share/schemas/xsd/cluster.xsd +21 -0
  57. data/share/schemas/xsd/datastore.xsd +1 -13
  58. data/share/schemas/xsd/group.xsd +11 -122
  59. data/share/schemas/xsd/group_pool.xsd +8 -120
  60. data/share/schemas/xsd/host.xsd +19 -21
  61. data/share/schemas/xsd/image.xsd +0 -1
  62. data/share/schemas/xsd/monitoring_data.xsd +0 -8
  63. data/share/schemas/xsd/opennebula_configuration.xsd +23 -1
  64. data/share/schemas/xsd/plan.xsd +29 -0
  65. data/share/schemas/xsd/requirements.xsd +45 -0
  66. data/share/schemas/xsd/scheduler_driver_action.xsd +24 -0
  67. data/share/schemas/xsd/shared.xsd +67 -0
  68. data/share/schemas/xsd/user.xsd +10 -122
  69. data/share/schemas/xsd/user_pool.xsd +8 -120
  70. data/share/schemas/xsd/vm.xsd +37 -28
  71. data/share/schemas/xsd/vm_pool.xsd +0 -12
  72. data/share/schemas/xsd/vm_pool_extended.xsd +12 -0
  73. data/share/schemas/xsd/vmtemplate.xsd +0 -3
  74. data/share/schemas/xsd/vnet.xsd +0 -5
  75. data/share/schemas/xsd/vnet_pool_extended.xsd +12 -0
  76. metadata +11 -9
  77. data/bin/onevcenter +0 -471
  78. data/lib/one_helper/onevcenter_helper.rb +0 -523
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de5f626cbb390d51c51c96f9c866e67aefb21beb83bbf7116b56097cfeb52211
4
- data.tar.gz: d9101be349af4f0b9b8dff85446867ac5b8f637275a5d37fa9488e33916b8b4c
3
+ metadata.gz: 15100d70757d563fc5580642315ad5d19f154cfe258f20f7a9ee0075f8d74049
4
+ data.tar.gz: 83fe3200d450d46880b9a09ba3a84ac7fbf0b0d9a4bfdc0894955764e8bac4d2
5
5
  SHA512:
6
- metadata.gz: dddc332c72fa230035158cb48bdcb07244a896ae25d00b382cc08b6384c76488cbaa1ddaec70d5f154a7519470b5a30cf40001226715ce89170a9da50b447574
7
- data.tar.gz: b298cbe408ad5520c36b35857d34106ac54b01b9f9a469ed8ccc4c344e08af0bb006f3296904cdb198db1bb1a3ff542572aea995a85f66e523c7a3168b6f70d9
6
+ metadata.gz: ce5be5cb943bc6ce8281c3bafe741a23c134450d1d585b0ca7ee2c8208f4fd22f7e6ed79172368dbe4eba4497fc9ef14803735ee647cc71c827921bade7e39ee
7
+ data.tar.gz: 49d4c3dfcd96ae52d93f0c26ce5b68ca8228ad335797a609d20dab76d3397de8c394a2af4053182e10a2fd0a59c6433d8b8f9fd032d7fd9db250cd9aebaf4e97
data/bin/oneacct CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -97,6 +81,9 @@ CommandParser::CmdParser.new(ARGV) do
97
81
  end_time = t.to_i
98
82
  end
99
83
 
84
+ # User defined timezone
85
+ ENV['TZ'] = options[:timezone] if options[:timezone]
86
+
100
87
  common_opts = {
101
88
  :start_time => start_time,
102
89
  :end_time => end_time,
data/bin/oneacl CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/onebackupjob CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/onecluster CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -233,4 +217,38 @@ CommandParser::CmdParser.new(ARGV) do
233
217
  o.rename(args[1])
234
218
  end
235
219
  end
220
+
221
+ optimize_desc = <<-EOT.unindent
222
+ Create optimization plan for Cluster
223
+ EOT
224
+
225
+ # TODO: Consider optional parameters
226
+ # - autostart: Automatically start applying the new optimization plan
227
+ # - force: Delete old plan if exists
228
+ command :optimize, optimize_desc, :clusterid do
229
+ helper.perform_action(args[0], options, 'creating optimization plan') do |o|
230
+ o.optimize
231
+ end
232
+ end
233
+
234
+ planexecute_desc = <<-EOT.unindent
235
+ Start applying the optimization plan
236
+ EOT
237
+
238
+ command :planexecute, planexecute_desc, :clusterid do
239
+ helper.perform_action(args[0], options, 'cluster optimization started') do |o|
240
+ o.plan_execute
241
+ end
242
+ end
243
+
244
+ plandelete_desc = <<-EOT.unindent
245
+ Delete the optimization plan
246
+ EOT
247
+
248
+ # TODO: We should allow to delete a placement plan with id -1
249
+ command :plandelete, plandelete_desc, :clusterid do
250
+ helper.perform_action(args[0], options, 'plan deleted') do |o|
251
+ o.plan_delete
252
+ end
253
+ end
236
254
  end
data/bin/onedatastore CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/oneflow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/oneflow-template CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -29,23 +29,7 @@ else
29
29
  end
30
30
 
31
31
  # %%RUBYGEMS_SETUP_BEGIN%%
32
- if File.directory?(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
48
- end
32
+ require 'load_opennebula_paths'
49
33
  # %%RUBYGEMS_SETUP_END%%
50
34
 
51
35
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -296,13 +280,13 @@ CommandParser::CmdParser.new(ARGV) do
296
280
  params['merge_template'] = {}
297
281
  body = JSON.parse(response.body)['DOCUMENT']['TEMPLATE']['BODY']
298
282
 
299
- # Check global custom attributes
300
- custom_attrs = helper.custom_attrs(body['custom_attrs'])
301
- params['merge_template'].merge!(custom_attrs) unless custom_attrs.nil?
283
+ # Check global user inputs
284
+ user_inputs = helper.user_inputs(body['user_inputs'])
285
+ params['merge_template'].merge!(user_inputs) unless user_inputs.nil?
302
286
 
303
- # Check role level custom attributes
304
- custom_role_attrs = helper.custom_role_attrs(body['roles'])
305
- params['merge_template'].merge!(custom_role_attrs) unless custom_role_attrs.nil?
287
+ # Check role level user inputs
288
+ user_inputs_attrs = helper.role_user_inputs(body['roles'])
289
+ params['merge_template'].merge!(user_inputs_attrs) unless user_inputs_attrs.nil?
306
290
 
307
291
  # Check vnets attributes
308
292
  vnets = helper.networks(body['networks'])
data/bin/onegroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/onehook CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/onehost CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -29,23 +29,7 @@ else
29
29
  end
30
30
 
31
31
  # %%RUBYGEMS_SETUP_BEGIN%%
32
- if File.directory?(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
48
- end
32
+ require 'load_opennebula_paths'
49
33
  # %%RUBYGEMS_SETUP_END%%
50
34
 
51
35
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -101,14 +85,6 @@ CommandParser::CmdParser.new(ARGV) do
101
85
  'deleted in the hosts.'
102
86
  }
103
87
 
104
- TYPE = {
105
- :name => 'type',
106
- :short => '-t remote_provider',
107
- :large => '--type remote_provider',
108
- :description => 'Use type to create a host using Cloud Bursting',
109
- :format => String
110
- }
111
-
112
88
  IPV4 = {
113
89
  :name => 'ipv4',
114
90
  :large => '--ipv4 ip1,ip2',
@@ -123,7 +99,7 @@ CommandParser::CmdParser.new(ARGV) do
123
99
  :format => Array
124
100
  }
125
101
 
126
- CREAT_OPTIONS = [IM, VMM, OneClusterHelper::CLUSTER, TYPE]
102
+ CREAT_OPTIONS = [IM, VMM, OneClusterHelper::CLUSTER]
127
103
  SYNC_OPTIONS = [OneClusterHelper::CLUSTER, FORCE, SSH]
128
104
 
129
105
  ########################################################################
@@ -203,10 +179,8 @@ CommandParser::CmdParser.new(ARGV) do
203
179
 
204
180
  cid = options[:cluster] || ClusterPool::NONE_CLUSTER_ID
205
181
  helper.create_resource(options) do |host|
206
- if !options[:type].nil?
207
- str = helper.set_hybrid(options[:type], args[1])
208
- end
209
182
  rc = host.allocate(args[0], options[:im], options[:vm], cid)
183
+
210
184
  if !OpenNebula.is_error?(rc) && !options[:type].nil?
211
185
  host.update(str, true)
212
186
  end
@@ -354,24 +328,6 @@ CommandParser::CmdParser.new(ARGV) do
354
328
  end
355
329
  end
356
330
 
357
- importvm_desc = <<-EOT.unindent
358
- Import wild VM to OpenNebula. This method is deprecated and will be \
359
- removed in a future release.
360
- EOT
361
-
362
- command :importvm,
363
- importvm_desc,
364
- :hostid,
365
- :name,
366
- :options => [IPV4, IPV6] do
367
- helper.perform_action(args[0], options, 'imported') do |o|
368
- rc = o.info
369
- next rc if OpenNebula.is_error?(rc)
370
-
371
- o.import_wild(args[1], options[:ipv4], options[:ipv6])
372
- end
373
- end
374
-
375
331
  forceupdate_desc = <<-EOT.unindent
376
332
  Forces host monitoring update
377
333
  Examples:
data/bin/oneimage CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/oneirb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -27,23 +27,7 @@ else
27
27
  end
28
28
 
29
29
  # %%RUBYGEMS_SETUP_BEGIN%%
30
- if File.directory?(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
46
- end
30
+ require 'load_opennebula_paths'
47
31
  # %%RUBYGEMS_SETUP_END%%
48
32
 
49
33
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -72,57 +56,14 @@ require 'uri'
72
56
  require 'yaml'
73
57
 
74
58
  require 'opennebula'
75
- require 'vcenter_driver'
76
59
 
77
60
  # Include OpenNebula to avoid having to use OpenNebula:: namespace
78
61
  include OpenNebula
79
62
 
80
- ################################################################################
81
- # vCenter helper functions
82
- ################################################################################
83
-
84
- # Get VIClient object from host
85
- #
86
- # @param id [Integer] Host ID
87
- def vi_client_host(id)
88
- VCenterDriver::VIClient.new_from_host(id)
89
- end
90
-
91
- # Get VM vCenter object
92
- #
93
- # @param id [Integer] VM ID
94
- def vm(id)
95
- one_vm = VCenterDriver::VIHelper.one_item(OpenNebula::VirtualMachine, id)
96
-
97
- did = one_vm['DEPLOY_ID']
98
- hid = one_vm.retrieve_xmlelements(
99
- 'HISTORY_RECORDS/HISTORY/HID'
100
- ).last.text.to_i
101
-
102
- VCenterDriver::VirtualMachine.new_one(vi_client_host(hid), did, one_vm)
103
- end
104
-
105
- # Get host vCenter object
106
- #
107
- # @param id [Integer] Host ID
108
- def host(id)
109
- vi_client = vi_client_host(id)
110
- one_h = VCenterDriver::VIHelper.one_item(OpenNebula::Host, hid)
111
-
112
- VCenterDriver::ClusterComputeResource.new_from_ref(
113
- one_h['TEMPLATE/VCENTER_CCR_REF'],
114
- vi_client
115
- )
116
- end
117
-
118
63
  ################################################################################
119
64
  # Open irb session
120
65
  ################################################################################
121
66
 
122
- puts '* You can use the function vi_client_host(id) to get vCenter client'
123
- puts '* You can use the function vm(id) to get vCenter VM'
124
- puts '* You can use the function host(id) to get vCenter host'
125
-
126
67
  @client = Client.new
127
68
  version = '>= 0'
128
69
 
data/bin/onelog CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2024, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2025, 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 #
@@ -29,23 +29,7 @@ else
29
29
  end
30
30
 
31
31
  # %%RUBYGEMS_SETUP_BEGIN%%
32
- if File.directory?(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
48
- end
32
+ require 'load_opennebula_paths'
49
33
  # %%RUBYGEMS_SETUP_END%%
50
34
 
51
35
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -58,12 +42,9 @@ DEFAULT_PAGER = 'less'
58
42
  SERVICES = {
59
43
  'fireedge' => { :log => 'fireedge.log', :error => 'fireedge.error' },
60
44
  'monitor' => { :log => 'monitor.log' },
61
- 'novnc' => { :log => 'novnc.log' },
62
45
  'oned' => { :log => 'oned.log' },
63
46
  'onehem' => { :log => 'onehem.log', :error => 'onehem.error' },
64
- 'sched' => { :log => 'sched.log' },
65
- 'sunstone' => { :log => 'sunstone.log', :error => 'sunstone.error' },
66
- 'vcenter' => { :log => 'vcenter_monitor.log' }
47
+ 'sched' => { :log => 'sched.log' }
67
48
  }
68
49
 
69
50
  require 'command_parser'