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.
- checksums.yaml +4 -4
- data/bin/oneacct +5 -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 +21 -19
- data/bin/onevmgroup +2 -18
- data/bin/onevnet +2 -18
- data/bin/onevntemplate +2 -18
- data/bin/onevrouter +13 -20
- 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 +10 -2
- 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 +17 -17
- 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 +29 -87
- 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 +119 -102
- 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 +34 -156
- 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/onemarket
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/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
|
@@ -1140,6 +1124,24 @@ CommandParser::CmdParser.new(ARGV) do
|
|
1140
1124
|
end
|
1141
1125
|
end
|
1142
1126
|
|
1127
|
+
snapshot_list_desc = <<-EOT.unindent
|
1128
|
+
Lists the snapshots of a VM
|
1129
|
+
EOT
|
1130
|
+
|
1131
|
+
command :"snapshot-list", snapshot_list_desc, :vmid do
|
1132
|
+
vm = helper.retrieve_resource(args[0])
|
1133
|
+
vm.info
|
1134
|
+
|
1135
|
+
if vm.has_elements?('/VM/TEMPLATE/SNAPSHOT')
|
1136
|
+
CLIHelper.print_header('SNAPSHOTS'.ljust(80), false)
|
1137
|
+
|
1138
|
+
helper.format_template_snapshots(vm)
|
1139
|
+
else
|
1140
|
+
puts 'No snapshots available'
|
1141
|
+
end
|
1142
|
+
0
|
1143
|
+
end
|
1144
|
+
|
1143
1145
|
disk_snapshot_create_desc = <<-EOT.unindent
|
1144
1146
|
Takes a new snapshot of the given disk. This operation needs support
|
1145
1147
|
from the Datastore drivers: QCOW2 or Ceph.
|
@@ -1432,7 +1434,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
1432
1434
|
GRAPHICS = ["TYPE", "LISTEN", "PASSWD", "KEYMAP", "COMMAND"]
|
1433
1435
|
VIDEO = ["TYPE", "IOMMU", "ATS", "VRAM", "RESOLUTION"]
|
1434
1436
|
RAW = ["DATA", "DATA_VMX", "TYPE", "VALIDATE"]
|
1435
|
-
CPU_MODEL = ["MODEL"]
|
1437
|
+
CPU_MODEL = ["MODEL", "FEATURES"]
|
1436
1438
|
BACKUP_CONFIG = ["FS_FREEZE", "KEEP_LAST", "BACKUP_VOLATILE", "MODE", "INCREMENT_MODE"]
|
1437
1439
|
CONTEXT (any value, except ETH*, **variable substitution will be made**)
|
1438
1440
|
EOT
|
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
|
@@ -188,7 +172,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
188
172
|
end
|
189
173
|
|
190
174
|
number = options[:multiple] || 1
|
191
|
-
user_inputs =
|
175
|
+
user_inputs = options[:user_inputs]
|
192
176
|
|
193
177
|
helper.perform_action(args[0], options, 'instantiated') do |vr|
|
194
178
|
name = options[:name] || ''
|
@@ -220,7 +204,16 @@ CommandParser::CmdParser.new(ARGV) do
|
|
220
204
|
extra_template = res.last
|
221
205
|
end
|
222
206
|
|
223
|
-
user_inputs
|
207
|
+
if !user_inputs
|
208
|
+
user_inputs = OneTemplateHelper.get_user_inputs(t.to_hash)
|
209
|
+
else
|
210
|
+
optionals = OneTemplateHelper.get_user_inputs(
|
211
|
+
t.to_hash,
|
212
|
+
options[:user_inputs_keys]
|
213
|
+
)
|
214
|
+
|
215
|
+
user_inputs = user_inputs + "\n" + optionals
|
216
|
+
end
|
224
217
|
|
225
218
|
extra_template << "\n" << user_inputs
|
226
219
|
|
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 #
|
@@ -18,6 +18,14 @@ require 'one_helper'
|
|
18
18
|
require 'optparse/time'
|
19
19
|
|
20
20
|
class AcctHelper < OpenNebulaHelper::OneHelper
|
21
|
+
TIME_ZONE_CUR = {
|
22
|
+
:name => "timezone",
|
23
|
+
:short => "-t TZ",
|
24
|
+
:large => "--timezone TZ",
|
25
|
+
:description => "User defined Time Zone",
|
26
|
+
:format => String
|
27
|
+
}
|
28
|
+
|
21
29
|
START_TIME_ACCT = {
|
22
30
|
:name => "start_time",
|
23
31
|
:short => "-s TIME",
|
@@ -97,7 +105,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
|
|
97
105
|
:description => "Split the output in a table for each VM"
|
98
106
|
}
|
99
107
|
|
100
|
-
ACCT_OPTIONS = [START_TIME_ACCT, END_TIME_ACCT, USERFILTER, GROUP, HOST, XPATH, SPLIT]
|
108
|
+
ACCT_OPTIONS = [TIME_ZONE_CUR, START_TIME_ACCT, END_TIME_ACCT, USERFILTER, GROUP, HOST, XPATH, SPLIT]
|
101
109
|
SHOWBACK_OPTIONS = [START_TIME_SHOWBACK, END_TIME_SHOWBACK, USERFILTER, GROUP, OpenNebulaHelper::FORMAT]
|
102
110
|
|
103
111
|
ACCT_OPTIONS << OpenNebulaHelper::XML
|
@@ -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 #
|