opennebula-cli 6.10.3 → 6.10.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 457eac25c832b616aef506710eef840fe9bc1534749f1d2c2b3e1a1d925cb610
4
- data.tar.gz: 48c7ef4904fa2fb666fde0a1d9f66a4cade853dec50d6496f755f946922ca7b8
3
+ metadata.gz: e29fe2d25b3160824a1cbc4e1c7aa44aa7b7c11a183802d737476f1d88802aee
4
+ data.tar.gz: 8526db3930396080c1d767779e3ad1989ec4ce59aadd7727225c7d27a7f3b9c9
5
5
  SHA512:
6
- metadata.gz: 7d072276b229f3f4526d64b3ae52ddd6dc9608f09ab708aff2f8489e46078f225c7cbcc994cac6d59b7bdfc569fa43504bc7bf824d5b74ea3af7e421286523b2
7
- data.tar.gz: 205e8f6682eecfa14d3a45857e00b9d27ee18486d3956a566f4f151f4855ed658f17e76bba5ae86444664fb6bbe3ba97815a024755e338e62d7accf08ee97c42
6
+ metadata.gz: 9b53ef6e7876c0aa9a7e9bb096fe0e549d66e7e358fb0cca5dc3d3fb6c5db04738970f9ab060317a49528e86adfc2c71830f306c4d875aff9a0e095900348a14
7
+ data.tar.gz: 74d21afe1e03d6e5ecc096e70eec65d840e2bf986ac4176b0c03202e1a14182336dcaf1a85c9addc4c7f3812268df0718903ac12ddf784c743c850d561f96e8d
data/bin/oneacct CHANGED
@@ -97,6 +97,9 @@ CommandParser::CmdParser.new(ARGV) do
97
97
  end_time = t.to_i
98
98
  end
99
99
 
100
+ # User defined timezone
101
+ ENV['TZ'] = options[:timezone] if options[:timezone]
102
+
100
103
  common_opts = {
101
104
  :start_time => start_time,
102
105
  :end_time => end_time,
data/bin/oneuser CHANGED
@@ -770,7 +770,7 @@ CommandParser::CmdParser.new(ARGV) do
770
770
  1,
771
771
  "More than one token starting with '#{token_hint}' found."
772
772
  )
773
- elsif token.count.zero?
773
+ elsif token.none?
774
774
  exit_with_code 1, 'No tokens found.'
775
775
  end
776
776
 
data/bin/onevm CHANGED
@@ -1452,7 +1452,7 @@ CommandParser::CmdParser.new(ARGV) do
1452
1452
  RAW = ["DATA", "DATA_VMX", "TYPE", "VALIDATE"]
1453
1453
  CPU_MODEL = ["MODEL", "FEATURES"]
1454
1454
  BACKUP_CONFIG = ["FS_FREEZE", "KEEP_LAST", "BACKUP_VOLATILE", "MODE", "INCREMENT_MODE"]
1455
- CONTEXT (any value, except ETH*, **variable substitution will be made**)
1455
+ CONTEXT (any value, ETH* if CONTEXT_ALLOW_ETH_UPDATES set in oned.conf, **variable substitution will be made**)
1456
1456
  EOT
1457
1457
 
1458
1458
  command :updateconf, updateconf_desc, :vmid, [:file, nil],
data/bin/onevrouter CHANGED
@@ -188,7 +188,7 @@ CommandParser::CmdParser.new(ARGV) do
188
188
  end
189
189
 
190
190
  number = options[:multiple] || 1
191
- user_inputs = nil
191
+ user_inputs = options[:user_inputs]
192
192
 
193
193
  helper.perform_action(args[0], options, 'instantiated') do |vr|
194
194
  name = options[:name] || ''
@@ -220,7 +220,16 @@ CommandParser::CmdParser.new(ARGV) do
220
220
  extra_template = res.last
221
221
  end
222
222
 
223
- user_inputs ||= OneTemplateHelper.get_user_inputs(t.to_hash)
223
+ if !user_inputs
224
+ user_inputs = OneTemplateHelper.get_user_inputs(t.to_hash)
225
+ else
226
+ optionals = OneTemplateHelper.get_user_inputs(
227
+ t.to_hash,
228
+ options[:user_inputs_keys]
229
+ )
230
+
231
+ user_inputs = user_inputs + "\n" + optionals
232
+ end
224
233
 
