ovirt-engine-sdk 4.3.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES.adoc +40 -0
- data/lib/ovirtsdk4/readers.rb +32 -0
- data/lib/ovirtsdk4/services.rb +470 -3
- data/lib/ovirtsdk4/types.rb +215 -0
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writers.rb +8 -0
- metadata +35 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ca8fdcd1d4d2c8bcbdc3b1283e05a37d5339ddda
|
4
|
+
data.tar.gz: b679736504584a78ba18179cec2842970bca3433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 689b4ba2fc7fb81a8a389d8baff2511322e84c235bce5172f34fc4a36041869f2de9f5a2d1be3492e20a181596afd9b0e2ab4026ab9e839a541ae33844e8ef0a
|
7
|
+
data.tar.gz: 8713015125c1f93ae29b6e8937d0d6724286f402ae6bafbcfa2b984c9d6b10640623f2d0a77e305ee39e7e49b91f1facf363b2932552c468b7847702ff19ebc1
|
data/CHANGES.adoc
CHANGED
@@ -2,6 +2,46 @@
|
|
2
2
|
|
3
3
|
This document describes the relevant changes between releases of the SDK.
|
4
4
|
|
5
|
+
== 4.3.1 / Apr 22 2020
|
6
|
+
New features:
|
7
|
+
|
8
|
+
* introduce generic initialize of vm
|
9
|
+
|
10
|
+
* Add timeout to host upgrade
|
11
|
+
https://bugzilla.redhat.com/1728617[1728617].
|
12
|
+
|
13
|
+
* Add services for labels in affinity groups
|
14
|
+
https://bugzilla.redhat.com/1680499[1680499].
|
15
|
+
|
16
|
+
* It should be possible to specify exact v4.0 as NFS version
|
17
|
+
https://bugzilla.redhat.com/1690026[1690026].
|
18
|
+
|
19
|
+
* Add priority to AffinityGroup type
|
20
|
+
https://bugzilla.redhat.com/1680498[1680498].
|
21
|
+
|
22
|
+
* Add allContent to HostNic Services
|
23
|
+
https://bugzilla.redhat.com/1718141[1718141].
|
24
|
+
|
25
|
+
* Allow setting a disk ScsiGenericIO to disabled
|
26
|
+
https://bugzilla.redhat.com/1714834[1714834].
|
27
|
+
|
28
|
+
* Treat image transfers cancelled by user/system differently
|
29
|
+
https://bugzilla.redhat.com/1533362[1533362].
|
30
|
+
|
31
|
+
* Add new parameters to HostsService.List and VmService.Migrate
|
32
|
+
https://bugzilla.redhat.com/1651406[1651406].
|
33
|
+
|
34
|
+
* Add Hosted Engine disk types to content type
|
35
|
+
https://bugzilla.redhat.com/1663626[1663626].
|
36
|
+
|
37
|
+
* Add Hosted Engine disk types to content type
|
38
|
+
https://bugzilla.redhat.com/1600788[1600788].
|
39
|
+
|
40
|
+
Deprecations:
|
41
|
+
|
42
|
+
* Announce the depreciation of Neutron agent configuration
|
43
|
+
https://bugzilla.redhat.com/1638675[1638675].
|
44
|
+
|
5
45
|
== 4.3.0 / Jan 16 2018
|
6
46
|
Update to model 4.3.21.
|
7
47
|
|
data/lib/ovirtsdk4/readers.rb
CHANGED
@@ -78,6 +78,8 @@ module OvirtSDK4
|
|
78
78
|
object.is_attached = value if not value.nil?
|
79
79
|
value = reader.get_attribute('maintenance_enabled')
|
80
80
|
object.maintenance_enabled = value if not value.nil?
|
81
|
+
value = reader.get_attribute('migrate_vms_in_affinity_closure')
|
82
|
+
object.migrate_vms_in_affinity_closure = value if not value.nil?
|
81
83
|
value = reader.get_attribute('name')
|
82
84
|
object.name = value if not value.nil?
|
83
85
|
value = reader.get_attribute('pause')
|
@@ -104,10 +106,16 @@ module OvirtSDK4
|
|
104
106
|
object.stop_gluster_service = value if not value.nil?
|
105
107
|
value = reader.get_attribute('succeeded')
|
106
108
|
object.succeeded = value if not value.nil?
|
109
|
+
value = reader.get_attribute('timeout')
|
110
|
+
object.timeout = value if not value.nil?
|
107
111
|
value = reader.get_attribute('undeploy_hosted_engine')
|
108
112
|
object.undeploy_hosted_engine = value if not value.nil?
|
113
|
+
value = reader.get_attribute('upgrade_action')
|
114
|
+
object.upgrade_action = value if not value.nil?
|
109
115
|
value = reader.get_attribute('use_cloud_init')
|
110
116
|
object.use_cloud_init = value if not value.nil?
|
117
|
+
value = reader.get_attribute('use_initialization')
|
118
|
+
object.use_initialization = value if not value.nil?
|
111
119
|
value = reader.get_attribute('use_sysprep')
|
112
120
|
object.use_sysprep = value if not value.nil?
|
113
121
|
value = reader.get_attribute('volatile')
|
@@ -213,6 +221,8 @@ module OvirtSDK4
|
|
213
221
|
object.logical_units = LogicalUnitReader.read_many(reader)
|
214
222
|
when 'maintenance_enabled'
|
215
223
|
object.maintenance_enabled = Reader.read_boolean(reader)
|
224
|
+
when 'migrate_vms_in_affinity_closure'
|
225
|
+
object.migrate_vms_in_affinity_closure = Reader.read_boolean(reader)
|
216
226
|
when 'modified_bonds'
|
217
227
|
object.modified_bonds = HostNicReader.read_many(reader)
|
218
228
|
when 'modified_labels'
|
@@ -277,10 +287,16 @@ module OvirtSDK4
|
|
277
287
|
object.template = TemplateReader.read_one(reader)
|
278
288
|
when 'ticket'
|
279
289
|
object.ticket = TicketReader.read_one(reader)
|
290
|
+
when 'timeout'
|
291
|
+
object.timeout = Reader.read_integer(reader)
|
280
292
|
when 'undeploy_hosted_engine'
|
281
293
|
object.undeploy_hosted_engine = Reader.read_boolean(reader)
|
294
|
+
when 'upgrade_action'
|
295
|
+
object.upgrade_action = Reader.read_enum(ClusterUpgradeAction, reader)
|
282
296
|
when 'use_cloud_init'
|
283
297
|
object.use_cloud_init = Reader.read_boolean(reader)
|
298
|
+
when 'use_initialization'
|
299
|
+
object.use_initialization = Reader.read_boolean(reader)
|
284
300
|
when 'use_sysprep'
|
285
301
|
object.use_sysprep = Reader.read_boolean(reader)
|
286
302
|
when 'virtual_functions_configuration'
|
@@ -352,6 +368,8 @@ module OvirtSDK4
|
|
352
368
|
object.name = value if not value.nil?
|
353
369
|
value = reader.get_attribute('positive')
|
354
370
|
object.positive = value if not value.nil?
|
371
|
+
value = reader.get_attribute('priority')
|
372
|
+
object.priority = value if not value.nil?
|
355
373
|
|
356
374
|
# Discard the start tag:
|
357
375
|
empty = reader.empty_element?
|
@@ -375,12 +393,18 @@ module OvirtSDK4
|
|
375
393
|
object.name = Reader.read_string(reader)
|
376
394
|
when 'positive'
|
377
395
|
object.positive = Reader.read_boolean(reader)
|
396
|
+
when 'priority'
|
397
|
+
object.priority = Reader.read_decimal(reader)
|
378
398
|
when 'vms_rule'
|
379
399
|
object.vms_rule = AffinityRuleReader.read_one(reader)
|
380
400
|
when 'cluster'
|
381
401
|
object.cluster = ClusterReader.read_one(reader)
|
402
|
+
when 'host_labels'
|
403
|
+
object.host_labels = AffinityLabelReader.read_many(reader)
|
382
404
|
when 'hosts'
|
383
405
|
object.hosts = HostReader.read_many(reader)
|
406
|
+
when 'vm_labels'
|
407
|
+
object.vm_labels = AffinityLabelReader.read_many(reader)
|
384
408
|
when 'vms'
|
385
409
|
object.vms = VmReader.read_many(reader)
|
386
410
|
when 'link'
|
@@ -429,8 +453,12 @@ module OvirtSDK4
|
|
429
453
|
list = List.new
|
430
454
|
list.href = href
|
431
455
|
case rel
|
456
|
+
when 'hostlabels'
|
457
|
+
object.host_labels = list
|
432
458
|
when 'hosts'
|
433
459
|
object.hosts = list
|
460
|
+
when 'vmlabels'
|
461
|
+
object.vm_labels = list
|
434
462
|
when 'vms'
|
435
463
|
object.vms = list
|
436
464
|
end
|
@@ -457,6 +485,8 @@ module OvirtSDK4
|
|
457
485
|
object.comment = value if not value.nil?
|
458
486
|
value = reader.get_attribute('description')
|
459
487
|
object.description = value if not value.nil?
|
488
|
+
value = reader.get_attribute('has_implicit_affinity_group')
|
489
|
+
object.has_implicit_affinity_group = value if not value.nil?
|
460
490
|
value = reader.get_attribute('id')
|
461
491
|
object.id = value if not value.nil?
|
462
492
|
value = reader.get_attribute('name')
|
@@ -476,6 +506,8 @@ module OvirtSDK4
|
|
476
506
|
object.comment = Reader.read_string(reader)
|
477
507
|
when 'description'
|
478
508
|
object.description = Reader.read_string(reader)
|
509
|
+
when 'has_implicit_affinity_group'
|
510
|
+
object.has_implicit_affinity_group = Reader.read_boolean(reader)
|
479
511
|
when 'id'
|
480
512
|
object.id = Reader.read_string(reader)
|
481
513
|
when 'name'
|
data/lib/ovirtsdk4/services.rb
CHANGED
@@ -23,9 +23,21 @@ module OvirtSDK4
|
|
23
23
|
class AffinityGroupService < Service
|
24
24
|
end
|
25
25
|
|
26
|
+
class AffinityGroupHostLabelService < Service
|
27
|
+
end
|
28
|
+
|
29
|
+
class AffinityGroupHostLabelsService < Service
|
30
|
+
end
|
31
|
+
|
26
32
|
class AffinityGroupVmService < Service
|
27
33
|
end
|
28
34
|
|
35
|
+
class AffinityGroupVmLabelService < Service
|
36
|
+
end
|
37
|
+
|
38
|
+
class AffinityGroupVmLabelsService < Service
|
39
|
+
end
|
40
|
+
|
29
41
|
class AffinityGroupVmsService < Service
|
30
42
|
end
|
31
43
|
|
@@ -930,6 +942,28 @@ module OvirtSDK4
|
|
930
942
|
internal_update(group, AffinityGroup, UPDATE, opts)
|
931
943
|
end
|
932
944
|
|
945
|
+
#
|
946
|
+
# Returns a reference to the service that manages the
|
947
|
+
# list of all host labels attached to this affinity
|
948
|
+
# group.
|
949
|
+
#
|
950
|
+
# @return [AffinityGroupHostLabelsService] A reference to `host_labels` service.
|
951
|
+
#
|
952
|
+
def host_labels_service
|
953
|
+
@host_labels_service ||= AffinityGroupHostLabelsService.new(self, 'hostlabels')
|
954
|
+
end
|
955
|
+
|
956
|
+
#
|
957
|
+
# Returns a reference to the service that manages the
|
958
|
+
# list of all virtual machine labels attached to this affinity
|
959
|
+
# group.
|
960
|
+
#
|
961
|
+
# @return [AffinityGroupVmLabelsService] A reference to `vm_labels` service.
|
962
|
+
#
|
963
|
+
def vm_labels_service
|
964
|
+
@vm_labels_service ||= AffinityGroupVmLabelsService.new(self, 'vmlabels')
|
965
|
+
end
|
966
|
+
|
933
967
|
#
|
934
968
|
# Returns a reference to the service that manages the
|
935
969
|
# list of all virtual machines attached to this affinity
|
@@ -952,6 +986,18 @@ module OvirtSDK4
|
|
952
986
|
if path.nil? || path == ''
|
953
987
|
return self
|
954
988
|
end
|
989
|
+
if path == 'hostlabels'
|
990
|
+
return host_labels_service
|
991
|
+
end
|
992
|
+
if path.start_with?('hostlabels/')
|
993
|
+
return host_labels_service.service(path[11..-1])
|
994
|
+
end
|
995
|
+
if path == 'vmlabels'
|
996
|
+
return vm_labels_service
|
997
|
+
end
|
998
|
+
if path.start_with?('vmlabels/')
|
999
|
+
return vm_labels_service.service(path[9..-1])
|
1000
|
+
end
|
955
1001
|
if path == 'vms'
|
956
1002
|
return vms_service
|
957
1003
|
end
|
@@ -963,6 +1009,158 @@ module OvirtSDK4
|
|
963
1009
|
|
964
1010
|
end
|
965
1011
|
|
1012
|
+
class AffinityGroupHostLabelService < Service
|
1013
|
+
|
1014
|
+
REMOVE = [
|
1015
|
+
[:async, TrueClass].freeze,
|
1016
|
+
].freeze
|
1017
|
+
|
1018
|
+
private_constant :REMOVE
|
1019
|
+
|
1020
|
+
#
|
1021
|
+
# Remove this label from the affinity group.
|
1022
|
+
#
|
1023
|
+
# @param opts [Hash] Additional options.
|
1024
|
+
#
|
1025
|
+
# @option opts [Boolean] :async Indicates if the removal should be performed asynchronously.
|
1026
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
1027
|
+
#
|
1028
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
1029
|
+
#
|
1030
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
1031
|
+
# given then the timeout set globally for the connection will be used.
|
1032
|
+
#
|
1033
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
1034
|
+
#
|
1035
|
+
def remove(opts = {})
|
1036
|
+
internal_remove(REMOVE, opts)
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
#
|
1040
|
+
# Locates the service corresponding to the given path.
|
1041
|
+
#
|
1042
|
+
# @param path [String] The path of the service.
|
1043
|
+
#
|
1044
|
+
# @return [Service] A reference to the service.
|
1045
|
+
#
|
1046
|
+
def service(path)
|
1047
|
+
if path.nil? || path == ''
|
1048
|
+
return self
|
1049
|
+
end
|
1050
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
1051
|
+
end
|
1052
|
+
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
class AffinityGroupHostLabelsService < Service
|
1056
|
+
|
1057
|
+
ADD = [
|
1058
|
+
].freeze
|
1059
|
+
|
1060
|
+
private_constant :ADD
|
1061
|
+
|
1062
|
+
#
|
1063
|
+
# Adds a host label to the affinity group.
|
1064
|
+
#
|
1065
|
+
# For example, to add the label `789` to the affinity group `456` of cluster `123`,
|
1066
|
+
# send a request like this:
|
1067
|
+
#
|
1068
|
+
# ....
|
1069
|
+
# POST /ovirt-engine/api/clusters/123/affinitygroups/456/hostlabels
|
1070
|
+
# ....
|
1071
|
+
#
|
1072
|
+
# With the following body:
|
1073
|
+
#
|
1074
|
+
# [source,xml]
|
1075
|
+
# ----
|
1076
|
+
# <affinity_label id="789"/>
|
1077
|
+
# ----
|
1078
|
+
#
|
1079
|
+
# @param label [AffinityLabel] The AffinityLabel object to add to the affinity group.
|
1080
|
+
#
|
1081
|
+
# @param opts [Hash] Additional options.
|
1082
|
+
#
|
1083
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
1084
|
+
#
|
1085
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
1086
|
+
#
|
1087
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
1088
|
+
# given then the timeout set globally for the connection will be used.
|
1089
|
+
#
|
1090
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
1091
|
+
#
|
1092
|
+
# @return [AffinityLabel]
|
1093
|
+
#
|
1094
|
+
def add(label, opts = {})
|
1095
|
+
internal_add(label, AffinityLabel, ADD, opts)
|
1096
|
+
end
|
1097
|
+
|
1098
|
+
LIST = [
|
1099
|
+
[:follow, String].freeze,
|
1100
|
+
[:max, Integer].freeze,
|
1101
|
+
].freeze
|
1102
|
+
|
1103
|
+
private_constant :LIST
|
1104
|
+
|
1105
|
+
#
|
1106
|
+
# List all host labels assigned to this affinity group.
|
1107
|
+
#
|
1108
|
+
# The order of the returned labels isn't guaranteed.
|
1109
|
+
#
|
1110
|
+
# @param opts [Hash] Additional options.
|
1111
|
+
#
|
1112
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
1113
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
1114
|
+
#
|
1115
|
+
# @option opts [Integer] :max Sets the maximum number of host labels to return.
|
1116
|
+
# If not specified, all the labels are returned.
|
1117
|
+
#
|
1118
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
1119
|
+
#
|
1120
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
1121
|
+
#
|
1122
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
1123
|
+
# given then the timeout set globally for the connection will be used.
|
1124
|
+
#
|
1125
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
1126
|
+
#
|
1127
|
+
# @return [Array<AffinityLabel>]
|
1128
|
+
#
|
1129
|
+
def list(opts = {})
|
1130
|
+
internal_get(LIST, opts)
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
#
|
1134
|
+
# Access the service that manages the host label assignment to this affinity group.
|
1135
|
+
#
|
1136
|
+
# @param id [String] The identifier of the `label`.
|
1137
|
+
#
|
1138
|
+
# @return [AffinityGroupHostLabelService] A reference to the `label` service.
|
1139
|
+
#
|
1140
|
+
def label_service(id)
|
1141
|
+
AffinityGroupHostLabelService.new(self, id)
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
#
|
1145
|
+
# Locates the service corresponding to the given path.
|
1146
|
+
#
|
1147
|
+
# @param path [String] The path of the service.
|
1148
|
+
#
|
1149
|
+
# @return [Service] A reference to the service.
|
1150
|
+
#
|
1151
|
+
def service(path)
|
1152
|
+
if path.nil? || path == ''
|
1153
|
+
return self
|
1154
|
+
end
|
1155
|
+
index = path.index('/')
|
1156
|
+
if index.nil?
|
1157
|
+
return label_service(path)
|
1158
|
+
end
|
1159
|
+
return label_service(path[0..(index - 1)]).service(path[(index +1)..-1])
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
end
|
1163
|
+
|
966
1164
|
class AffinityGroupVmService < Service
|
967
1165
|
|
968
1166
|
REMOVE = [
|
@@ -1006,6 +1204,158 @@ module OvirtSDK4
|
|
1006
1204
|
|
1007
1205
|
end
|
1008
1206
|
|
1207
|
+
class AffinityGroupVmLabelService < Service
|
1208
|
+
|
1209
|
+
REMOVE = [
|
1210
|
+
[:async, TrueClass].freeze,
|
1211
|
+
].freeze
|
1212
|
+
|
1213
|
+
private_constant :REMOVE
|
1214
|
+
|
1215
|
+
#
|
1216
|
+
# Remove this label from the affinity group.
|
1217
|
+
#
|
1218
|
+
# @param opts [Hash] Additional options.
|
1219
|
+
#
|
1220
|
+
# @option opts [Boolean] :async Indicates if the removal should be performed asynchronously.
|
1221
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
1222
|
+
#
|
1223
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
1224
|
+
#
|
1225
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
1226
|
+
# given then the timeout set globally for the connection will be used.
|
1227
|
+
#
|
1228
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
1229
|
+
#
|
1230
|
+
def remove(opts = {})
|
1231
|
+
internal_remove(REMOVE, opts)
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
#
|
1235
|
+
# Locates the service corresponding to the given path.
|
1236
|
+
#
|
1237
|
+
# @param path [String] The path of the service.
|
1238
|
+
#
|
1239
|
+
# @return [Service] A reference to the service.
|
1240
|
+
#
|
1241
|
+
def service(path)
|
1242
|
+
if path.nil? || path == ''
|
1243
|
+
return self
|
1244
|
+
end
|
1245
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
end
|
1249
|
+
|
1250
|
+
class AffinityGroupVmLabelsService < Service
|
1251
|
+
|
1252
|
+
ADD = [
|
1253
|
+
].freeze
|
1254
|
+
|
1255
|
+
private_constant :ADD
|
1256
|
+
|
1257
|
+
#
|
1258
|
+
# Adds a virtual machine label to the affinity group.
|
1259
|
+
#
|
1260
|
+
# For example, to add the label `789` to the affinity group `456` of cluster `123`,
|
1261
|
+
# send a request like this:
|
1262
|
+
#
|
1263
|
+
# ....
|
1264
|
+
# POST /ovirt-engine/api/clusters/123/affinitygroups/456/vmlabels
|
1265
|
+
# ....
|
1266
|
+
#
|
1267
|
+
# With the following body:
|
1268
|
+
#
|
1269
|
+
# [source,xml]
|
1270
|
+
# ----
|
1271
|
+
# <affinity_label id="789"/>
|
1272
|
+
# ----
|
1273
|
+
#
|
1274
|
+
# @param label [AffinityLabel] The AffinityLabel object to add to the affinity group.
|
1275
|
+
#
|
1276
|
+
# @param opts [Hash] Additional options.
|
1277
|
+
#
|
1278
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
1279
|
+
#
|
1280
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
1281
|
+
#
|
1282
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
1283
|
+
# given then the timeout set globally for the connection will be used.
|
1284
|
+
#
|
1285
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
1286
|
+
#
|
1287
|
+
# @return [AffinityLabel]
|
1288
|
+
#
|
1289
|
+
def add(label, opts = {})
|
1290
|
+
internal_add(label, AffinityLabel, ADD, opts)
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
LIST = [
|
1294
|
+
[:follow, String].freeze,
|
1295
|
+
[:max, Integer].freeze,
|
1296
|
+
].freeze
|
1297
|
+
|
1298
|
+
private_constant :LIST
|
1299
|
+
|
1300
|
+
#
|
1301
|
+
# List all virtual machine labels assigned to this affinity group.
|
1302
|
+
#
|
1303
|
+
# The order of the returned labels isn't guaranteed.
|
1304
|
+
#
|
1305
|
+
# @param opts [Hash] Additional options.
|
1306
|
+
#
|
1307
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
1308
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
1309
|
+
#
|
1310
|
+
# @option opts [Integer] :max Sets the maximum number of virtual machine labels to return.
|
1311
|
+
# If not specified, all the labels are returned.
|
1312
|
+
#
|
1313
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
1314
|
+
#
|
1315
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
1316
|
+
#
|
1317
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
1318
|
+
# given then the timeout set globally for the connection will be used.
|
1319
|
+
#
|
1320
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
1321
|
+
#
|
1322
|
+
# @return [Array<AffinityLabel>]
|
1323
|
+
#
|
1324
|
+
def list(opts = {})
|
1325
|
+
internal_get(LIST, opts)
|
1326
|
+
end
|
1327
|
+
|
1328
|
+
#
|
1329
|
+
# Access the service that manages the virtual machine label assignment to this affinity group.
|
1330
|
+
#
|
1331
|
+
# @param id [String] The identifier of the `label`.
|
1332
|
+
#
|
1333
|
+
# @return [AffinityGroupVmLabelService] A reference to the `label` service.
|
1334
|
+
#
|
1335
|
+
def label_service(id)
|
1336
|
+
AffinityGroupVmLabelService.new(self, id)
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
#
|
1340
|
+
# Locates the service corresponding to the given path.
|
1341
|
+
#
|
1342
|
+
# @param path [String] The path of the service.
|
1343
|
+
#
|
1344
|
+
# @return [Service] A reference to the service.
|
1345
|
+
#
|
1346
|
+
def service(path)
|
1347
|
+
if path.nil? || path == ''
|
1348
|
+
return self
|
1349
|
+
end
|
1350
|
+
index = path.index('/')
|
1351
|
+
if index.nil?
|
1352
|
+
return label_service(path)
|
1353
|
+
end
|
1354
|
+
return label_service(path[0..(index - 1)]).service(path[(index +1)..-1])
|
1355
|
+
end
|
1356
|
+
|
1357
|
+
end
|
1358
|
+
|
1009
1359
|
class AffinityGroupVmsService < Service
|
1010
1360
|
|
1011
1361
|
ADD = [
|
@@ -4289,6 +4639,52 @@ module OvirtSDK4
|
|
4289
4639
|
internal_update(cluster, Cluster, UPDATE, opts)
|
4290
4640
|
end
|
4291
4641
|
|
4642
|
+
UPGRADE = [
|
4643
|
+
[:async, TrueClass].freeze,
|
4644
|
+
].freeze
|
4645
|
+
|
4646
|
+
private_constant :UPGRADE
|
4647
|
+
|
4648
|
+
#
|
4649
|
+
# Start or finish upgrade process for the cluster based on the action value. This action marks the cluster for
|
4650
|
+
# upgrade or clears the upgrade running flag on the cluster based on the action value which takes values of
|
4651
|
+
# start or stop.
|
4652
|
+
#
|
4653
|
+
# [source]
|
4654
|
+
# ----
|
4655
|
+
# POST /ovirt-engine/api/clusters/123/upgrade
|
4656
|
+
# ----
|
4657
|
+
#
|
4658
|
+
# With a request body like this to mark the cluster for upgrade:
|
4659
|
+
#
|
4660
|
+
# [source,xml]
|
4661
|
+
# ----
|
4662
|
+
# <action>
|
4663
|
+
# <upgrade_action>
|
4664
|
+
# start
|
4665
|
+
# </upgrade_action>
|
4666
|
+
# </action>
|
4667
|
+
# ----
|
4668
|
+
#
|
4669
|
+
# @param opts [Hash] Additional options.
|
4670
|
+
#
|
4671
|
+
# @option opts [Boolean] :async Indicates if the action should be performed asynchronously.
|
4672
|
+
#
|
4673
|
+
# @option opts [ClusterUpgradeAction] :upgrade_action The action to be performed.
|
4674
|
+
#
|
4675
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
4676
|
+
#
|
4677
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
4678
|
+
#
|
4679
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
4680
|
+
# given then the timeout set globally for the connection will be used.
|
4681
|
+
#
|
4682
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
4683
|
+
#
|
4684
|
+
def upgrade(opts = {})
|
4685
|
+
internal_action(:upgrade, nil, UPGRADE, opts)
|
4686
|
+
end
|
4687
|
+
|
4292
4688
|
#
|
4293
4689
|
# A reference to the service that manages affinity groups.
|
4294
4690
|
#
|
@@ -11227,6 +11623,7 @@ module OvirtSDK4
|
|
11227
11623
|
class HostNicsService < Service
|
11228
11624
|
|
11229
11625
|
LIST = [
|
11626
|
+
[:all_content, TrueClass].freeze,
|
11230
11627
|
[:follow, String].freeze,
|
11231
11628
|
[:max, Integer].freeze,
|
11232
11629
|
].freeze
|
@@ -11240,6 +11637,22 @@ module OvirtSDK4
|
|
11240
11637
|
#
|
11241
11638
|
# @param opts [Hash] Additional options.
|
11242
11639
|
#
|
11640
|
+
# @option opts [Boolean] :all_content Indicates if all of the attributes of the host network interface should be included in the response.
|
11641
|
+
#
|
11642
|
+
# By default the following attributes are excluded:
|
11643
|
+
#
|
11644
|
+
# - `virtual_functions_configuration`
|
11645
|
+
#
|
11646
|
+
# For example, to retrieve the complete representation of network interface '456' of host '123':
|
11647
|
+
#
|
11648
|
+
# ....
|
11649
|
+
# GET /ovirt-engine/api/hosts/123/nics?all_content=true
|
11650
|
+
# ....
|
11651
|
+
#
|
11652
|
+
# NOTE: These attributes are not included by default because retrieving them impacts performance. They are
|
11653
|
+
# seldom used and require additional queries to the database. Use this parameter with caution and only when
|
11654
|
+
# specifically required.
|
11655
|
+
#
|
11243
11656
|
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
11244
11657
|
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
11245
11658
|
#
|
@@ -11600,6 +12013,7 @@ module OvirtSDK4
|
|
11600
12013
|
LIST = [
|
11601
12014
|
[:all_content, TrueClass].freeze,
|
11602
12015
|
[:case_sensitive, TrueClass].freeze,
|
12016
|
+
[:check_vms_in_affinity_closure, TrueClass].freeze,
|
11603
12017
|
[:filter, TrueClass].freeze,
|
11604
12018
|
[:follow, String].freeze,
|
11605
12019
|
[:max, Integer].freeze,
|
@@ -11658,6 +12072,20 @@ module OvirtSDK4
|
|
11658
12072
|
# account. The default value is `true`, which means that case is taken into account. If you want to search
|
11659
12073
|
# ignoring case set it to `false`.
|
11660
12074
|
#
|
12075
|
+
# @option opts [Boolean] :check_vms_in_affinity_closure This parameter can be used with `migration_target_of`
|
12076
|
+
# to get valid migration targets for the listed virtual machines
|
12077
|
+
# and all other virtual machines that are in positive enforcing
|
12078
|
+
# affinity with the listed virtual machines.
|
12079
|
+
#
|
12080
|
+
# This is useful in case the virtual machines will be migrated
|
12081
|
+
# together with others in positive affinity groups.
|
12082
|
+
#
|
12083
|
+
# The default value is `false`.
|
12084
|
+
#
|
12085
|
+
# ....
|
12086
|
+
# GET /ovirt-engine/api/hosts?migration_target_of=123,456&check_vms_in_affinity_closure=true
|
12087
|
+
# ....
|
12088
|
+
#
|
11661
12089
|
# @option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.
|
11662
12090
|
#
|
11663
12091
|
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
@@ -15225,7 +15653,7 @@ module OvirtSDK4
|
|
15225
15653
|
#
|
15226
15654
|
# [source]
|
15227
15655
|
# ----
|
15228
|
-
# DELETE /ovirt-engine/api/networks/123/
|
15656
|
+
# DELETE /ovirt-engine/api/networks/123/networklabels/exemplary
|
15229
15657
|
# ----
|
15230
15658
|
#
|
15231
15659
|
# @param opts [Hash] Additional options.
|
@@ -15277,14 +15705,14 @@ module OvirtSDK4
|
|
15277
15705
|
#
|
15278
15706
|
# [source]
|
15279
15707
|
# ----
|
15280
|
-
# POST /ovirt-engine/api/networks/123/
|
15708
|
+
# POST /ovirt-engine/api/networks/123/networklabels
|
15281
15709
|
# ----
|
15282
15710
|
#
|
15283
15711
|
# With a request body like this:
|
15284
15712
|
#
|
15285
15713
|
# [source,xml]
|
15286
15714
|
# ----
|
15287
|
-
# <
|
15715
|
+
# <network_label id="mylabel"/>
|
15288
15716
|
# ----
|
15289
15717
|
#
|
15290
15718
|
# @param label [NetworkLabel] The `label` to add.
|
@@ -28770,6 +29198,7 @@ module OvirtSDK4
|
|
28770
29198
|
[:cluster, Cluster].freeze,
|
28771
29199
|
[:force, TrueClass].freeze,
|
28772
29200
|
[:host, Host].freeze,
|
29201
|
+
[:migrate_vms_in_affinity_closure, TrueClass].freeze,
|
28773
29202
|
].freeze
|
28774
29203
|
|
28775
29204
|
private_constant :MIGRATE
|
@@ -28810,6 +29239,11 @@ module OvirtSDK4
|
|
28810
29239
|
# the {engine-name} automatically selects a default host for migration within the same cluster. If an API user
|
28811
29240
|
# requires a specific host, the user can specify the host with either an `id` or `name` parameter.
|
28812
29241
|
#
|
29242
|
+
# @option opts [Boolean] :migrate_vms_in_affinity_closure Migrate also all other virtual machines in positive enforcing affinity groups with this virtual machine,
|
29243
|
+
# that are running on the same host.
|
29244
|
+
#
|
29245
|
+
# The default value is `false`.
|
29246
|
+
#
|
28813
29247
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
28814
29248
|
#
|
28815
29249
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -29052,6 +29486,7 @@ module OvirtSDK4
|
|
29052
29486
|
[:filter, TrueClass].freeze,
|
29053
29487
|
[:pause, TrueClass].freeze,
|
29054
29488
|
[:use_cloud_init, TrueClass].freeze,
|
29489
|
+
[:use_initialization, TrueClass].freeze,
|
29055
29490
|
[:use_sysprep, TrueClass].freeze,
|
29056
29491
|
[:vm, Vm].freeze,
|
29057
29492
|
[:volatile, TrueClass].freeze,
|
@@ -29092,6 +29527,12 @@ module OvirtSDK4
|
|
29092
29527
|
# @option opts [Boolean] :use_cloud_init If set to `true`, the initialization type is set to _cloud-init_. The default value is `false`.
|
29093
29528
|
# See https://cloudinit.readthedocs.io/en/latest[this] for details.
|
29094
29529
|
#
|
29530
|
+
# @option opts [Boolean] :use_initialization If set to `true`, the initialization type is set by the VM's OS.
|
29531
|
+
# Windows will set to _Sysprep_, Linux to _cloud-init_ and RedHat CoreOS to _Ignition_.
|
29532
|
+
# If any of the initialization-types are explicitly set (useCloudInit, useSysprep or useIgnition),
|
29533
|
+
# they will be prioritized and this flag will be ignored.
|
29534
|
+
# The default value is `false`.
|
29535
|
+
#
|
29095
29536
|
# @option opts [Boolean] :use_sysprep If set to `true`, the initialization type is set to _Sysprep_. The default value is `false`.
|
29096
29537
|
# See https://en.wikipedia.org/wiki/Sysprep[this] for details.
|
29097
29538
|
#
|
@@ -36405,6 +36846,7 @@ module OvirtSDK4
|
|
36405
36846
|
|
36406
36847
|
REMOVE = [
|
36407
36848
|
[:async, TrueClass].freeze,
|
36849
|
+
[:force, TrueClass].freeze,
|
36408
36850
|
].freeze
|
36409
36851
|
|
36410
36852
|
private_constant :REMOVE
|
@@ -36432,6 +36874,8 @@ module OvirtSDK4
|
|
36432
36874
|
# @param opts [Hash] Additional options.
|
36433
36875
|
#
|
36434
36876
|
# @option opts [Boolean] :async Indicates if the remove should be performed asynchronously.
|
36877
|
+
# @option opts [Boolean] :force Indicates that the host should be removed even if it is non-responsive,
|
36878
|
+
# or if it is part of a Gluster Storage cluster and has volume bricks on it.
|
36435
36879
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
36436
36880
|
#
|
36437
36881
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -36796,6 +37240,7 @@ module OvirtSDK4
|
|
36796
37240
|
[:async, TrueClass].freeze,
|
36797
37241
|
[:image, String].freeze,
|
36798
37242
|
[:reboot, TrueClass].freeze,
|
37243
|
+
[:timeout, Integer].freeze,
|
36799
37244
|
].freeze
|
36800
37245
|
|
36801
37246
|
private_constant :UPGRADE
|
@@ -36815,6 +37260,11 @@ module OvirtSDK4
|
|
36815
37260
|
#
|
36816
37261
|
# NOTE: This parameter is ignored for {hypervisor-name}, which is always rebooted after upgrade.
|
36817
37262
|
#
|
37263
|
+
# @option opts [Integer] :timeout Upgrade timeout.
|
37264
|
+
#
|
37265
|
+
# The maximum time to wait for upgrade to finish in minutes.
|
37266
|
+
# Default value is specified by `ANSIBLE_PLAYBOOK_EXEC_DEFAULT_TIMEOUT` configration option.
|
37267
|
+
#
|
36818
37268
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
36819
37269
|
#
|
36820
37270
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -37345,6 +37795,7 @@ module OvirtSDK4
|
|
37345
37795
|
class HostNicService < MeasurableService
|
37346
37796
|
|
37347
37797
|
GET = [
|
37798
|
+
[:all_content, TrueClass].freeze,
|
37348
37799
|
[:follow, String].freeze,
|
37349
37800
|
].freeze
|
37350
37801
|
|
@@ -37355,6 +37806,22 @@ module OvirtSDK4
|
|
37355
37806
|
#
|
37356
37807
|
# @param opts [Hash] Additional options.
|
37357
37808
|
#
|
37809
|
+
# @option opts [Boolean] :all_content Indicates if all of the attributes of the host network interface should be included in the response.
|
37810
|
+
#
|
37811
|
+
# By default the following attributes are excluded:
|
37812
|
+
#
|
37813
|
+
# - `virtual_functions_configuration`
|
37814
|
+
#
|
37815
|
+
# For example, to retrieve the complete representation network interface '456' of host '123':
|
37816
|
+
#
|
37817
|
+
# ....
|
37818
|
+
# GET /ovirt-engine/api/hosts/123/nics/456?all_content=true
|
37819
|
+
# ....
|
37820
|
+
#
|
37821
|
+
# NOTE: These attributes are not included by default because retrieving them impacts performance. They are
|
37822
|
+
# seldom used and require additional queries to the database. Use this parameter with caution and only when
|
37823
|
+
# specifically required.
|
37824
|
+
#
|
37358
37825
|
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
37359
37826
|
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
37360
37827
|
#
|