opennebula-cli 6.8.2 → 6.8.3

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: 15c54d3ad1c7f151f8f8c85761c9e7d807ebaf3b60e11c8ba722f9efa55b5e36
4
- data.tar.gz: 2162024e4c15e1fe2fcd811adb3a10d84e33943f5f6a67d930a93d2b3734b859
3
+ metadata.gz: b06fb77f587c29ae6ccfdb865f506d009c722e26a51237357785839b3334c6a6
4
+ data.tar.gz: 5b7b61495a23c275884b89dd7416d1e7308cc95711b1091a20febc008ebb45c2
5
5
  SHA512:
6
- metadata.gz: ca211f3593bc2262afaacf6ee1872c00335f7edb86ca52d532fe2abbdfd16d89ba8d4f1b26607c3e44e3bb31e0ed14f33aeefb0cd9cf62b986c0fc8429eb870c
7
- data.tar.gz: 708bf45d47a6755eb71bba7df087025ee4c2ff016a4d0cb4acff390ff7d3373b3695045e9c63ed5d880011c9520bde7ddc5fc00d20b04d0f8ab3402fb4e96c87
6
+ metadata.gz: ecd05a6bbb986b52da8d323d1083d90d7142f9ac336bef379c183348a9f039ab94cc258b6735f3fd558a6c5eb41e55b5e36079292139b0844f30e4b183f2d88c
7
+ data.tar.gz: af89f17c3100ea494ea87e5fb9228779195d410c9b9ec3b2d9752a7db4c1b0359636a5aad9769d011ce67e751cdf1cd73d85dd89b7677f0176eb8525cd1ec411
data/bin/oneimage CHANGED
@@ -121,6 +121,13 @@ CommandParser::CmdParser.new(ARGV) do
121
121
  :description => 'Name of the new image'
122
122
  }
123
123
 
124
+ DISK_ID = {
125
+ :name => 'disk_id',
126
+ :large => '--disk-id disk_id',
127
+ :format => Integer,
128
+ :description => 'Restore only selected disk ID'
129
+ }
130
+
124
131
  ########################################################################
125
132
  # Global Options
126
133
  ########################################################################
@@ -210,11 +217,7 @@ CommandParser::CmdParser.new(ARGV) do
210
217
  exit(-1)
211
218
  end
212
219
 
213
- if options[:no_check_capacity].nil?
214
- check_capacity = false
215
- else
216
- check_capacity = true
217
- end
220
+ no_check_capacity = !options[:no_check_capacity].nil?
218
221
 
219
222
  conflicting_opts = []
220
223
  if (args[0] || !(stdin = OpenNebulaHelper.read_stdin).empty?) &&
@@ -257,7 +260,7 @@ CommandParser::CmdParser.new(ARGV) do
257
260
  exit 0
258
261
  end
259
262
 
260
- image.allocate(template, options[:datastore], check_capacity)
263
+ image.allocate(template, options[:datastore], no_check_capacity)
261
264
  rescue StandardError => e
262
265
  STDERR.puts e.message
263
266
  exit(-1)
@@ -457,7 +460,7 @@ CommandParser::CmdParser.new(ARGV) do
457
460
  command :restore,
458
461
  restore_desc,
459
462
  :imageid,
460
- :options => [OneDatastoreHelper::DATASTORE, NO_NIC, NO_IP, NAME, INCREMENT] do
463
+ :options => [OneDatastoreHelper::DATASTORE, NO_NIC, NO_IP, NAME, INCREMENT, DISK_ID] do
461
464
  helper.perform_action(args[0], options, 'vm backup restored') do |o|
462
465
  if options[:datastore].nil?
463
466
  STDERR.puts 'Datastore to restore the backup is mandatory: '
@@ -471,13 +474,14 @@ CommandParser::CmdParser.new(ARGV) do
471
474
  restore_opts << "NO_IP=\"YES\"\n" if options[:no_ip]
472
475
  restore_opts << "NAME=\"#{options[:name]}\"\n" if options[:name]
473
476
  restore_opts << "INCREMENT_ID=\"#{options[:increment]}\"\n" if options[:increment]
477
+ restore_opts << "DISK_ID=\"#{options[:disk_id]}\"\n" if options[:disk_id]
474
478
 
475
479
  rc = o.restore(options[:datastore].to_i, restore_opts)
476
480
 
477
481
  if !OpenNebula.is_error?(rc)
478
482
  ids = rc.split(' ')
479
483
 
480
- puts "VM Template: #{ids[0]}" if ids[0]
484
+ puts "VM Template: #{ids[0]}" if ids[0] && ids[0] != '-1'
481
485
  puts "Images: #{ids[1..-1].join(' ')}" if ids.length > 1
482
486
  else
483
487
  puts rc.message
data/bin/onevm CHANGED
@@ -1240,6 +1240,10 @@ CommandParser::CmdParser.new(ARGV) do
1240
1240
 
1241
1241
  if options[:xml]
1242
1242
  puts pool.to_xml
1243
+ elsif options[:json]
1244
+ puts JSON.pretty_generate(pool.to_hash)
1245
+ elsif options[:yaml]
1246
+ puts pool.to_hash.to_yaml
1243
1247
  else
1244
1248
  table.show(pool.to_hash, options)
1245
1249
  end
@@ -1357,15 +1361,15 @@ CommandParser::CmdParser.new(ARGV) do
1357
1361
 
1358
1362
  The full list of configuration attributes are:
1359
1363
 