225
234
  extra_template << "\n" << user_inputs
226
235
 
@@ -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
@@ -260,7 +260,7 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
260
260
  type, resource_id, extra = initial.split(':', -1)
261
261
  end
262
262
 
263
- if (!type || !resource_id) && (initial && !initial.empty?)
263
+ if (!type || !resource_id) && initial && !initial.empty?
264
264
  STDERR.puts 'Wrong type for user input default value:'
265
265
  STDERR.puts " #{key}: #{val}"
266
266
  exit(-1)
@@ -936,11 +936,11 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
936
936
  # array. Duplicate IPs are not shown.
937
937
  extra_ips = []
938
938
 
939
- if (val = vm['/VM/MONITORING/GUEST_IP']) && (val && !val.empty?)
939
+ if (val = vm['/VM/MONITORING/GUEST_IP']) && val && !val.empty?
940
940
  extra_ips << val
941
941
  end
942
942
 
943
- if (val = vm['/VM/MONITORING/GUEST_IP_ADDRESSES']) && (val && !val.empty?)
943
+ if (val = vm['/VM/MONITORING/GUEST_IP_ADDRESSES']) && val && !val.empty?
944
944
  extra_ips += val.split(',')
945
945
  end
946
946
 
data/lib/one_helper.rb CHANGED
@@ -421,22 +421,17 @@ Bash symbols must be escaped on STDIN passing'
421
421
  {
422
422
  :name => 'user_inputs',
423
423
  :large => '--user-inputs ui1,ui2,ui3',
424
- :format => Array,
424
+ :format => String,
425
425
  :description => 'Specify the user inputs values when instantiating',
426
- :proc => lambda do |o, options|
427
- # Store user inputs that has been already processed
428
- options[:user_inputs_keys] = []
429
-
430
- # escape values
431
- options[:user_inputs].map! do |user_input|
432
- user_input_split = user_input.split('=')
426
+ :proc => lambda do |_o, options|
427
+ keys = options[:user_inputs].scan(/(?:^|,)([^,=]+)=/).flatten
428
+ values = options[:user_inputs].scan(/=(.+?)(?=,[^,]+=|$)/).flatten
433
429
 
434
- options[:user_inputs_keys] << user_input_split[0]
435
-
436
- "#{user_input_split[0]}=\"#{user_input_split[1]}\""
437
- end
430
+ options[:user_inputs_keys] = keys
438
431
 
439
- options[:user_inputs] = o.join("\n")
432
+ options[:user_inputs] = keys.zip(values).map do |k, v|
433
+ %[#{k}="#{v}"]
434
+ end.join("\n")
440
435
  end
441
436
  },
442
437
  {
@@ -1415,6 +1410,7 @@ Bash symbols must be escaped on STDIN passing'
1415
1410
  #
1416
1411
  # @return [Hash] XSD in hash format, nil if not found
1417
1412
  def read_xsd(ename)
1413
+ require 'logger'
1418
1414
  require 'active_support'
1419
1415
  require 'active_support/core_ext/hash/conversions'
1420
1416
 
@@ -29,6 +29,7 @@
29
29
  </xs:element>
30
30
 
31
31
  <xs:element name="CLUSTER_ENCRYPTED_ATTR" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
32
+ <xs:element name="CONTEXT_ALLOW_ETH_UPDATES" type="xs:string" minOccurs="0" maxOccurs="1"/>
32
33
  <xs:element name="CONTEXT_RESTRICTED_DIRS" type="xs:string" minOccurs="0" maxOccurs="1"/>
33
34
  <xs:element name="CONTEXT_SAFE_DIRS" type="xs:string" minOccurs="0" maxOccurs="1"/>
34
35
  <xs:element name="DATASTORE_CAPACITY_CHECK" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.10.3
4
+ version: 6.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-18 00:00:00.000000000 Z
11
+ date: 2025-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opennebula
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.10.3
19
+ version: 6.10.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 6.10.3
26
+ version: 6.10.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement