ovirt-engine-sdk 4.0.0.alpha12 → 4.0.0.alpha13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +2 -1
- data/lib/ovirtsdk4/http.rb +28 -34
- data/lib/ovirtsdk4/reader.rb +17 -17
- data/lib/ovirtsdk4/readers.rb +412 -180
- data/lib/ovirtsdk4/service.rb +6 -6
- data/lib/ovirtsdk4/services.rb +8451 -3621
- data/lib/ovirtsdk4/type.rb +8 -8
- data/lib/ovirtsdk4/types.rb +13533 -11515
- data/lib/ovirtsdk4/version.rb +3 -3
- data/lib/ovirtsdk4/writer.rb +12 -12
- data/lib/ovirtsdk4/writers.rb +163 -91
- data/lib/ovirtsdk4.rb +5 -5
- metadata +2 -2
data/lib/ovirtsdk4/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#
|
2
2
|
# Copyright (c) 2015-2016 Red Hat, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -12,9 +12,9 @@
|
|
12
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
13
|
# See the License for the specific language governing permissions and
|
14
14
|
# limitations under the License.
|
15
|
-
|
15
|
+
#
|
16
16
|
|
17
17
|
|
18
18
|
module OvirtSDK4
|
19
|
-
VERSION = '4.0.0.
|
19
|
+
VERSION = '4.0.0.alpha13'
|
20
20
|
end
|
data/lib/ovirtsdk4/writer.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#
|
2
2
|
# Copyright (c) 2015-2016 Red Hat, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -12,11 +12,11 @@
|
|
12
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
13
|
# See the License for the specific language governing permissions and
|
14
14
|
# limitations under the License.
|
15
|
-
|
15
|
+
#
|
16
16
|
|
17
17
|
module OvirtSDK4
|
18
18
|
|
19
|
-
|
19
|
+
#
|
20
20
|
# This is the base class for all the XML writers used by the SDK. It contains the utility methods used by
|
21
21
|
# all of them.
|
22
22
|
#
|
@@ -24,7 +24,7 @@ module OvirtSDK4
|
|
24
24
|
#
|
25
25
|
class Writer
|
26
26
|
|
27
|
-
|
27
|
+
#
|
28
28
|
# Writes an element with the given name and string value.
|
29
29
|
#
|
30
30
|
# @param writer [XmlWriter]
|
@@ -35,7 +35,7 @@ module OvirtSDK4
|
|
35
35
|
writer.write_element(name, value)
|
36
36
|
end
|
37
37
|
|
38
|
-
|
38
|
+
#
|
39
39
|
# Converts the given boolean value to an string.
|
40
40
|
#
|
41
41
|
# @param value [Boolean]
|
@@ -49,7 +49,7 @@ module OvirtSDK4
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
#
|
53
53
|
# Writes an element with the given name and boolean value.
|
54
54
|
#
|
55
55
|
# @param writer [XmlWriter]
|
@@ -60,7 +60,7 @@ module OvirtSDK4
|
|
60
60
|
writer.write_element(name, Writer.render_boolean(value))
|
61
61
|
end
|
62
62
|
|
63
|
-
|
63
|
+
#
|
64
64
|
# Converts the given integer value to an string.
|
65
65
|
#
|
66
66
|
# @param value [Integer]
|
@@ -70,7 +70,7 @@ module OvirtSDK4
|
|
70
70
|
return value.to_s
|
71
71
|
end
|
72
72
|
|
73
|
-
|
73
|
+
#
|
74
74
|
# Writes an element with the given name and integer value.
|
75
75
|
#
|
76
76
|
# @param writer [XmlWriter]
|
@@ -81,7 +81,7 @@ module OvirtSDK4
|
|
81
81
|
writer.write_element(name, Writer.render_integer(value))
|
82
82
|
end
|
83
83
|
|
84
|
-
|
84
|
+
#
|
85
85
|
# Converts the given decimal value to an string.
|
86
86
|
#
|
87
87
|
# @param value [Fixnum]
|
@@ -91,7 +91,7 @@ module OvirtSDK4
|
|
91
91
|
return value.to_s
|
92
92
|
end
|
93
93
|
|
94
|
-
|
94
|
+
#
|
95
95
|
# Writes an element with the given name and decimal value.
|
96
96
|
#
|
97
97
|
# @param writer [XmlWriter]
|
@@ -102,7 +102,7 @@ module OvirtSDK4
|
|
102
102
|
writer.write_element(name, Writer.render_decimal(value))
|
103
103
|
end
|
104
104
|
|
105
|
-
|
105
|
+
#
|
106
106
|
# Converts the given date value to an string.
|
107
107
|
#
|
108
108
|
# @param value [DateTime]
|
@@ -112,7 +112,7 @@ module OvirtSDK4
|
|
112
112
|
return value.xmlschema
|
113
113
|
end
|
114
114
|
|
115
|
-
|
115
|
+
#
|
116
116
|
# Writes an element with the given name and date value.
|
117
117
|
#
|
118
118
|
# @param writer [XmlWriter]
|
data/lib/ovirtsdk4/writers.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#
|
2
2
|
# Copyright (c) 2015-2016 Red Hat, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -12,7 +12,7 @@
|
|
12
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
13
|
# See the License for the specific language governing permissions and
|
14
14
|
# limitations under the License.
|
15
|
-
|
15
|
+
#
|
16
16
|
|
17
17
|
|
18
18
|
module OvirtSDK4
|
@@ -34,6 +34,7 @@ module OvirtSDK4
|
|
34
34
|
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
35
35
|
Writer.write_integer(writer, 'connectivity_timeout', object.connectivity_timeout) unless object.connectivity_timeout.nil?
|
36
36
|
DataCenterWriter.write_one(object.data_center, writer, 'data_center') unless object.data_center.nil?
|
37
|
+
Writer.write_boolean(writer, 'deploy_hosted_engine', object.deploy_hosted_engine) unless object.deploy_hosted_engine.nil?
|
37
38
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
38
39
|
GlusterVolumeProfileDetailsWriter.write_one(object.details, writer, 'details') unless object.details.nil?
|
39
40
|
Writer.write_boolean(writer, 'discard_snapshots', object.discard_snapshots) unless object.discard_snapshots.nil?
|
@@ -63,7 +64,7 @@ module OvirtSDK4
|
|
63
64
|
LogicalUnitWriter.write_many(object.logical_units, writer, 'logical_unit', 'logical_units') unless object.logical_units.nil?
|
64
65
|
Writer.write_boolean(writer, 'maintenance_enabled', object.maintenance_enabled) unless object.maintenance_enabled.nil?
|
65
66
|
HostNicWriter.write_many(object.modified_bonds, writer, 'modified_bond', 'modified_bonds') unless object.modified_bonds.nil?
|
66
|
-
|
67
|
+
NetworkLabelWriter.write_many(object.modified_labels, writer, 'modified_label', 'modified_labels') unless object.modified_labels.nil?
|
67
68
|
NetworkAttachmentWriter.write_many(object.modified_network_attachments, writer, 'modified_network_attachment', 'modified_network_attachments') unless object.modified_network_attachments.nil?
|
68
69
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
69
70
|
OptionWriter.write_one(object.option, writer, 'option') unless object.option.nil?
|
@@ -72,14 +73,14 @@ module OvirtSDK4
|
|
72
73
|
ProxyTicketWriter.write_one(object.proxy_ticket, writer, 'proxy_ticket') unless object.proxy_ticket.nil?
|
73
74
|
Writer.write_string(writer, 'reason', object.reason) unless object.reason.nil?
|
74
75
|
HostNicWriter.write_many(object.removed_bonds, writer, 'removed_bond', 'removed_bonds') unless object.removed_bonds.nil?
|
75
|
-
|
76
|
+
NetworkLabelWriter.write_many(object.removed_labels, writer, 'removed_label', 'removed_labels') unless object.removed_labels.nil?
|
76
77
|
NetworkAttachmentWriter.write_many(object.removed_network_attachments, writer, 'removed_network_attachment', 'removed_network_attachments') unless object.removed_network_attachments.nil?
|
77
78
|
Writer.write_string(writer, 'resolution_type', object.resolution_type) unless object.resolution_type.nil?
|
78
79
|
Writer.write_boolean(writer, 'restore_memory', object.restore_memory) unless object.restore_memory.nil?
|
79
80
|
Writer.write_string(writer, 'root_password', object.root_password) unless object.root_password.nil?
|
80
81
|
SnapshotWriter.write_one(object.snapshot, writer, 'snapshot') unless object.snapshot.nil?
|
81
82
|
SshWriter.write_one(object.ssh, writer, 'ssh') unless object.ssh.nil?
|
82
|
-
|
83
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
83
84
|
Writer.write_boolean(writer, 'stop_gluster_service', object.stop_gluster_service) unless object.stop_gluster_service.nil?
|
84
85
|
StorageDomainWriter.write_one(object.storage_domain, writer, 'storage_domain') unless object.storage_domain.nil?
|
85
86
|
StorageDomainWriter.write_many(object.storage_domains, writer, 'storage_domain', 'storage_domains') unless object.storage_domains.nil?
|
@@ -87,6 +88,7 @@ module OvirtSDK4
|
|
87
88
|
NetworkAttachmentWriter.write_many(object.synchronized_network_attachments, writer, 'synchronized_network_attachment', 'synchronized_network_attachments') unless object.synchronized_network_attachments.nil?
|
88
89
|
TemplateWriter.write_one(object.template, writer, 'template') unless object.template.nil?
|
89
90
|
TicketWriter.write_one(object.ticket, writer, 'ticket') unless object.ticket.nil?
|
91
|
+
Writer.write_boolean(writer, 'undeploy_hosted_engine', object.undeploy_hosted_engine) unless object.undeploy_hosted_engine.nil?
|
90
92
|
Writer.write_boolean(writer, 'use_cloud_init', object.use_cloud_init) unless object.use_cloud_init.nil?
|
91
93
|
Writer.write_boolean(writer, 'use_sysprep', object.use_sysprep) unless object.use_sysprep.nil?
|
92
94
|
HostNicVirtualFunctionsConfigurationWriter.write_one(object.virtual_functions_configuration, writer, 'virtual_functions_configuration') unless object.virtual_functions_configuration.nil?
|
@@ -143,6 +145,39 @@ module OvirtSDK4
|
|
143
145
|
|
144
146
|
end
|
145
147
|
|
148
|
+
class AffinityLabelWriter < Writer # :nodoc:
|
149
|
+
|
150
|
+
def self.write_one(object, writer, singular = nil)
|
151
|
+
singular ||= 'affinity-label'
|
152
|
+
writer.write_start(singular)
|
153
|
+
href = object.href
|
154
|
+
writer.write_attribute('href', href) unless href.nil?
|
155
|
+
writer.write_attribute('id', object.id) unless object.id.nil?
|
156
|
+
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
157
|
+
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
158
|
+
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
159
|
+
Writer.write_boolean(writer, 'read_only', object.read_only) unless object.read_only.nil?
|
160
|
+
HostWriter.write_many(object.hosts, writer, 'host', 'hosts') unless object.hosts.nil?
|
161
|
+
VmWriter.write_many(object.vms, writer, 'vm', 'vms') unless object.vms.nil?
|
162
|
+
writer.write_end
|
163
|
+
end
|
164
|
+
|
165
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
166
|
+
singular ||= 'affinity-label'
|
167
|
+
plural ||= 'affinity-labels'
|
168
|
+
writer.write_start(plural)
|
169
|
+
if list.is_a?(List)
|
170
|
+
href = list.href
|
171
|
+
writer.write_attribute('href', href) unless href.nil?
|
172
|
+
end
|
173
|
+
list.each do |item|
|
174
|
+
write_one(item, writer, singular)
|
175
|
+
end
|
176
|
+
writer.write_end
|
177
|
+
end
|
178
|
+
|
179
|
+
end
|
180
|
+
|
146
181
|
class AgentWriter < Writer # :nodoc:
|
147
182
|
|
148
183
|
def self.write_one(object, writer, singular = nil)
|
@@ -1008,11 +1043,10 @@ module OvirtSDK4
|
|
1008
1043
|
Writer.write_boolean(writer, 'local', object.local) unless object.local.nil?
|
1009
1044
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
1010
1045
|
Writer.write_string(writer, 'quota_mode', object.quota_mode) unless object.quota_mode.nil?
|
1011
|
-
|
1046
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
1012
1047
|
Writer.write_string(writer, 'storage_format', object.storage_format) unless object.storage_format.nil?
|
1013
1048
|
VersionWriter.write_many(object.supported_versions, writer, 'supported_version', 'supported_versions') unless object.supported_versions.nil?
|
1014
1049
|
VersionWriter.write_one(object.version, writer, 'version') unless object.version.nil?
|
1015
|
-
MacPoolWriter.write_one(object.mac_pool, writer, 'mac_pool') unless object.mac_pool.nil?
|
1016
1050
|
writer.write_end
|
1017
1051
|
end
|
1018
1052
|
|
@@ -1093,7 +1127,7 @@ module OvirtSDK4
|
|
1093
1127
|
Writer.write_boolean(writer, 'shareable', object.shareable) unless object.shareable.nil?
|
1094
1128
|
Writer.write_boolean(writer, 'sparse', object.sparse) unless object.sparse.nil?
|
1095
1129
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
1096
|
-
|
1130
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
1097
1131
|
Writer.write_string(writer, 'storage_type', object.storage_type) unless object.storage_type.nil?
|
1098
1132
|
Writer.write_boolean(writer, 'uses_scsi_reservation', object.uses_scsi_reservation) unless object.uses_scsi_reservation.nil?
|
1099
1133
|
Writer.write_boolean(writer, 'wipe_after_delete', object.wipe_after_delete) unless object.wipe_after_delete.nil?
|
@@ -1126,6 +1160,40 @@ module OvirtSDK4
|
|
1126
1160
|
|
1127
1161
|
end
|
1128
1162
|
|
1163
|
+
class DiskAttachmentWriter < Writer # :nodoc:
|
1164
|
+
|
1165
|
+
def self.write_one(object, writer, singular = nil)
|
1166
|
+
singular ||= 'disk-attachment'
|
1167
|
+
writer.write_start(singular)
|
1168
|
+
href = object.href
|
1169
|
+
writer.write_attribute('href', href) unless href.nil?
|
1170
|
+
writer.write_attribute('id', object.id) unless object.id.nil?
|
1171
|
+
Writer.write_boolean(writer, 'bootable', object.bootable) unless object.bootable.nil?
|
1172
|
+
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
1173
|
+
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
1174
|
+
Writer.write_string(writer, 'interface', object.interface) unless object.interface.nil?
|
1175
|
+
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
1176
|
+
DiskWriter.write_one(object.disk, writer, 'disk') unless object.disk.nil?
|
1177
|
+
VmWriter.write_one(object.vm, writer, 'vm') unless object.vm.nil?
|
1178
|
+
writer.write_end
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
1182
|
+
singular ||= 'disk-attachment'
|
1183
|
+
plural ||= 'disk-attachments'
|
1184
|
+
writer.write_start(plural)
|
1185
|
+
if list.is_a?(List)
|
1186
|
+
href = list.href
|
1187
|
+
writer.write_attribute('href', href) unless href.nil?
|
1188
|
+
end
|
1189
|
+
list.each do |item|
|
1190
|
+
write_one(item, writer, singular)
|
1191
|
+
end
|
1192
|
+
writer.write_end
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
end
|
1196
|
+
|
1129
1197
|
class DiskProfileWriter < Writer # :nodoc:
|
1130
1198
|
|
1131
1199
|
def self.write_one(object, writer, singular = nil)
|
@@ -1185,7 +1253,7 @@ module OvirtSDK4
|
|
1185
1253
|
Writer.write_boolean(writer, 'shareable', object.shareable) unless object.shareable.nil?
|
1186
1254
|
Writer.write_boolean(writer, 'sparse', object.sparse) unless object.sparse.nil?
|
1187
1255
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
1188
|
-
|
1256
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
1189
1257
|
Writer.write_string(writer, 'storage_type', object.storage_type) unless object.storage_type.nil?
|
1190
1258
|
Writer.write_boolean(writer, 'uses_scsi_reservation', object.uses_scsi_reservation) unless object.uses_scsi_reservation.nil?
|
1191
1259
|
Writer.write_boolean(writer, 'wipe_after_delete', object.wipe_after_delete) unless object.wipe_after_delete.nil?
|
@@ -1830,7 +1898,7 @@ module OvirtSDK4
|
|
1830
1898
|
Writer.write_integer(writer, 'pid', object.pid) unless object.pid.nil?
|
1831
1899
|
Writer.write_integer(writer, 'port', object.port) unless object.port.nil?
|
1832
1900
|
Writer.write_string(writer, 'server_id', object.server_id) unless object.server_id.nil?
|
1833
|
-
|
1901
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
1834
1902
|
GlusterVolumeWriter.write_one(object.gluster_volume, writer, 'gluster_volume') unless object.gluster_volume.nil?
|
1835
1903
|
InstanceTypeWriter.write_one(object.instance_type, writer, 'instance_type') unless object.instance_type.nil?
|
1836
1904
|
TemplateWriter.write_one(object.template, writer, 'template') unless object.template.nil?
|
@@ -1971,7 +2039,7 @@ module OvirtSDK4
|
|
1971
2039
|
Writer.write_string(writer, 'gluster_command', object.gluster_command) unless object.gluster_command.nil?
|
1972
2040
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
1973
2041
|
Writer.write_string(writer, 'stage', object.stage) unless object.stage.nil?
|
1974
|
-
|
2042
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
1975
2043
|
ClusterWriter.write_one(object.cluster, writer, 'cluster') unless object.cluster.nil?
|
1976
2044
|
GlusterServerHookWriter.write_many(object.server_hooks, writer, 'server_hook', 'server_hooks') unless object.server_hooks.nil?
|
1977
2045
|
writer.write_end
|
@@ -2044,7 +2112,7 @@ module OvirtSDK4
|
|
2044
2112
|
Writer.write_string(writer, 'content_type', object.content_type) unless object.content_type.nil?
|
2045
2113
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
2046
2114
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
2047
|
-
|
2115
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
2048
2116
|
HostWriter.write_one(object.host, writer, 'host') unless object.host.nil?
|
2049
2117
|
writer.write_end
|
2050
2118
|
end
|
@@ -2080,7 +2148,7 @@ module OvirtSDK4
|
|
2080
2148
|
OptionWriter.write_many(object.options, writer, 'option', 'options') unless object.options.nil?
|
2081
2149
|
Writer.write_integer(writer, 'redundancy_count', object.redundancy_count) unless object.redundancy_count.nil?
|
2082
2150
|
Writer.write_integer(writer, 'replica_count', object.replica_count) unless object.replica_count.nil?
|
2083
|
-
|
2151
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
2084
2152
|
Writer.write_integer(writer, 'stripe_count', object.stripe_count) unless object.stripe_count.nil?
|
2085
2153
|
if not object.transport_types.nil? and not object.transport_types.empty? then
|
2086
2154
|
writer.write_start('transport_types')
|
@@ -2389,7 +2457,7 @@ module OvirtSDK4
|
|
2389
2457
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
2390
2458
|
HostDevicePassthroughWriter.write_one(object.device_passthrough, writer, 'device_passthrough') unless object.device_passthrough.nil?
|
2391
2459
|
DisplayWriter.write_one(object.display, writer, 'display') unless object.display.nil?
|
2392
|
-
|
2460
|
+
Writer.write_string(writer, 'external_status', object.external_status) unless object.external_status.nil?
|
2393
2461
|
HardwareInformationWriter.write_one(object.hardware_information, writer, 'hardware_information') unless object.hardware_information.nil?
|
2394
2462
|
HostedEngineWriter.write_one(object.hosted_engine, writer, 'hosted_engine') unless object.hosted_engine.nil?
|
2395
2463
|
IscsiDetailsWriter.write_one(object.iscsi, writer, 'iscsi') unless object.iscsi.nil?
|
@@ -2407,11 +2475,12 @@ module OvirtSDK4
|
|
2407
2475
|
PowerManagementWriter.write_one(object.power_management, writer, 'power_management') unless object.power_management.nil?
|
2408
2476
|
Writer.write_string(writer, 'protocol', object.protocol) unless object.protocol.nil?
|
2409
2477
|
Writer.write_string(writer, 'root_password', object.root_password) unless object.root_password.nil?
|
2410
|
-
SeLinuxWriter.write_one(object.
|
2478
|
+
SeLinuxWriter.write_one(object.se_linux, writer, 'se_linux') unless object.se_linux.nil?
|
2411
2479
|
SpmWriter.write_one(object.spm, writer, 'spm') unless object.spm.nil?
|
2412
2480
|
SshWriter.write_one(object.ssh, writer, 'ssh') unless object.ssh.nil?
|
2413
2481
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
2414
|
-
|
2482
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
2483
|
+
Writer.write_string(writer, 'status_detail', object.status_detail) unless object.status_detail.nil?
|
2415
2484
|
VmSummaryWriter.write_one(object.summary, writer, 'summary') unless object.summary.nil?
|
2416
2485
|
TransparentHugePagesWriter.write_one(object.transparent_huge_pages, writer, 'transparent_hugepages') unless object.transparent_huge_pages.nil?
|
2417
2486
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
@@ -2526,15 +2595,15 @@ module OvirtSDK4
|
|
2526
2595
|
IpWriter.write_one(object.ip, writer, 'ip') unless object.ip.nil?
|
2527
2596
|
IpWriter.write_one(object.ipv6, writer, 'ipv6') unless object.ipv6.nil?
|
2528
2597
|
Writer.write_string(writer, 'ipv6_boot_protocol', object.ipv6_boot_protocol) unless object.ipv6_boot_protocol.nil?
|
2529
|
-
LabelWriter.write_many(object.labels, writer, 'label', 'labels') unless object.labels.nil?
|
2530
2598
|
MacWriter.write_one(object.mac, writer, 'mac') unless object.mac.nil?
|
2531
2599
|
Writer.write_integer(writer, 'mtu', object.mtu) unless object.mtu.nil?
|
2532
2600
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
2601
|
+
NetworkLabelWriter.write_many(object.network_labels, writer, 'network_label', 'network_labels') unless object.network_labels.nil?
|
2533
2602
|
Writer.write_boolean(writer, 'override_configuration', object.override_configuration) unless object.override_configuration.nil?
|
2534
2603
|
PropertyWriter.write_many(object.properties, writer, 'property', 'properties') unless object.properties.nil?
|
2535
2604
|
Writer.write_integer(writer, 'speed', object.speed) unless object.speed.nil?
|
2536
2605
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
2537
|
-
|
2606
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
2538
2607
|
HostNicVirtualFunctionsConfigurationWriter.write_one(object.virtual_functions_configuration, writer, 'virtual_functions_configuration') unless object.virtual_functions_configuration.nil?
|
2539
2608
|
VlanWriter.write_one(object.vlan, writer, 'vlan') unless object.vlan.nil?
|
2540
2609
|
HostWriter.write_one(object.host, writer, 'host') unless object.host.nil?
|
@@ -2847,7 +2916,7 @@ module OvirtSDK4
|
|
2847
2916
|
SsoWriter.write_one(object.sso, writer, 'sso') unless object.sso.nil?
|
2848
2917
|
Writer.write_boolean(writer, 'start_paused', object.start_paused) unless object.start_paused.nil?
|
2849
2918
|
Writer.write_boolean(writer, 'stateless', object.stateless) unless object.stateless.nil?
|
2850
|
-
|
2919
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
2851
2920
|
TimeZoneWriter.write_one(object.time_zone, writer, 'time_zone') unless object.time_zone.nil?
|
2852
2921
|
Writer.write_boolean(writer, 'tunnel_migration', object.tunnel_migration) unless object.tunnel_migration.nil?
|
2853
2922
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
@@ -3054,7 +3123,7 @@ module OvirtSDK4
|
|
3054
3123
|
Writer.write_date(writer, 'last_updated', object.last_updated) unless object.last_updated.nil?
|
3055
3124
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
3056
3125
|
Writer.write_date(writer, 'start_time', object.start_time) unless object.start_time.nil?
|
3057
|
-
|
3126
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
3058
3127
|
UserWriter.write_one(object.owner, writer, 'owner') unless object.owner.nil?
|
3059
3128
|
writer.write_end
|
3060
3129
|
end
|
@@ -3169,38 +3238,6 @@ module OvirtSDK4
|
|
3169
3238
|
|
3170
3239
|
end
|
3171
3240
|
|
3172
|
-
class LabelWriter < Writer # :nodoc:
|
3173
|
-
|
3174
|
-
def self.write_one(object, writer, singular = nil)
|
3175
|
-
singular ||= 'label'
|
3176
|
-
writer.write_start(singular)
|
3177
|
-
href = object.href
|
3178
|
-
writer.write_attribute('href', href) unless href.nil?
|
3179
|
-
writer.write_attribute('id', object.id) unless object.id.nil?
|
3180
|
-
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
3181
|
-
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
3182
|
-
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
3183
|
-
HostNicWriter.write_one(object.host_nic, writer, 'host_nic') unless object.host_nic.nil?
|
3184
|
-
NetworkWriter.write_one(object.network, writer, 'network') unless object.network.nil?
|
3185
|
-
writer.write_end
|
3186
|
-
end
|
3187
|
-
|
3188
|
-
def self.write_many(list, writer, singular = nil, plural = nil)
|
3189
|
-
singular ||= 'label'
|
3190
|
-
plural ||= 'labels'
|
3191
|
-
writer.write_start(plural)
|
3192
|
-
if list.is_a?(List)
|
3193
|
-
href = list.href
|
3194
|
-
writer.write_attribute('href', href) unless href.nil?
|
3195
|
-
end
|
3196
|
-
list.each do |item|
|
3197
|
-
write_one(item, writer, singular)
|
3198
|
-
end
|
3199
|
-
writer.write_end
|
3200
|
-
end
|
3201
|
-
|
3202
|
-
end
|
3203
|
-
|
3204
3241
|
class LogicalUnitWriter < Writer # :nodoc:
|
3205
3242
|
|
3206
3243
|
def self.write_one(object, writer, singular = nil)
|
@@ -3388,6 +3425,34 @@ module OvirtSDK4
|
|
3388
3425
|
|
3389
3426
|
end
|
3390
3427
|
|
3428
|
+
class MigrationBandwidthWriter < Writer # :nodoc:
|
3429
|
+
|
3430
|
+
def self.write_one(object, writer, singular = nil)
|
3431
|
+
singular ||= 'migration-bandwidth'
|
3432
|
+
writer.write_start(singular)
|
3433
|
+
href = object.href
|
3434
|
+
writer.write_attribute('href', href) unless href.nil?
|
3435
|
+
Writer.write_string(writer, 'assignment_method', object.assignment_method) unless object.assignment_method.nil?
|
3436
|
+
Writer.write_integer(writer, 'custom_value', object.custom_value) unless object.custom_value.nil?
|
3437
|
+
writer.write_end
|
3438
|
+
end
|
3439
|
+
|
3440
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
3441
|
+
singular ||= 'migration-bandwidth'
|
3442
|
+
plural ||= 'migration-bandwidths'
|
3443
|
+
writer.write_start(plural)
|
3444
|
+
if list.is_a?(List)
|
3445
|
+
href = list.href
|
3446
|
+
writer.write_attribute('href', href) unless href.nil?
|
3447
|
+
end
|
3448
|
+
list.each do |item|
|
3449
|
+
write_one(item, writer, singular)
|
3450
|
+
end
|
3451
|
+
writer.write_end
|
3452
|
+
end
|
3453
|
+
|
3454
|
+
end
|
3455
|
+
|
3391
3456
|
class MigrationOptionsWriter < Writer # :nodoc:
|
3392
3457
|
|
3393
3458
|
def self.write_one(object, writer, singular = nil)
|
@@ -3396,6 +3461,7 @@ module OvirtSDK4
|
|
3396
3461
|
href = object.href
|
3397
3462
|
writer.write_attribute('href', href) unless href.nil?
|
3398
3463
|
Writer.write_string(writer, 'auto_converge', object.auto_converge) unless object.auto_converge.nil?
|
3464
|
+
MigrationBandwidthWriter.write_one(object.bandwidth, writer, 'bandwidth') unless object.bandwidth.nil?
|
3399
3465
|
Writer.write_string(writer, 'compressed', object.compressed) unless object.compressed.nil?
|
3400
3466
|
MigrationPolicyWriter.write_one(object.policy, writer, 'policy') unless object.policy.nil?
|
3401
3467
|
writer.write_end
|
@@ -3459,12 +3525,12 @@ module OvirtSDK4
|
|
3459
3525
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
3460
3526
|
Writer.write_boolean(writer, 'display', object.display) unless object.display.nil?
|
3461
3527
|
IpWriter.write_one(object.ip, writer, 'ip') unless object.ip.nil?
|
3462
|
-
LabelWriter.write_many(object.labels, writer, 'label', 'labels') unless object.labels.nil?
|
3463
3528
|
Writer.write_integer(writer, 'mtu', object.mtu) unless object.mtu.nil?
|
3464
3529
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
3530
|
+
NetworkLabelWriter.write_many(object.network_labels, writer, 'network_label', 'network_labels') unless object.network_labels.nil?
|
3465
3531
|
Writer.write_boolean(writer, 'profile_required', object.profile_required) unless object.profile_required.nil?
|
3466
3532
|
Writer.write_boolean(writer, 'required', object.required) unless object.required.nil?
|
3467
|
-
|
3533
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
3468
3534
|
Writer.write_boolean(writer, 'stp', object.stp) unless object.stp.nil?
|
3469
3535
|
if not object.usages.nil? and not object.usages.empty? then
|
3470
3536
|
writer.write_start('usages')
|
@@ -3593,6 +3659,38 @@ module OvirtSDK4
|
|
3593
3659
|
|
3594
3660
|
end
|
3595
3661
|
|
3662
|
+
class NetworkLabelWriter < Writer # :nodoc:
|
3663
|
+
|
3664
|
+
def self.write_one(object, writer, singular = nil)
|
3665
|
+
singular ||= 'network-label'
|
3666
|
+
writer.write_start(singular)
|
3667
|
+
href = object.href
|
3668
|
+
writer.write_attribute('href', href) unless href.nil?
|
3669
|
+
writer.write_attribute('id', object.id) unless object.id.nil?
|
3670
|
+
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
3671
|
+
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
3672
|
+
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
3673
|
+
HostNicWriter.write_one(object.host_nic, writer, 'host_nic') unless object.host_nic.nil?
|
3674
|
+
NetworkWriter.write_one(object.network, writer, 'network') unless object.network.nil?
|
3675
|
+
writer.write_end
|
3676
|
+
end
|
3677
|
+
|
3678
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
3679
|
+
singular ||= 'network-label'
|
3680
|
+
plural ||= 'network-labels'
|
3681
|
+
writer.write_start(plural)
|
3682
|
+
if list.is_a?(List)
|
3683
|
+
href = list.href
|
3684
|
+
writer.write_attribute('href', href) unless href.nil?
|
3685
|
+
end
|
3686
|
+
list.each do |item|
|
3687
|
+
write_one(item, writer, singular)
|
3688
|
+
end
|
3689
|
+
writer.write_end
|
3690
|
+
end
|
3691
|
+
|
3692
|
+
end
|
3693
|
+
|
3596
3694
|
class NfsProfileDetailWriter < Writer # :nodoc:
|
3597
3695
|
|
3598
3696
|
def self.write_one(object, writer, singular = nil)
|
@@ -4373,7 +4471,7 @@ module OvirtSDK4
|
|
4373
4471
|
OptionWriter.write_many(object.options, writer, 'option', 'options') unless object.options.nil?
|
4374
4472
|
Writer.write_string(writer, 'password', object.password) unless object.password.nil?
|
4375
4473
|
PmProxyWriter.write_many(object.pm_proxies, writer, 'pm_proxy', 'pm_proxies') unless object.pm_proxies.nil?
|
4376
|
-
|
4474
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
4377
4475
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
4378
4476
|
Writer.write_string(writer, 'username', object.username) unless object.username.nil?
|
4379
4477
|
writer.write_end
|
@@ -5144,7 +5242,8 @@ module OvirtSDK4
|
|
5144
5242
|
Writer.write_date(writer, 'start_time', object.start_time) unless object.start_time.nil?
|
5145
5243
|
Writer.write_boolean(writer, 'stateless', object.stateless) unless object.stateless.nil?
|
5146
5244
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
5147
|
-
|
5245
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
5246
|
+
Writer.write_string(writer, 'status_detail', object.status_detail) unless object.status_detail.nil?
|
5148
5247
|
Writer.write_string(writer, 'stop_reason', object.stop_reason) unless object.stop_reason.nil?
|
5149
5248
|
Writer.write_date(writer, 'stop_time', object.stop_time) unless object.stop_time.nil?
|
5150
5249
|
TagWriter.write_many(object.tags, writer, 'tag', 'tags') unless object.tags.nil?
|
@@ -5228,7 +5327,7 @@ module OvirtSDK4
|
|
5228
5327
|
href = object.href
|
5229
5328
|
writer.write_attribute('href', href) unless href.nil?
|
5230
5329
|
Writer.write_integer(writer, 'priority', object.priority) unless object.priority.nil?
|
5231
|
-
|
5330
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
5232
5331
|
writer.write_end
|
5233
5332
|
end
|
5234
5333
|
|
@@ -5384,34 +5483,6 @@ module OvirtSDK4
|
|
5384
5483
|
|
5385
5484
|
end
|
5386
5485
|
|
5387
|
-
class StatusWriter < Writer # :nodoc:
|
5388
|
-
|
5389
|
-
def self.write_one(object, writer, singular = nil)
|
5390
|
-
singular ||= 'status'
|
5391
|
-
writer.write_start(singular)
|
5392
|
-
href = object.href
|
5393
|
-
writer.write_attribute('href', href) unless href.nil?
|
5394
|
-
Writer.write_string(writer, 'detail', object.detail) unless object.detail.nil?
|
5395
|
-
Writer.write_string(writer, 'state', object.state) unless object.state.nil?
|
5396
|
-
writer.write_end
|
5397
|
-
end
|
5398
|
-
|
5399
|
-
def self.write_many(list, writer, singular = nil, plural = nil)
|
5400
|
-
singular ||= 'status'
|
5401
|
-
plural ||= 'statuss'
|
5402
|
-
writer.write_start(plural)
|
5403
|
-
if list.is_a?(List)
|
5404
|
-
href = list.href
|
5405
|
-
writer.write_attribute('href', href) unless href.nil?
|
5406
|
-
end
|
5407
|
-
list.each do |item|
|
5408
|
-
write_one(item, writer, singular)
|
5409
|
-
end
|
5410
|
-
writer.write_end
|
5411
|
-
end
|
5412
|
-
|
5413
|
-
end
|
5414
|
-
|
5415
5486
|
class StepWriter < Writer # :nodoc:
|
5416
5487
|
|
5417
5488
|
def self.write_one(object, writer, singular = nil)
|
@@ -5428,7 +5499,7 @@ module OvirtSDK4
|
|
5428
5499
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
5429
5500
|
Writer.write_integer(writer, 'number', object.number) unless object.number.nil?
|
5430
5501
|
Writer.write_date(writer, 'start_time', object.start_time) unless object.start_time.nil?
|
5431
|
-
|
5502
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
5432
5503
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
5433
5504
|
JobWriter.write_one(object.job, writer, 'job') unless object.job.nil?
|
5434
5505
|
StepWriter.write_one(object.parent_step, writer, 'parent_step') unless object.parent_step.nil?
|
@@ -5542,11 +5613,11 @@ module OvirtSDK4
|
|
5542
5613
|
Writer.write_integer(writer, 'committed', object.committed) unless object.committed.nil?
|
5543
5614
|
Writer.write_integer(writer, 'critical_space_action_blocker', object.critical_space_action_blocker) unless object.critical_space_action_blocker.nil?
|
5544
5615
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
5545
|
-
|
5616
|
+
Writer.write_string(writer, 'external_status', object.external_status) unless object.external_status.nil?
|
5546
5617
|
Writer.write_boolean(writer, 'import', object.import) unless object.import.nil?
|
5547
5618
|
Writer.write_boolean(writer, 'master', object.master) unless object.master.nil?
|
5548
5619
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
5549
|
-
|
5620
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
5550
5621
|
HostStorageWriter.write_one(object.storage, writer, 'storage') unless object.storage.nil?
|
5551
5622
|
Writer.write_string(writer, 'storage_format', object.storage_format) unless object.storage_format.nil?
|
5552
5623
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
@@ -5651,7 +5722,7 @@ module OvirtSDK4
|
|
5651
5722
|
SsoWriter.write_one(object.sso, writer, 'sso') unless object.sso.nil?
|
5652
5723
|
Writer.write_boolean(writer, 'start_paused', object.start_paused) unless object.start_paused.nil?
|
5653
5724
|
Writer.write_boolean(writer, 'stateless', object.stateless) unless object.stateless.nil?
|
5654
|
-
|
5725
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
5655
5726
|
TimeZoneWriter.write_one(object.time_zone, writer, 'time_zone') unless object.time_zone.nil?
|
5656
5727
|
Writer.write_boolean(writer, 'tunnel_migration', object.tunnel_migration) unless object.tunnel_migration.nil?
|
5657
5728
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
@@ -6158,7 +6229,8 @@ module OvirtSDK4
|
|
6158
6229
|
Writer.write_date(writer, 'start_time', object.start_time) unless object.start_time.nil?
|
6159
6230
|
Writer.write_boolean(writer, 'stateless', object.stateless) unless object.stateless.nil?
|
6160
6231
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
6161
|
-
|
6232
|
+
Writer.write_string(writer, 'status', object.status) unless object.status.nil?
|
6233
|
+
Writer.write_string(writer, 'status_detail', object.status_detail) unless object.status_detail.nil?
|
6162
6234
|
Writer.write_string(writer, 'stop_reason', object.stop_reason) unless object.stop_reason.nil?
|
6163
6235
|
Writer.write_date(writer, 'stop_time', object.stop_time) unless object.stop_time.nil?
|
6164
6236
|
TagWriter.write_many(object.tags, writer, 'tag', 'tags') unless object.tags.nil?
|
@@ -6245,7 +6317,6 @@ module OvirtSDK4
|
|
6245
6317
|
SsoWriter.write_one(object.sso, writer, 'sso') unless object.sso.nil?
|
6246
6318
|
Writer.write_boolean(writer, 'start_paused', object.start_paused) unless object.start_paused.nil?
|
6247
6319
|
Writer.write_boolean(writer, 'stateless', object.stateless) unless object.stateless.nil?
|
6248
|
-
StatusWriter.write_one(object.status, writer, 'status') unless object.status.nil?
|
6249
6320
|
TimeZoneWriter.write_one(object.time_zone, writer, 'time_zone') unless object.time_zone.nil?
|
6250
6321
|
Writer.write_boolean(writer, 'tunnel_migration', object.tunnel_migration) unless object.tunnel_migration.nil?
|
6251
6322
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
@@ -6414,6 +6485,7 @@ module OvirtSDK4
|
|
6414
6485
|
VnicPassThroughWriter.write_one(object.pass_through, writer, 'pass_through') unless object.pass_through.nil?
|
6415
6486
|
Writer.write_boolean(writer, 'port_mirroring', object.port_mirroring) unless object.port_mirroring.nil?
|
6416
6487
|
NetworkWriter.write_one(object.network, writer, 'network') unless object.network.nil?
|
6488
|
+
NetworkFilterWriter.write_one(object.network_filter, writer, 'network_filter') unless object.network_filter.nil?
|
6417
6489
|
QosWriter.write_one(object.qos, writer, 'qos') unless object.qos.nil?
|
6418
6490
|
writer.write_end
|
6419
6491
|
end
|
data/lib/ovirtsdk4.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
#
|
2
2
|
# Copyright (c) 2015-2016 Red Hat, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -12,19 +12,19 @@
|
|
12
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
13
|
# See the License for the specific language governing permissions and
|
14
14
|
# limitations under the License.
|
15
|
-
|
15
|
+
#
|
16
16
|
|
17
|
-
|
17
|
+
#
|
18
18
|
# Library requirements.
|
19
19
|
#
|
20
20
|
require 'date'
|
21
21
|
|
22
|
-
|
22
|
+
#
|
23
23
|
# Load the extension:
|
24
24
|
#
|
25
25
|
require 'ovirtsdk4c'
|
26
26
|
|
27
|
-
|
27
|
+
#
|
28
28
|
# Own requirements.
|
29
29
|
#
|
30
30
|
require 'ovirtsdk4/version.rb'
|