ovirt-engine-sdk 4.0.0.alpha11 → 4.0.0.alpha12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/ovirtsdk4c/ov_xml_reader.c +85 -54
- data/ext/ovirtsdk4c/ov_xml_writer.c +116 -63
- data/lib/ovirtsdk4.rb +1 -1
- data/lib/ovirtsdk4/http.rb +300 -41
- data/lib/ovirtsdk4/readers.rb +338 -4
- data/lib/ovirtsdk4/service.rb +5 -8
- data/lib/ovirtsdk4/services.rb +1386 -3336
- data/lib/ovirtsdk4/types.rb +3228 -1412
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writers.rb +134 -2
- metadata +16 -2
data/lib/ovirtsdk4/version.rb
CHANGED
data/lib/ovirtsdk4/writers.rb
CHANGED
@@ -24,8 +24,73 @@ module OvirtSDK4
|
|
24
24
|
writer.write_start(singular)
|
25
25
|
href = object.href
|
26
26
|
writer.write_attribute('href', href) unless href.nil?
|
27
|
+
writer.write_attribute('id', object.id) unless object.id.nil?
|
28
|
+
Writer.write_boolean(writer, 'async', object.async) unless object.async.nil?
|
29
|
+
GlusterBrickWriter.write_many(object.bricks, writer, 'brick', 'bricks') unless object.bricks.nil?
|
30
|
+
CertificateWriter.write_many(object.certificates, writer, 'certificate', 'certificates') unless object.certificates.nil?
|
31
|
+
Writer.write_boolean(writer, 'check_connectivity', object.check_connectivity) unless object.check_connectivity.nil?
|
32
|
+
Writer.write_boolean(writer, 'clone', object.clone) unless object.clone.nil?
|
33
|
+
ClusterWriter.write_one(object.cluster, writer, 'cluster') unless object.cluster.nil?
|
34
|
+
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
35
|
+
Writer.write_integer(writer, 'connectivity_timeout', object.connectivity_timeout) unless object.connectivity_timeout.nil?
|
36
|
+
DataCenterWriter.write_one(object.data_center, writer, 'data_center') unless object.data_center.nil?
|
37
|
+
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
38
|
+
GlusterVolumeProfileDetailsWriter.write_one(object.details, writer, 'details') unless object.details.nil?
|
39
|
+
Writer.write_boolean(writer, 'discard_snapshots', object.discard_snapshots) unless object.discard_snapshots.nil?
|
40
|
+
DiskWriter.write_one(object.disk, writer, 'disk') unless object.disk.nil?
|
41
|
+
DiskWriter.write_many(object.disks, writer, 'disk', 'disks') unless object.disks.nil?
|
42
|
+
Writer.write_boolean(writer, 'exclusive', object.exclusive) unless object.exclusive.nil?
|
43
|
+
Writer.write_boolean(writer, 'exclussive', object.exclussive) unless object.exclussive.nil?
|
27
44
|
FaultWriter.write_one(object.fault, writer, 'fault') unless object.fault.nil?
|
45
|
+
Writer.write_string(writer, 'fence_type', object.fence_type) unless object.fence_type.nil?
|
46
|
+
Writer.write_boolean(writer, 'filter', object.filter) unless object.filter.nil?
|
47
|
+
Writer.write_boolean(writer, 'fix_layout', object.fix_layout) unless object.fix_layout.nil?
|
48
|
+
Writer.write_boolean(writer, 'force', object.force) unless object.force.nil?
|
49
|
+
GracePeriodWriter.write_one(object.grace_period, writer, 'grace_period') unless object.grace_period.nil?
|
50
|
+
HostWriter.write_one(object.host, writer, 'host') unless object.host.nil?
|
51
|
+
Writer.write_string(writer, 'image', object.image) unless object.image.nil?
|
52
|
+
Writer.write_boolean(writer, 'import_as_template', object.import_as_template) unless object.import_as_template.nil?
|
53
|
+
Writer.write_boolean(writer, 'is_attached', object.is_attached) unless object.is_attached.nil?
|
54
|
+
IscsiDetailsWriter.write_one(object.iscsi, writer, 'iscsi') unless object.iscsi.nil?
|
55
|
+
if not object.iscsi_targets.nil? and not object.iscsi_targets.empty? then
|
56
|
+
writer.write_start('iscsi_targets')
|
57
|
+
object.iscsi_targets.each do |item|
|
58
|
+
Writer.write_string(writer, 'iscsi_target', item) unless item.nil?
|
59
|
+
end
|
60
|
+
writer.end_element
|
61
|
+
end
|
62
|
+
JobWriter.write_one(object.job, writer, 'job') unless object.job.nil?
|
63
|
+
LogicalUnitWriter.write_many(object.logical_units, writer, 'logical_unit', 'logical_units') unless object.logical_units.nil?
|
64
|
+
Writer.write_boolean(writer, 'maintenance_enabled', object.maintenance_enabled) unless object.maintenance_enabled.nil?
|
65
|
+
HostNicWriter.write_many(object.modified_bonds, writer, 'modified_bond', 'modified_bonds') unless object.modified_bonds.nil?
|
66
|
+
LabelWriter.write_many(object.modified_labels, writer, 'modified_label', 'modified_labels') unless object.modified_labels.nil?
|
67
|
+
NetworkAttachmentWriter.write_many(object.modified_network_attachments, writer, 'modified_network_attachment', 'modified_network_attachments') unless object.modified_network_attachments.nil?
|
68
|
+
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
69
|
+
OptionWriter.write_one(object.option, writer, 'option') unless object.option.nil?
|
70
|
+
Writer.write_boolean(writer, 'pause', object.pause) unless object.pause.nil?
|
71
|
+
PowerManagementWriter.write_one(object.power_management, writer, 'power_management') unless object.power_management.nil?
|
72
|
+
ProxyTicketWriter.write_one(object.proxy_ticket, writer, 'proxy_ticket') unless object.proxy_ticket.nil?
|
73
|
+
Writer.write_string(writer, 'reason', object.reason) unless object.reason.nil?
|
74
|
+
HostNicWriter.write_many(object.removed_bonds, writer, 'removed_bond', 'removed_bonds') unless object.removed_bonds.nil?
|
75
|
+
LabelWriter.write_many(object.removed_labels, writer, 'removed_label', 'removed_labels') unless object.removed_labels.nil?
|
76
|
+
NetworkAttachmentWriter.write_many(object.removed_network_attachments, writer, 'removed_network_attachment', 'removed_network_attachments') unless object.removed_network_attachments.nil?
|
77
|
+
Writer.write_string(writer, 'resolution_type', object.resolution_type) unless object.resolution_type.nil?
|
78
|
+
Writer.write_boolean(writer, 'restore_memory', object.restore_memory) unless object.restore_memory.nil?
|
79
|
+
Writer.write_string(writer, 'root_password', object.root_password) unless object.root_password.nil?
|
80
|
+
SnapshotWriter.write_one(object.snapshot, writer, 'snapshot') unless object.snapshot.nil?
|
81
|
+
SshWriter.write_one(object.ssh, writer, 'ssh') unless object.ssh.nil?
|
28
82
|
StatusWriter.write_one(object.status, writer, 'status') unless object.status.nil?
|
83
|
+
Writer.write_boolean(writer, 'stop_gluster_service', object.stop_gluster_service) unless object.stop_gluster_service.nil?
|
84
|
+
StorageDomainWriter.write_one(object.storage_domain, writer, 'storage_domain') unless object.storage_domain.nil?
|
85
|
+
StorageDomainWriter.write_many(object.storage_domains, writer, 'storage_domain', 'storage_domains') unless object.storage_domains.nil?
|
86
|
+
Writer.write_boolean(writer, 'succeeded', object.succeeded) unless object.succeeded.nil?
|
87
|
+
NetworkAttachmentWriter.write_many(object.synchronized_network_attachments, writer, 'synchronized_network_attachment', 'synchronized_network_attachments') unless object.synchronized_network_attachments.nil?
|
88
|
+
TemplateWriter.write_one(object.template, writer, 'template') unless object.template.nil?
|
89
|
+
TicketWriter.write_one(object.ticket, writer, 'ticket') unless object.ticket.nil?
|
90
|
+
Writer.write_boolean(writer, 'use_cloud_init', object.use_cloud_init) unless object.use_cloud_init.nil?
|
91
|
+
Writer.write_boolean(writer, 'use_sysprep', object.use_sysprep) unless object.use_sysprep.nil?
|
92
|
+
HostNicVirtualFunctionsConfigurationWriter.write_one(object.virtual_functions_configuration, writer, 'virtual_functions_configuration') unless object.virtual_functions_configuration.nil?
|
93
|
+
VmWriter.write_one(object.vm, writer, 'vm') unless object.vm.nil?
|
29
94
|
writer.write_end
|
30
95
|
end
|
31
96
|
|
@@ -2078,6 +2143,33 @@ module OvirtSDK4
|
|
2078
2143
|
|
2079
2144
|
end
|
2080
2145
|
|
2146
|
+
class GracePeriodWriter < Writer # :nodoc:
|
2147
|
+
|
2148
|
+
def self.write_one(object, writer, singular = nil)
|
2149
|
+
singular ||= 'grace-period'
|
2150
|
+
writer.write_start(singular)
|
2151
|
+
href = object.href
|
2152
|
+
writer.write_attribute('href', href) unless href.nil?
|
2153
|
+
Writer.write_integer(writer, 'expiry', object.expiry) unless object.expiry.nil?
|
2154
|
+
writer.write_end
|
2155
|
+
end
|
2156
|
+
|
2157
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
2158
|
+
singular ||= 'grace-period'
|
2159
|
+
plural ||= 'grace-periods'
|
2160
|
+
writer.write_start(plural)
|
2161
|
+
if list.is_a?(List)
|
2162
|
+
href = list.href
|
2163
|
+
writer.write_attribute('href', href) unless href.nil?
|
2164
|
+
end
|
2165
|
+
list.each do |item|
|
2166
|
+
write_one(item, writer, singular)
|
2167
|
+
end
|
2168
|
+
writer.write_end
|
2169
|
+
end
|
2170
|
+
|
2171
|
+
end
|
2172
|
+
|
2081
2173
|
class GraphicsConsoleWriter < Writer # :nodoc:
|
2082
2174
|
|
2083
2175
|
def self.write_one(object, writer, singular = nil)
|
@@ -2305,7 +2397,6 @@ module OvirtSDK4
|
|
2305
2397
|
Writer.write_string(writer, 'kdump_status', object.kdump_status) unless object.kdump_status.nil?
|
2306
2398
|
KsmWriter.write_one(object.ksm, writer, 'ksm') unless object.ksm.nil?
|
2307
2399
|
VersionWriter.write_one(object.libvirt_version, writer, 'libvirt_version') unless object.libvirt_version.nil?
|
2308
|
-
Writer.write_boolean(writer, 'live_snapshot_support', object.live_snapshot_support) unless object.live_snapshot_support.nil?
|
2309
2400
|
Writer.write_integer(writer, 'max_scheduling_memory', object.max_scheduling_memory) unless object.max_scheduling_memory.nil?
|
2310
2401
|
Writer.write_integer(writer, 'memory', object.memory) unless object.memory.nil?
|
2311
2402
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
@@ -2433,6 +2524,8 @@ module OvirtSDK4
|
|
2433
2524
|
Writer.write_boolean(writer, 'custom_configuration', object.custom_configuration) unless object.custom_configuration.nil?
|
2434
2525
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
2435
2526
|
IpWriter.write_one(object.ip, writer, 'ip') unless object.ip.nil?
|
2527
|
+
IpWriter.write_one(object.ipv6, writer, 'ipv6') unless object.ipv6.nil?
|
2528
|
+
Writer.write_string(writer, 'ipv6_boot_protocol', object.ipv6_boot_protocol) unless object.ipv6_boot_protocol.nil?
|
2436
2529
|
LabelWriter.write_many(object.labels, writer, 'label', 'labels') unless object.labels.nil?
|
2437
2530
|
MacWriter.write_one(object.mac, writer, 'mac') unless object.mac.nil?
|
2438
2531
|
Writer.write_integer(writer, 'mtu', object.mtu) unless object.mtu.nil?
|
@@ -2728,6 +2821,7 @@ module OvirtSDK4
|
|
2728
2821
|
CpuWriter.write_one(object.cpu, writer, 'cpu') unless object.cpu.nil?
|
2729
2822
|
Writer.write_integer(writer, 'cpu_shares', object.cpu_shares) unless object.cpu_shares.nil?
|
2730
2823
|
Writer.write_date(writer, 'creation_time', object.creation_time) unless object.creation_time.nil?
|
2824
|
+
VersionWriter.write_one(object.custom_compatibility_version, writer, 'custom_compatibility_version') unless object.custom_compatibility_version.nil?
|
2731
2825
|
Writer.write_string(writer, 'custom_cpu_model', object.custom_cpu_model) unless object.custom_cpu_model.nil?
|
2732
2826
|
Writer.write_string(writer, 'custom_emulated_machine', object.custom_emulated_machine) unless object.custom_emulated_machine.nil?
|
2733
2827
|
CustomPropertyWriter.write_many(object.custom_properties, writer, 'custom_property', 'custom_properties') unless object.custom_properties.nil?
|
@@ -3274,7 +3368,7 @@ module OvirtSDK4
|
|
3274
3368
|
writer.write_start(singular)
|
3275
3369
|
href = object.href
|
3276
3370
|
writer.write_attribute('href', href) unless href.nil?
|
3277
|
-
|
3371
|
+
Writer.write_string(writer, 'id', object.id) unless object.id.nil?
|
3278
3372
|
writer.write_end
|
3279
3373
|
end
|
3280
3374
|
|
@@ -3303,6 +3397,7 @@ module OvirtSDK4
|
|
3303
3397
|
writer.write_attribute('href', href) unless href.nil?
|
3304
3398
|
Writer.write_string(writer, 'auto_converge', object.auto_converge) unless object.auto_converge.nil?
|
3305
3399
|
Writer.write_string(writer, 'compressed', object.compressed) unless object.compressed.nil?
|
3400
|
+
MigrationPolicyWriter.write_one(object.policy, writer, 'policy') unless object.policy.nil?
|
3306
3401
|
writer.write_end
|
3307
3402
|
end
|
3308
3403
|
|
@@ -3322,6 +3417,36 @@ module OvirtSDK4
|
|
3322
3417
|
|
3323
3418
|
end
|
3324
3419
|
|
3420
|
+
class MigrationPolicyWriter < Writer # :nodoc:
|
3421
|
+
|
3422
|
+
def self.write_one(object, writer, singular = nil)
|
3423
|
+
singular ||= 'migration-policy'
|
3424
|
+
writer.write_start(singular)
|
3425
|
+
href = object.href
|
3426
|
+
writer.write_attribute('href', href) unless href.nil?
|
3427
|
+
writer.write_attribute('id', object.id) unless object.id.nil?
|
3428
|
+
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
3429
|
+
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
3430
|
+
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
3431
|
+
writer.write_end
|
3432
|
+
end
|
3433
|
+
|
3434
|
+
def self.write_many(list, writer, singular = nil, plural = nil)
|
3435
|
+
singular ||= 'migration-policy'
|
3436
|
+
plural ||= 'migration-policies'
|
3437
|
+
writer.write_start(plural)
|
3438
|
+
if list.is_a?(List)
|
3439
|
+
href = list.href
|
3440
|
+
writer.write_attribute('href', href) unless href.nil?
|
3441
|
+
end
|
3442
|
+
list.each do |item|
|
3443
|
+
write_one(item, writer, singular)
|
3444
|
+
end
|
3445
|
+
writer.write_end
|
3446
|
+
end
|
3447
|
+
|
3448
|
+
end
|
3449
|
+
|
3325
3450
|
class NetworkWriter < Writer # :nodoc:
|
3326
3451
|
|
3327
3452
|
def self.write_one(object, writer, singular = nil)
|
@@ -3750,8 +3875,10 @@ module OvirtSDK4
|
|
3750
3875
|
Writer.write_string(writer, 'password', object.password) unless object.password.nil?
|
3751
3876
|
Writer.write_string(writer, 'plugin_type', object.plugin_type) unless object.plugin_type.nil?
|
3752
3877
|
PropertyWriter.write_many(object.properties, writer, 'property', 'properties') unless object.properties.nil?
|
3878
|
+
Writer.write_boolean(writer, 'read_only', object.read_only) unless object.read_only.nil?
|
3753
3879
|
Writer.write_boolean(writer, 'requires_authentication', object.requires_authentication) unless object.requires_authentication.nil?
|
3754
3880
|
Writer.write_string(writer, 'tenant_name', object.tenant_name) unless object.tenant_name.nil?
|
3881
|
+
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
3755
3882
|
Writer.write_string(writer, 'url', object.url) unless object.url.nil?
|
3756
3883
|
Writer.write_string(writer, 'username', object.username) unless object.username.nil?
|
3757
3884
|
writer.write_end
|
@@ -4977,6 +5104,7 @@ module OvirtSDK4
|
|
4977
5104
|
CpuWriter.write_one(object.cpu, writer, 'cpu') unless object.cpu.nil?
|
4978
5105
|
Writer.write_integer(writer, 'cpu_shares', object.cpu_shares) unless object.cpu_shares.nil?
|
4979
5106
|
Writer.write_date(writer, 'creation_time', object.creation_time) unless object.creation_time.nil?
|
5107
|
+
VersionWriter.write_one(object.custom_compatibility_version, writer, 'custom_compatibility_version') unless object.custom_compatibility_version.nil?
|
4980
5108
|
Writer.write_string(writer, 'custom_cpu_model', object.custom_cpu_model) unless object.custom_cpu_model.nil?
|
4981
5109
|
Writer.write_string(writer, 'custom_emulated_machine', object.custom_emulated_machine) unless object.custom_emulated_machine.nil?
|
4982
5110
|
CustomPropertyWriter.write_many(object.custom_properties, writer, 'custom_property', 'custom_properties') unless object.custom_properties.nil?
|
@@ -5497,6 +5625,7 @@ module OvirtSDK4
|
|
5497
5625
|
CpuWriter.write_one(object.cpu, writer, 'cpu') unless object.cpu.nil?
|
5498
5626
|
Writer.write_integer(writer, 'cpu_shares', object.cpu_shares) unless object.cpu_shares.nil?
|
5499
5627
|
Writer.write_date(writer, 'creation_time', object.creation_time) unless object.creation_time.nil?
|
5628
|
+
VersionWriter.write_one(object.custom_compatibility_version, writer, 'custom_compatibility_version') unless object.custom_compatibility_version.nil?
|
5500
5629
|
Writer.write_string(writer, 'custom_cpu_model', object.custom_cpu_model) unless object.custom_cpu_model.nil?
|
5501
5630
|
Writer.write_string(writer, 'custom_emulated_machine', object.custom_emulated_machine) unless object.custom_emulated_machine.nil?
|
5502
5631
|
CustomPropertyWriter.write_many(object.custom_properties, writer, 'custom_property', 'custom_properties') unless object.custom_properties.nil?
|
@@ -5993,6 +6122,7 @@ module OvirtSDK4
|
|
5993
6122
|
CpuWriter.write_one(object.cpu, writer, 'cpu') unless object.cpu.nil?
|
5994
6123
|
Writer.write_integer(writer, 'cpu_shares', object.cpu_shares) unless object.cpu_shares.nil?
|
5995
6124
|
Writer.write_date(writer, 'creation_time', object.creation_time) unless object.creation_time.nil?
|
6125
|
+
VersionWriter.write_one(object.custom_compatibility_version, writer, 'custom_compatibility_version') unless object.custom_compatibility_version.nil?
|
5996
6126
|
Writer.write_string(writer, 'custom_cpu_model', object.custom_cpu_model) unless object.custom_cpu_model.nil?
|
5997
6127
|
Writer.write_string(writer, 'custom_emulated_machine', object.custom_emulated_machine) unless object.custom_emulated_machine.nil?
|
5998
6128
|
CustomPropertyWriter.write_many(object.custom_properties, writer, 'custom_property', 'custom_properties') unless object.custom_properties.nil?
|
@@ -6089,6 +6219,7 @@ module OvirtSDK4
|
|
6089
6219
|
CpuWriter.write_one(object.cpu, writer, 'cpu') unless object.cpu.nil?
|
6090
6220
|
Writer.write_integer(writer, 'cpu_shares', object.cpu_shares) unless object.cpu_shares.nil?
|
6091
6221
|
Writer.write_date(writer, 'creation_time', object.creation_time) unless object.creation_time.nil?
|
6222
|
+
VersionWriter.write_one(object.custom_compatibility_version, writer, 'custom_compatibility_version') unless object.custom_compatibility_version.nil?
|
6092
6223
|
Writer.write_string(writer, 'custom_cpu_model', object.custom_cpu_model) unless object.custom_cpu_model.nil?
|
6093
6224
|
Writer.write_string(writer, 'custom_emulated_machine', object.custom_emulated_machine) unless object.custom_emulated_machine.nil?
|
6094
6225
|
CustomPropertyWriter.write_many(object.custom_properties, writer, 'custom_property', 'custom_properties') unless object.custom_properties.nil?
|
@@ -6190,6 +6321,7 @@ module OvirtSDK4
|
|
6190
6321
|
Writer.write_string(writer, 'type', object.type) unless object.type.nil?
|
6191
6322
|
Writer.write_boolean(writer, 'use_latest_template_version', object.use_latest_template_version) unless object.use_latest_template_version.nil?
|
6192
6323
|
ClusterWriter.write_one(object.cluster, writer, 'cluster') unless object.cluster.nil?
|
6324
|
+
InstanceTypeWriter.write_one(object.instance_type, writer, 'instance_type') unless object.instance_type.nil?
|
6193
6325
|
TemplateWriter.write_one(object.template, writer, 'template') unless object.template.nil?
|
6194
6326
|
VmWriter.write_one(object.vm, writer, 'vm') unless object.vm.nil?
|
6195
6327
|
writer.write_end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovirt-engine-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.alpha12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.9'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.9'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|