1360
- OS = ["ARCH", "MACHINE", "KERNEL", "INITRD", "BOOTLOADER", "BOOT", "UUID"]
1364
+ OS = ["ARCH", "MACHINE", "KERNEL", "INITRD", "BOOTLOADER", "BOOT", "KERNEL_CMD", "ROOT", "SD_DISK_BUS", "UUID", "FIRMWARE"]
1361
1365
  FEATURES = ["ACPI", "PAE", "APIC", "LOCALTIME", "HYPERV", "GUEST_AGENT", "VIRTIO_SCSI_QUEUES", "VIRTIO_BLK_QUEUES", "IOTHREADS"]
1362
1366
  INPUT = ["TYPE", "BUS"]
1363
- GRAPHICS = ["TYPE", "LISTEN", "PASSWD", "KEYMAP" ]
1367
+ GRAPHICS = ["TYPE", "LISTEN", "PASSWD", "KEYMAP", "COMMAND"]
1364
1368
  VIDEO = ["TYPE", "IOMMU", "ATS", "VRAM", "RESOLUTION"]
1365
1369
  RAW = ["DATA", "DATA_VMX", "TYPE", "VALIDATE"]
1366
1370
  CPU_MODEL = ["MODEL"]
1367
1371
  BACKUP_CONFIG = ["FS_FREEZE", "KEEP_LAST", "BACKUP_VOLATILE", "MODE", "INCREMENT_MODE"]
1368
- CONTEXT (any value, **variable substitution will be made**)
1372
+ CONTEXT (any value, except ETH*, **variable substitution will be made**)
1369
1373
  EOT
1370
1374
 
1371
1375
  command :updateconf, updateconf_desc, :vmid, [:file, nil],
@@ -169,8 +169,7 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
169
169
  :name => 'no_check_capacity',
170
170
  :large => '--no_check_capacity',
171
171
  :description =>
172
- 'Check Datastore capacity. By Default YES',
173
- :format => String
172
+ 'Do not check Datastore capacity, only for admins.'
174
173
  }
175
174
 
176
175
  FILTERS = [
data/lib/one_helper.rb CHANGED
@@ -379,7 +379,7 @@ Bash symbols must be escaped on STDIN passing'
379
379
  :name => 'context',
380
380
  :large => '--context line1,line2,line3',
381
381
  :format => Array,
382
- :description => 'Lines to add to the context section'
382
+ :description => 'Replaces the context section with the specified lines'
383
383
  },
384
384
  {
385
385
  :name => 'boot',
@@ -1078,12 +1078,12 @@ Bash symbols must be escaped on STDIN passing'
1078
1078
  elsif options[:xml]
1079
1079
  return list_pool_xml(pool, options, filter_flag)
1080
1080
  elsif options[:json]
1081
- list_pool_format(pool, options, filter_flag) do |pool|
1081
+ return list_pool_format(pool, options, filter_flag) do |pool|
1082
1082
  hash = check_resource_xsd(pool, pname)
1083
1083
  puts ::JSON.pretty_generate(hash)
1084
1084
  end
1085
1085
  elsif options[:yaml]
1086
- list_pool_format(pool, options, filter_flag) do |pool|
1086
+ return list_pool_format(pool, options, filter_flag) do |pool|
1087
1087
  hash = check_resource_xsd(pool, pname)
1088
1088
  puts hash.to_yaml(:indent => 4)
1089
1089
  end
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
3
- targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema">
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema"
3
+ xmlns="http://opennebula.org/XMLSchema">
4
4
  <xs:element name="VM_POOL">
5
5
  <xs:complexType>
6
6
  <xs:sequence>
@@ -60,6 +60,28 @@
60
60
  <xs:element name="USER_TEMPLATE">
61
61
  <xs:complexType>
62
62
  <xs:sequence>
63
+ <xs:element name="LABELS" type="xs:string" minOccurs="0"/>
64
+ <xs:element name="ERROR" type="xs:string" minOccurs="0"/>
65
+ <xs:element name="SCHED_MESSAGE" type="xs:string" minOccurs="0"/>
66
+ <xs:element name="SCHED_RANK" type="xs:string" minOccurs="0"/>
67
+ <xs:element name="SCHED_DS_RANK" type="xs:string" minOccurs="0"/>
68
+ <xs:element name="SCHED_REQUIREMENTS" type="xs:string" minOccurs="0"/>
69
+ <xs:element name="SCHED_DS_REQUIREMENTS" type="xs:string" minOccurs="0"/>
70
+ <xs:element name="USER_PRIORITY" type="xs:string" minOccurs="0"/>
71
+ <xs:element name="PUBLIC_CLOUD" minOccurs="0" maxOccurs="unbounded">
72
+ <xs:complexType>
73
+ <xs:sequence>
74
+ <xs:any processContents="skip"/>
75
+ </xs:sequence>
76
+ </xs:complexType>
77
+ </xs:element>
78
+ <xs:element name="SCHED_ACTION" minOccurs="0" maxOccurs="unbounded">
79
+ <xs:complexType>
80
+ <xs:sequence>
81
+ <xs:any processContents="skip"/>
82
+ </xs:sequence>
83
+ </xs:complexType>
84
+ </xs:element>
63
85
  <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
64
86
  </xs:sequence>
65
87
  </xs:complexType>
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.8.2
4
+ version: 6.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-20 00:00:00.000000000 Z
11
+ date: 2024-04-21 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.8.2
19
+ version: 6.8.3
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.8.2
26
+ version: 6.8.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement