opennebula-cli 6.10.4 → 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.
- checksums.yaml +4 -4
- data/bin/oneacct +2 -18
- data/bin/oneacl +2 -18
- data/bin/onebackupjob +2 -18
- data/bin/onecluster +36 -18
- data/bin/onedatastore +2 -18
- data/bin/oneflow +2 -18
- data/bin/oneflow-template +8 -24
- data/bin/onegroup +2 -18
- data/bin/onehook +2 -18
- data/bin/onehost +4 -48
- data/bin/oneimage +2 -18
- data/bin/oneirb +2 -61
- data/bin/onelog +3 -22
- data/bin/onemarket +2 -18
- data/bin/onemarketapp +2 -30
- data/bin/onesecgroup +2 -18
- data/bin/oneshowback +2 -18
- data/bin/onetemplate +2 -19
- data/bin/oneuser +2 -18
- data/bin/onevdc +2 -18
- data/bin/onevm +3 -19
- data/bin/onevmgroup +2 -18
- data/bin/onevnet +2 -18
- data/bin/onevntemplate +2 -18
- data/bin/onevrouter +2 -18
- data/bin/onezone +2 -18
- data/lib/cli_helper.rb +1 -1
- data/lib/command_parser.rb +1 -1
- data/lib/one_helper/oneacct_helper.rb +1 -1
- data/lib/one_helper/oneacl_helper.rb +1 -1
- data/lib/one_helper/onebackupjob_helper.rb +1 -1
- data/lib/one_helper/onecluster_helper.rb +49 -1
- data/lib/one_helper/onedatastore_helper.rb +1 -1
- data/lib/one_helper/oneflow_helper.rb +1 -1
- data/lib/one_helper/oneflowtemplate_helper.rb +16 -16
- data/lib/one_helper/onegroup_helper.rb +4 -55
- data/lib/one_helper/onehook_helper.rb +1 -1
- data/lib/one_helper/onehost_helper.rb +25 -86
- data/lib/one_helper/oneimage_helper.rb +2 -19
- data/lib/one_helper/onemarket_helper.rb +1 -1
- data/lib/one_helper/onemarketapp_helper.rb +13 -3
- data/lib/one_helper/onequota_helper.rb +35 -8
- data/lib/one_helper/onesecgroup_helper.rb +1 -1
- data/lib/one_helper/onetemplate_helper.rb +1 -8
- data/lib/one_helper/oneuser_helper.rb +41 -75
- data/lib/one_helper/onevdc_helper.rb +1 -1
- data/lib/one_helper/onevm_helper.rb +96 -85
- data/lib/one_helper/onevmgroup_helper.rb +1 -1
- data/lib/one_helper/onevnet_helper.rb +1 -1
- data/lib/one_helper/onevntemplate_helper.rb +1 -1
- data/lib/one_helper/onevrouter_helper.rb +1 -1
- data/lib/one_helper/onezone_helper.rb +10 -23
- data/lib/one_helper.rb +6 -125
- data/share/schemas/xsd/acct.xsd +2 -0
- data/share/schemas/xsd/cluster.xsd +21 -0
- data/share/schemas/xsd/datastore.xsd +1 -13
- data/share/schemas/xsd/group.xsd +11 -122
- data/share/schemas/xsd/group_pool.xsd +8 -120
- data/share/schemas/xsd/host.xsd +19 -21
- data/share/schemas/xsd/image.xsd +0 -1
- data/share/schemas/xsd/monitoring_data.xsd +0 -8
- data/share/schemas/xsd/opennebula_configuration.xsd +23 -1
- data/share/schemas/xsd/plan.xsd +29 -0
- data/share/schemas/xsd/requirements.xsd +45 -0
- data/share/schemas/xsd/scheduler_driver_action.xsd +24 -0
- data/share/schemas/xsd/shared.xsd +67 -0
- data/share/schemas/xsd/user.xsd +10 -122
- data/share/schemas/xsd/user_pool.xsd +8 -120
- data/share/schemas/xsd/vm.xsd +37 -28
- data/share/schemas/xsd/vm_pool.xsd +0 -12
- data/share/schemas/xsd/vm_pool_extended.xsd +12 -0
- data/share/schemas/xsd/vmtemplate.xsd +0 -3
- data/share/schemas/xsd/vnet.xsd +0 -5
- data/share/schemas/xsd/vnet_pool_extended.xsd +12 -0
- metadata +11 -9
- data/bin/onevcenter +0 -471
- data/lib/one_helper/onevcenter_helper.rb +0 -523
data/bin/onemarketapp
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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
|
@@ -314,18 +298,6 @@ CommandParser::CmdParser.new(ARGV) do
|
|
314
298
|
end
|
315
299
|
end
|
316
300
|
|
317
|
-
download_desc = <<-EOT.unindent
|
318
|
-
Downloads a MarketApp to a file
|
319
|
-
EOT
|
320
|
-
|
321
|
-
command :download, download_desc, :appid, :path,
|
322
|
-
:options => [OpenNebulaHelper::FORCE] do
|
323
|
-
helper.perform_action(args[0], options, 'downloading') do
|
324
|
-
download_args = [:marketplaceapp, args[0], args[1], options[:force]]
|
325
|
-
OpenNebulaHelper.download_resource_sunstone(*download_args)
|
326
|
-
end
|
327
|
-
end
|
328
|
-
|
329
301
|
delete_desc = <<-EOT.unindent
|
330
302
|
Deletes the given marketplace app
|
331
303
|
EOT
|
data/bin/onesecgroup
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/oneshowback
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onetemplate
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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
|
@@ -108,7 +92,6 @@ CommandParser::CmdParser.new(ARGV) do
|
|
108
92
|
instantiate_options = [
|
109
93
|
OneTemplateHelper::VM_NAME,
|
110
94
|
OneTemplateHelper::MULTIPLE,
|
111
|
-
OneTemplateHelper::USERDATA,
|
112
95
|
OneVMHelper::HOLD,
|
113
96
|
OneTemplateHelper::PERSISTENT,
|
114
97
|
PREFIX
|
data/bin/oneuser
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onevdc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onevm
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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
|
@@ -1452,7 +1436,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
1452
1436
|
RAW = ["DATA", "DATA_VMX", "TYPE", "VALIDATE"]
|
1453
1437
|
CPU_MODEL = ["MODEL", "FEATURES"]
|
1454
1438
|
BACKUP_CONFIG = ["FS_FREEZE", "KEEP_LAST", "BACKUP_VOLATILE", "MODE", "INCREMENT_MODE"]
|
1455
|
-
CONTEXT (any value, ETH
|
1439
|
+
CONTEXT (any value, except ETH*, **variable substitution will be made**)
|
1456
1440
|
EOT
|
1457
1441
|
|
1458
1442
|
command :updateconf, updateconf_desc, :vmid, [:file, nil],
|
data/bin/onevmgroup
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onevnet
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onevntemplate
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onevrouter
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/onezone
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
4
|
-
# Copyright 2002-
|
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
|
-
|
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/lib/cli_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
data/lib/command_parser.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -157,6 +157,54 @@ class OneClusterHelper < OpenNebulaHelper::OneHelper
|
|
157
157
|
cluster.datastore_ids.each do |id|
|
158
158
|
puts format('%-15s', id)
|
159
159
|
end
|
160
|
+
|
161
|
+
plan_state = cluster.plan_state
|
162
|
+
return if plan_state == -1
|
163
|
+
|
164
|
+
puts
|
165
|
+
CLIHelper.print_header(format('PLAN: %s', Cluster::PLAN_STATE[plan_state]), false)
|
166
|
+
|
167
|
+
table = CLIHelper::ShowTable.new(nil, self) do
|
168
|
+
column :VM, 'VM ID', :size => 6 do |d|
|
169
|
+
d['VM_ID']
|
170
|
+
end
|
171
|
+
|
172
|
+
column :ACTION, 'Action', :left, :size => 10 do |d|
|
173
|
+
d['OPERATION']
|
174
|
+
end
|
175
|
+
|
176
|
+
column :HOST, 'Host ID', :right, :size => 6 do |d|
|
177
|
+
if d['HOST_ID'] != '-1'
|
178
|
+
d['HOST_ID']
|
179
|
+
else
|
180
|
+
'-'
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
column :DS, 'Datastore ID', :right, :size => 6 do |d|
|
185
|
+
if d['DS_ID'] != '-1'
|
186
|
+
d['DS_ID']
|
187
|
+
else
|
188
|
+
'-'
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
column :STATE, 'Action state', :size => 8 do |d|
|
193
|
+
Cluster::PLAN_STATE[d['STATE'].to_i]
|
194
|
+
end
|
195
|
+
|
196
|
+
column :START_TIME, 'Action start time', :right, :size => 16 do |d|
|
197
|
+
if d['TIMESTAMP'] != '0'
|
198
|
+
OpenNebulaHelper.time_to_str(d['TIMESTAMP'])
|
199
|
+
else
|
200
|
+
'-'
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
default :VM, :ACTION, :HOST, :DS, :STATE, :START_TIME
|
205
|
+
end
|
206
|
+
|
207
|
+
table.show(cluster.plan_actions)
|
160
208
|
end
|
161
209
|
|
162
210
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2025, 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 #
|
@@ -180,35 +180,35 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
|
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
183
|
-
# Get
|
183
|
+
# Get user inputs values from user
|
184
184
|
#
|
185
|
-
# @param
|
185
|
+
# @param user_inputs [Hash] User inputs from template
|
186
186
|
#
|
187
|
-
# @return [Hash]
|
188
|
-
def
|
187
|
+
# @return [Hash] User Input values
|
188
|
+
def user_inputs(user_inputs)
|
189
189
|
# rubocop:disable Layout/LineLength
|
190
|
-
return if
|
190
|
+
return if user_inputs.nil? || user_inputs.empty?
|
191
191
|
|
192
192
|
ret = {}
|
193
|
-
ret['
|
193
|
+
ret['user_inputs_values'] = OpenNebulaHelper.parse_user_inputs(user_inputs)
|
194
194
|
|
195
195
|
# rubocop:enable Layout/LineLength
|
196
196
|
ret
|
197
197
|
end
|
198
198
|
|
199
|
-
# Get
|
199
|
+
# Get user input values from user
|
200
200
|
#
|
201
|
-
# @param role [Hash] Service role with
|
201
|
+
# @param role [Hash] Service role with user inputs
|
202
202
|
#
|
203
|
-
# @return [Hash] Role with
|
204
|
-
def
|
203
|
+
# @return [Hash] Role with user inputs values
|
204
|
+
def role_user_inputs(roles)
|
205
205
|
return if roles.nil? || roles.empty?
|
206
206
|
|
207
207
|
ret = {}
|
208
|
-
|
208
|
+
role_with_user_inputs = false
|
209
209
|
|
210
210
|
roles.each do |role|
|
211
|
-
next unless role.key?('
|
211
|
+
next unless role.key?('user_inputs')
|
212
212
|
|
213
213
|
####################################################################
|
214
214
|
# Display Role Information
|
@@ -216,11 +216,11 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
|
|
216
216
|
header = "> Please insert the user inputs for the role \"#{role['name']}\""
|
217
217
|
puts header
|
218
218
|
|
219
|
-
role.merge!(
|
220
|
-
|
219
|
+
role.merge!(user_inputs(role['user_inputs']))
|
220
|
+
role_with_user_inputs = true
|
221
221
|
end
|
222
222
|
|
223
|
-
ret['roles'] = roles if
|
223
|
+
ret['roles'] = roles if role_with_user_inputs
|
224
224
|
|
225
225
|
ret
|
226
226
|
end
|