opennebula-cli 6.4.4 → 6.5.80.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +1 -1
  3. data/bin/oneacl +1 -1
  4. data/bin/onecluster +1 -1
  5. data/bin/onedatastore +1 -1
  6. data/bin/oneflow +1 -1
  7. data/bin/oneflow-template +2 -2
  8. data/bin/onegroup +1 -1
  9. data/bin/onehook +1 -1
  10. data/bin/onehost +1 -1
  11. data/bin/oneimage +52 -3
  12. data/bin/oneirb +1 -1
  13. data/bin/onelog +1 -1
  14. data/bin/onemarket +1 -1
  15. data/bin/onemarketapp +1 -1
  16. data/bin/onesecgroup +1 -1
  17. data/bin/oneshowback +1 -1
  18. data/bin/onetemplate +1 -1
  19. data/bin/oneuser +3 -3
  20. data/bin/onevcenter +1 -1
  21. data/bin/onevdc +1 -1
  22. data/bin/onevm +142 -157
  23. data/bin/onevmgroup +1 -1
  24. data/bin/onevnet +16 -4
  25. data/bin/onevntemplate +1 -1
  26. data/bin/onevrouter +1 -1
  27. data/bin/onezone +1 -1
  28. data/lib/cli_helper.rb +20 -20
  29. data/lib/command_parser.rb +1 -1
  30. data/lib/one_helper/oneacct_helper.rb +1 -1
  31. data/lib/one_helper/oneacl_helper.rb +1 -1
  32. data/lib/one_helper/onecluster_helper.rb +1 -1
  33. data/lib/one_helper/onedatastore_helper.rb +1 -1
  34. data/lib/one_helper/oneflow_helper.rb +2 -2
  35. data/lib/one_helper/oneflowtemplate_helper.rb +2 -2
  36. data/lib/one_helper/onegroup_helper.rb +1 -1
  37. data/lib/one_helper/onehook_helper.rb +1 -1
  38. data/lib/one_helper/onehost_helper.rb +15 -58
  39. data/lib/one_helper/oneimage_helper.rb +73 -12
  40. data/lib/one_helper/onemarket_helper.rb +1 -1
  41. data/lib/one_helper/onemarketapp_helper.rb +3 -3
  42. data/lib/one_helper/onequota_helper.rb +1 -1
  43. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  44. data/lib/one_helper/onetemplate_helper.rb +1 -2
  45. data/lib/one_helper/oneuser_helper.rb +1 -1
  46. data/lib/one_helper/onevcenter_helper.rb +7 -7
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +68 -56
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +37 -3
  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 +1 -1
  54. data/lib/one_helper.rb +3 -3
  55. data/share/schemas/xsd/acct.xsd +28 -0
  56. data/share/schemas/xsd/hook_message_state.xsd +5 -1
  57. data/share/schemas/xsd/host.xsd +3 -23
  58. data/share/schemas/xsd/image.xsd +18 -0
  59. data/share/schemas/xsd/opennebula_configuration.xsd +2 -0
  60. data/share/schemas/xsd/vm.xsd +30 -0
  61. data/share/schemas/xsd/vnet.xsd +28 -0
  62. data/share/schemas/xsd/vnet_pool.xsd +28 -0
  63. metadata +6 -6
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, 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 #
@@ -186,8 +186,32 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
186
186
  d['USED_LEASES']
187
187
  end
188
188
 
189
+ column :UPDATED, 'Number of VMs with updated VN attributes', :size=>4 do |d|
190
+ if d['UPDATED_VMS']['ID'].nil?
191
+ '0'
192
+ else
193
+ [d['UPDATED_VMS']['ID']].flatten.size
194
+ end
195
+ end
196
+
197
+ column :OUTDATED, 'Number of VMs with outdated VN attributes', :size=>4 do |d|
198
+ if d['OUTDATED_VMS']['ID'].nil?
199
+ '0'
200
+ else
201
+ [d['OUTDATED_VMS']['ID']].flatten.size
202
+ end
203
+ end
204
+
205
+ column :ERROR, 'Number of VMs that failed to update VN attributes', :size=>4 do |d|
206
+ if d['ERROR_VMS']['ID'].nil?
207
+ '0'
208
+ else
209
+ [d['ERROR_VMS']['ID']].flatten.size
210
+ end
211
+ end
212
+
189
213
  default :ID, :USER, :GROUP, :NAME, :CLUSTERS, :BRIDGE, :STATE,
190
- :LEASES
214
+ :LEASES, :OUTDATED, :ERROR
191
215
  end
192
216
  end
193
217
 
@@ -343,7 +367,7 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
343
367
 
344
368
  CLIHelper.print_header(str_h1 % 'PERMISSIONS', false)
345
369
 
346
- ['OWNER', 'GROUP', 'OTHER'].each do |e|
370
+ %w[OWNER GROUP OTHER].each do |e|
347
371
  mask = '---'
348
372
  mask[0] = 'u' if vn["PERMISSIONS/#{e}_U"] == '1'
349
373
  mask[1] = 'm' if vn["PERMISSIONS/#{e}_M"] == '1'
@@ -474,6 +498,16 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
474
498
  puts format('%-15s', id)
475
499
  end
476
500
 
501
+ puts
502
+
503
+ CLIHelper.print_header(str_h1 % 'VIRTUAL MACHINES', false)
504
+
505
+ updated, outdated, error = vn.vm_ids
506
+
507
+ puts format(str, 'UPDATED', updated.join(','))
508
+ puts format(str, 'OUTDATED', outdated.join(','))
509
+ puts format(str, 'ERROR', error.join(','))
510
+
477
511
  return unless options[:show_ar]
478
512
 
479
513
  ar_list.each do |ar_id|
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, 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-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, 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-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, 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/one_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, 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 #
@@ -30,7 +30,7 @@ include OpenNebula
30
30
  module OpenNebulaHelper
31
31
  ONE_VERSION=<<-EOT
32
32
  OpenNebula #{OpenNebula::VERSION}
33
- Copyright 2002-2023, OpenNebula Project, OpenNebula Systems
33
+ Copyright 2002-2022, OpenNebula Project, OpenNebula Systems
34
34
  EOT
35
35
 
36
36
  if ONE_LOCATION
@@ -424,7 +424,7 @@ EOT
424
424
  FORCE={
425
425
  :name => 'force',
426
426
  :large => '--force',
427
- :description => 'Overwrite the file'
427
+ :description => 'Ignore errors (if possible)'
428
428
  }
429
429
 
430
430
  EXTENDED={
@@ -170,6 +170,34 @@
170
170
  </xs:sequence>
171
171
  </xs:complexType>
172
172
  </xs:element>
173
+ <xs:element name="BACKUPS">
174
+ <xs:complexType>
175
+ <xs:sequence>
176
+ <xs:element name="BACKUP_CONFIG" minOccurs="1" maxOccurs="1">
177
+ <xs:complexType>
178
+ <xs:sequence>
179
+ <xs:element name="BACKUP_VOLATILE" type="xs:string" minOccurs="0" maxOccurs="1"/>
180
+ <xs:element name="FS_FREEZE" type="xs:string" minOccurs="0" maxOccurs="1"/>
181
+ <xs:element name="INCREMENTAL_BACKUP_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
182
+ <xs:element name="KEEP_LAST" type="xs:string" minOccurs="0" maxOccurs="1"/>
183
+ <xs:element name="LAST_BACKUP_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
184
+ <xs:element name="LAST_BACKUP_SIZE" type="xs:string" minOccurs="0" maxOccurs="1"/>
185
+ <xs:element name="LAST_DATASTORE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
186
+ <xs:element name="LAST_INCREMENT_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
187
+ <xs:element name="MODE" type="xs:string" minOccurs="0" maxOccurs="1"/>
188
+ </xs:sequence>
189
+ </xs:complexType>
190
+ </xs:element>
191
+ <xs:element name="BACKUP_IDS" minOccurs="1" maxOccurs="1">
192
+ <xs:complexType>
193
+ <xs:sequence>
194
+ <xs:element name="ID" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
195
+ </xs:sequence>
196
+ </xs:complexType>
197
+ </xs:element>
198
+ </xs:sequence>
199
+ </xs:complexType>
200
+ </xs:element>
173
201
  </xs:sequence>
174
202
  </xs:complexType>
175
203
  </xs:element>
@@ -10,15 +10,19 @@
10
10
  <xs:restriction base="xs:string">
11
11
  <xs:enumeration value="VM"/>
12
12
  <xs:enumeration value="HOST"/>
13
+ <xs:enumeration value="IMAGE"/>
14
+ <xs:enumeration value="VNET"/>
13
15
  </xs:restriction>
14
16
  </xs:simpleType>
15
17
  </xs:element>
16
18
  <xs:element name="STATE" type="xs:string"/>
17
19
  <xs:element name="LCM_STATE" type="xs:string" maxOccurs="1" minOccurs="0"/>
18
20
  <xs:element name="REMOTE_HOST" type="xs:string" maxOccurs="1" minOccurs="0"/>
19
- <!-- The template of the resource (VM or Host) is included here -->
21
+ <!-- The template of the resource (VM, Host, Image or VNet) is included here -->
20
22
  <xs:element ref="HOST" maxOccurs="1" minOccurs="0"/>
21
23
  <xs:element ref="VM" maxOccurs="1" minOccurs="0"/>
24
+ <xs:element ref="IMAGE" maxOccurs="1" minOccurs="0"/>
25
+ <xs:element ref="VNET" maxOccurs="1" minOccurs="0"/>
22
26
  </xs:sequence>
23
27
  </xs:complexType>
24
28
  </xs:element>
@@ -98,6 +98,7 @@
98
98
  <xs:element name="HUGEPAGE" minOccurs="0" maxOccurs="unbounded">
99
99
  <xs:complexType>
100
100
  <xs:all>
101
+ <xs:element name="FREE" type="xs:integer"/>
101
102
  <xs:element name="PAGES" type="xs:integer"/>
102
103
  <xs:element name="SIZE" type="xs:integer"/>
103
104
  <xs:element name="USAGE" type="xs:integer"/>
@@ -108,8 +109,10 @@
108
109
  <xs:complexType>
109
110
  <xs:all>
110
111
  <xs:element name="DISTANCE" type="xs:string"/>
112
+ <xs:element name="FREE" type="xs:integer"/>
111
113
  <xs:element name="TOTAL" type="xs:integer"/>
112
114
  <xs:element name="USAGE" type="xs:integer"/>
115
+ <xs:element name="USED" type="xs:integer"/>
113
116
  </xs:all>
114
117
  </xs:complexType>
115
118
  </xs:element>
@@ -174,29 +177,6 @@
174
177
  </xs:sequence>
175
178
  </xs:complexType>
176
179
  </xs:element>
177
- <xs:element name="NUMA_NODE" minOccurs="0" maxOccurs="unbounded">
178
- <xs:complexType>
179
- <xs:sequence>
180
- <xs:element name="HUGEPAGE" minOccurs="0" maxOccurs="unbounded">
181
- <xs:complexType>
182
- <xs:all>
183
- <xs:element name="FREE" type="xs:integer"/>
184
- <xs:element name="SIZE" type="xs:integer"/>
185
- </xs:all>
186
- </xs:complexType>
187
- </xs:element>
188
- <xs:element name="MEMORY">
189
- <xs:complexType>
190
- <xs:all>
191
- <xs:element name="FREE" type="xs:string"/>
192
- <xs:element name="USED" type="xs:integer"/>
193
- </xs:all>
194
- </xs:complexType>
195
- </xs:element>
196
- <xs:element name="NODE_ID" type="xs:integer"/>
197
- </xs:sequence>
198
- </xs:complexType>
199
- </xs:element>
200
180
  </xs:sequence>
201
181
  </xs:complexType>
202
182
  </xs:element>
@@ -117,6 +117,24 @@
117
117
  </xs:sequence>
118
118
  </xs:complexType>
119
119
  </xs:element>
120
+ <xs:element name="BACKUP_INCREMENTS">
121
+ <xs:complexType>
122
+ <xs:sequence>
123
+ <xs:element name="INCREMENT" minOccurs="0" maxOccurs="unbounded">
124
+ <xs:complexType>
125
+ <xs:sequence>
126
+ <xs:element name="DATE" type="xs:string"/>
127
+ <xs:element name="ID" type="xs:string"/>
128
+ <xs:element name="PARENT_ID" type="xs:integer" minOccurs="0" maxOccurs="1"/>
129
+ <xs:element name="SIZE" type="xs:string"/>
130
+ <xs:element name="SOURCE" type="xs:string"/>
131
+ <xs:element name="TYPE" type="xs:string"/>
132
+ </xs:sequence>
133
+ </xs:complexType>
134
+ </xs:element>
135
+ </xs:sequence>
136
+ </xs:complexType>
137
+ </xs:element>
120
138
  </xs:sequence>
121
139
  </xs:complexType>
122
140
  </xs:element>
@@ -28,6 +28,8 @@
28
28
  </xs:element>
29
29
 
30
30
  <xs:element name="CLUSTER_ENCRYPTED_ATTR" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
31
+ <xs:element name="CONTEXT_RESTRICTED_DIRS" type="xs:string" minOccurs="0" maxOccurs="1"/>
32
+ <xs:element name="CONTEXT_SAFE_DIRS" type="xs:string" minOccurs="0" maxOccurs="1"/>
31
33
  <xs:element name="DATASTORE_CAPACITY_CHECK" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
32
34
  <xs:element name="DATASTORE_ENCRYPTED_ATTR" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
33
35
  <xs:element name="DATASTORE_LOCATION" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
@@ -121,6 +121,8 @@
121
121
  <xs:element name="MEMORY" type="xs:string" minOccurs="0" maxOccurs="1"/>
122
122
  <xs:element name="MEMORY_COST" type="xs:string" minOccurs="0" maxOccurs="1"/>
123
123
  <xs:element name="MEMORY_MAX" type="xs:string" minOccurs="0" maxOccurs="1"/>
124
+ <xs:element name="MEMORY_SLOTS" type="xs:string" minOccurs="0" maxOccurs="1"/>
125
+ <xs:element name="MEMORY_RESIZE_MODE" type="xs:string" minOccurs="0" maxOccurs="1"/>
124
126
  <xs:element name="NIC" minOccurs="0" maxOccurs="unbounded">
125
127
  <xs:complexType>
126
128
  <xs:sequence>
@@ -311,6 +313,34 @@
311
313
  </xs:sequence>
312
314
  </xs:complexType>
313
315
  </xs:element>
316
+ <xs:element name="BACKUPS">
317
+ <xs:complexType>
318
+ <xs:sequence>
319
+ <xs:element name="BACKUP_CONFIG" minOccurs="1" maxOccurs="1">
320
+ <xs:complexType>
321
+ <xs:sequence>
322
+ <xs:element name="BACKUP_VOLATILE" type="xs:string" minOccurs="0" maxOccurs="1"/>
323
+ <xs:element name="FS_FREEZE" type="xs:string" minOccurs="0" maxOccurs="1"/>
324
+ <xs:element name="INCREMENTAL_BACKUP_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
325
+ <xs:element name="KEEP_LAST" type="xs:string" minOccurs="0" maxOccurs="1"/>
326
+ <xs:element name="LAST_BACKUP_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
327
+ <xs:element name="LAST_BACKUP_SIZE" type="xs:string" minOccurs="0" maxOccurs="1"/>
328
+ <xs:element name="LAST_DATASTORE_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
329
+ <xs:element name="LAST_INCREMENT_ID" type="xs:string" minOccurs="0" maxOccurs="1"/>
330
+ <xs:element name="MODE" type="xs:string" minOccurs="0" maxOccurs="1"/>
331
+ </xs:sequence>
332
+ </xs:complexType>
333
+ </xs:element>
334
+ <xs:element name="BACKUP_IDS" minOccurs="1" maxOccurs="1">
335
+ <xs:complexType>
336
+ <xs:sequence>
337
+ <xs:element name="ID" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
338
+ </xs:sequence>
339
+ </xs:complexType>
340
+ </xs:element>
341
+ </xs:sequence>
342
+ </xs:complexType>
343
+ </xs:element>
314
344
  </xs:sequence>
315
345
  </xs:complexType>
316
346
  </xs:element>
@@ -61,6 +61,34 @@
61
61
  </xs:sequence>
62
62
  </xs:complexType>
63
63
  </xs:element>
64
+ <xs:element name="UPDATED_VMS">
65
+ <xs:complexType>
66
+ <xs:sequence>
67
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
68
+ </xs:sequence>
69
+ </xs:complexType>
70
+ </xs:element>
71
+ <xs:element name="OUTDATED_VMS">
72
+ <xs:complexType>
73
+ <xs:sequence>
74
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
75
+ </xs:sequence>
76
+ </xs:complexType>
77
+ </xs:element>
78
+ <xs:element name="UPDATING_VMS">
79
+ <xs:complexType>
80
+ <xs:sequence>
81
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
82
+ </xs:sequence>
83
+ </xs:complexType>
84
+ </xs:element>
85
+ <xs:element name="ERROR_VMS">
86
+ <xs:complexType>
87
+ <xs:sequence>
88
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
89
+ </xs:sequence>
90
+ </xs:complexType>
91
+ </xs:element>
64
92
  <xs:element name="TEMPLATE">
65
93
  <xs:complexType>
66
94
  <xs:sequence>
@@ -55,6 +55,34 @@
55
55
  </xs:sequence>
56
56
  </xs:complexType>
57
57
  </xs:element>
58
+ <xs:element name="UPDATED_VMS">
59
+ <xs:complexType>
60
+ <xs:sequence>
61
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
62
+ </xs:sequence>
63
+ </xs:complexType>
64
+ </xs:element>
65
+ <xs:element name="OUTDATED_VMS">
66
+ <xs:complexType>
67
+ <xs:sequence>
68
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
69
+ </xs:sequence>
70
+ </xs:complexType>
71
+ </xs:element>
72
+ <xs:element name="UPDATING_VMS">
73
+ <xs:complexType>
74
+ <xs:sequence>
75
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
76
+ </xs:sequence>
77
+ </xs:complexType>
78
+ </xs:element>
79
+ <xs:element name="ERROR_VMS">
80
+ <xs:complexType>
81
+ <xs:sequence>
82
+ <xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
83
+ </xs:sequence>
84
+ </xs:complexType>
85
+ </xs:element>
58
86
  <xs:element name="TEMPLATE" type="xs:anyType"/>
59
87
  <xs:element name="AR_POOL">
60
88
  <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.4.4
4
+ version: 6.5.80.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2022-12-04 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.4.4
19
+ version: 6.5.80.pre
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.4.4
26
+ version: 6.5.80.pre
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -189,9 +189,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - ">"
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: 1.3.1
195
195
  requirements: []
196
196
  rubygems_version: 3.1.2
197
197
  signing_key: