ovirt-engine-sdk 4.1.5 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.adoc +37 -0
- data/ext/ovirtsdk4c/ov_http_client.c +531 -353
- data/ext/ovirtsdk4c/ov_http_client.h +39 -2
- data/ext/ovirtsdk4c/ov_http_request.c +130 -102
- data/ext/ovirtsdk4c/ov_http_request.h +10 -2
- data/ext/ovirtsdk4c/ov_http_response.c +63 -50
- data/ext/ovirtsdk4c/ov_http_response.h +9 -2
- data/ext/ovirtsdk4c/ov_http_transfer.c +80 -0
- data/ext/ovirtsdk4c/ov_http_transfer.h +47 -0
- data/ext/ovirtsdk4c/ov_string.c +43 -0
- data/ext/ovirtsdk4c/ov_string.h +25 -0
- data/ext/ovirtsdk4c/ov_xml_reader.c +115 -99
- data/ext/ovirtsdk4c/ov_xml_reader.h +20 -3
- data/ext/ovirtsdk4c/ov_xml_writer.c +95 -77
- data/ext/ovirtsdk4c/ov_xml_writer.h +18 -3
- data/ext/ovirtsdk4c/ovirtsdk4c.c +2 -0
- data/lib/ovirtsdk4.rb +1 -0
- data/lib/ovirtsdk4/connection.rb +176 -26
- data/lib/ovirtsdk4/error.rb +38 -0
- data/lib/ovirtsdk4/probe.rb +4 -7
- data/lib/ovirtsdk4/readers.rb +9 -1
- data/lib/ovirtsdk4/service.rb +267 -36
- data/lib/ovirtsdk4/services.rb +7342 -15734
- data/lib/ovirtsdk4/types.rb +50 -4
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writer.rb +27 -1
- data/lib/ovirtsdk4/writers.rb +3 -1
- metadata +7 -2
data/lib/ovirtsdk4/types.rb
CHANGED
@@ -31962,6 +31962,24 @@ module OvirtSDK4
|
|
31962
31962
|
@pass_discard = value
|
31963
31963
|
end
|
31964
31964
|
|
31965
|
+
#
|
31966
|
+
# Returns the value of the `read_only` attribute.
|
31967
|
+
#
|
31968
|
+
# @return [Boolean]
|
31969
|
+
#
|
31970
|
+
def read_only
|
31971
|
+
@read_only
|
31972
|
+
end
|
31973
|
+
|
31974
|
+
#
|
31975
|
+
# Sets the value of the `read_only` attribute.
|
31976
|
+
#
|
31977
|
+
# @param value [Boolean]
|
31978
|
+
#
|
31979
|
+
def read_only=(value)
|
31980
|
+
@read_only = value
|
31981
|
+
end
|
31982
|
+
|
31965
31983
|
#
|
31966
31984
|
# Returns the value of the `template` attribute.
|
31967
31985
|
#
|
@@ -32057,6 +32075,8 @@ module OvirtSDK4
|
|
32057
32075
|
#
|
32058
32076
|
# @option opts [Boolean] :pass_discard The value of attribute `pass_discard`.
|
32059
32077
|
#
|
32078
|
+
# @option opts [Boolean] :read_only The value of attribute `read_only`.
|
32079
|
+
#
|
32060
32080
|
# @option opts [Template, Hash] :template The value of attribute `template`.
|
32061
32081
|
#
|
32062
32082
|
# @option opts [Boolean] :uses_scsi_reservation The value of attribute `uses_scsi_reservation`.
|
@@ -32072,6 +32092,7 @@ module OvirtSDK4
|
|
32072
32092
|
self.interface = opts[:interface]
|
32073
32093
|
self.logical_name = opts[:logical_name]
|
32074
32094
|
self.pass_discard = opts[:pass_discard]
|
32095
|
+
self.read_only = opts[:read_only]
|
32075
32096
|
self.template = opts[:template]
|
32076
32097
|
self.uses_scsi_reservation = opts[:uses_scsi_reservation]
|
32077
32098
|
self.vm = opts[:vm]
|
@@ -32088,6 +32109,7 @@ module OvirtSDK4
|
|
32088
32109
|
@interface == other.interface &&
|
32089
32110
|
@logical_name == other.logical_name &&
|
32090
32111
|
@pass_discard == other.pass_discard &&
|
32112
|
+
@read_only == other.read_only &&
|
32091
32113
|
@template == other.template &&
|
32092
32114
|
@uses_scsi_reservation == other.uses_scsi_reservation &&
|
32093
32115
|
@vm == other.vm
|
@@ -32104,6 +32126,7 @@ module OvirtSDK4
|
|
32104
32126
|
@interface.hash +
|
32105
32127
|
@logical_name.hash +
|
32106
32128
|
@pass_discard.hash +
|
32129
|
+
@read_only.hash +
|
32107
32130
|
@template.hash +
|
32108
32131
|
@uses_scsi_reservation.hash +
|
32109
32132
|
@vm.hash
|
@@ -38796,7 +38819,7 @@ module OvirtSDK4
|
|
38796
38819
|
#
|
38797
38820
|
# Returns the value of the `nics` attribute.
|
38798
38821
|
#
|
38799
|
-
# @return [Array<
|
38822
|
+
# @return [Array<HostNic>]
|
38800
38823
|
#
|
38801
38824
|
def nics
|
38802
38825
|
@nics
|
@@ -38805,14 +38828,14 @@ module OvirtSDK4
|
|
38805
38828
|
#
|
38806
38829
|
# Sets the value of the `nics` attribute.
|
38807
38830
|
#
|
38808
|
-
# @param list [Array<
|
38831
|
+
# @param list [Array<HostNic>]
|
38809
38832
|
#
|
38810
38833
|
def nics=(list)
|
38811
38834
|
if list.class == Array
|
38812
38835
|
list = List.new(list)
|
38813
38836
|
list.each_with_index do |value, index|
|
38814
38837
|
if value.is_a?(Hash)
|
38815
|
-
list[index] =
|
38838
|
+
list[index] = HostNic.new(value)
|
38816
38839
|
end
|
38817
38840
|
end
|
38818
38841
|
end
|
@@ -39424,7 +39447,7 @@ module OvirtSDK4
|
|
39424
39447
|
#
|
39425
39448
|
# @option opts [Array<NetworkAttachment>, Array<Hash>] :network_attachments The values of attribute `network_attachments`.
|
39426
39449
|
#
|
39427
|
-
# @option opts [Array<
|
39450
|
+
# @option opts [Array<HostNic>, Array<Hash>] :nics The values of attribute `nics`.
|
39428
39451
|
#
|
39429
39452
|
# @option opts [Array<NumaNode>, Array<Hash>] :numa_nodes The values of attribute `numa_nodes`.
|
39430
39453
|
#
|
@@ -39695,6 +39718,24 @@ module OvirtSDK4
|
|
39695
39718
|
@description = value
|
39696
39719
|
end
|
39697
39720
|
|
39721
|
+
#
|
39722
|
+
# Returns the value of the `driver` attribute.
|
39723
|
+
#
|
39724
|
+
# @return [String]
|
39725
|
+
#
|
39726
|
+
def driver
|
39727
|
+
@driver
|
39728
|
+
end
|
39729
|
+
|
39730
|
+
#
|
39731
|
+
# Sets the value of the `driver` attribute.
|
39732
|
+
#
|
39733
|
+
# @param value [String]
|
39734
|
+
#
|
39735
|
+
def driver=(value)
|
39736
|
+
@driver = value
|
39737
|
+
end
|
39738
|
+
|
39698
39739
|
#
|
39699
39740
|
# Returns the value of the `host` attribute.
|
39700
39741
|
#
|
@@ -39948,6 +39989,8 @@ module OvirtSDK4
|
|
39948
39989
|
#
|
39949
39990
|
# @option opts [String] :description The value of attribute `description`.
|
39950
39991
|
#
|
39992
|
+
# @option opts [String] :driver The value of attribute `driver`.
|
39993
|
+
#
|
39951
39994
|
# @option opts [Host, Hash] :host The value of attribute `host`.
|
39952
39995
|
#
|
39953
39996
|
# @option opts [String] :id The value of attribute `id`.
|
@@ -39974,6 +40017,7 @@ module OvirtSDK4
|
|
39974
40017
|
def initialize(opts = {})
|
39975
40018
|
super(opts)
|
39976
40019
|
self.capability = opts[:capability]
|
40020
|
+
self.driver = opts[:driver]
|
39977
40021
|
self.host = opts[:host]
|
39978
40022
|
self.iommu_group = opts[:iommu_group]
|
39979
40023
|
self.parent_device = opts[:parent_device]
|
@@ -39991,6 +40035,7 @@ module OvirtSDK4
|
|
39991
40035
|
def ==(other)
|
39992
40036
|
super &&
|
39993
40037
|
@capability == other.capability &&
|
40038
|
+
@driver == other.driver &&
|
39994
40039
|
@host == other.host &&
|
39995
40040
|
@iommu_group == other.iommu_group &&
|
39996
40041
|
@parent_device == other.parent_device &&
|
@@ -40008,6 +40053,7 @@ module OvirtSDK4
|
|
40008
40053
|
def hash
|
40009
40054
|
super +
|
40010
40055
|
@capability.hash +
|
40056
|
+
@driver.hash +
|
40011
40057
|
@host.hash +
|
40012
40058
|
@iommu_group.hash +
|
40013
40059
|
@parent_device.hash +
|
data/lib/ovirtsdk4/version.rb
CHANGED
data/lib/ovirtsdk4/writer.rb
CHANGED
@@ -106,6 +106,29 @@ module OvirtSDK4
|
|
106
106
|
value.xmlschema
|
107
107
|
end
|
108
108
|
|
109
|
+
#
|
110
|
+
# Converts the given value to an string, assuming that it is of the given type.
|
111
|
+
#
|
112
|
+
# @param value [Object] The value.
|
113
|
+
# @param type [Class] The type.
|
114
|
+
# @return [String] The string that represents the value.
|
115
|
+
#
|
116
|
+
def self.render(value, type)
|
117
|
+
if type.equal?(String)
|
118
|
+
value
|
119
|
+
elsif type.equal?(TrueClass)
|
120
|
+
render_boolean(value)
|
121
|
+
elsif type.equal?(Integer)
|
122
|
+
render_integer(value)
|
123
|
+
elsif type.equal?(Float)
|
124
|
+
render_decimal(value)
|
125
|
+
elsif type.equal?(DateTime)
|
126
|
+
render_date(value)
|
127
|
+
else
|
128
|
+
raise Error, "Don't know how to render value '#{value}' of type '#{type}'"
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
109
132
|
#
|
110
133
|
# Writes an element with the given name and date value.
|
111
134
|
#
|
@@ -150,15 +173,18 @@ module OvirtSDK4
|
|
150
173
|
# is needed, because the list may be empty, or have different types of objects. In this case, for arrays,
|
151
174
|
# if the name isn't provided an exception will be raised.
|
152
175
|
#
|
176
|
+
# @option opts [Boolean] :indent (false) Indicates if the output should be indented, for easier reading by humans.
|
177
|
+
#
|
153
178
|
def self.write(object, opts = {})
|
154
179
|
# Get the options:
|
155
180
|
target = opts[:target]
|
156
181
|
root = opts[:root]
|
182
|
+
indent = opts[:indent] || false
|
157
183
|
|
158
184
|
# If the target is `nil` then create a temporary XML writer to write the output:
|
159
185
|
cursor = nil
|
160
186
|
if target.nil?
|
161
|
-
cursor = XmlWriter.new
|
187
|
+
cursor = XmlWriter.new(nil, indent)
|
162
188
|
elsif target.is_a?(XmlWriter)
|
163
189
|
cursor = target
|
164
190
|
else
|
data/lib/ovirtsdk4/writers.rb
CHANGED
@@ -1298,6 +1298,7 @@ module OvirtSDK4
|
|
1298
1298
|
Writer.write_string(writer, 'logical_name', object.logical_name) unless object.logical_name.nil?
|
1299
1299
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
1300
1300
|
Writer.write_boolean(writer, 'pass_discard', object.pass_discard) unless object.pass_discard.nil?
|
1301
|
+
Writer.write_boolean(writer, 'read_only', object.read_only) unless object.read_only.nil?
|
1301
1302
|
Writer.write_boolean(writer, 'uses_scsi_reservation', object.uses_scsi_reservation) unless object.uses_scsi_reservation.nil?
|
1302
1303
|
DiskWriter.write_one(object.disk, writer, 'disk') unless object.disk.nil?
|
1303
1304
|
TemplateWriter.write_one(object.template, writer, 'template') unless object.template.nil?
|
@@ -2708,7 +2709,7 @@ module OvirtSDK4
|
|
2708
2709
|
HookWriter.write_many(object.hooks, writer, 'hook', 'hooks') unless object.hooks.nil?
|
2709
2710
|
KatelloErratumWriter.write_many(object.katello_errata, writer, 'katello_erratum', 'katello_errata') unless object.katello_errata.nil?
|
2710
2711
|
NetworkAttachmentWriter.write_many(object.network_attachments, writer, 'network_attachment', 'network_attachments') unless object.network_attachments.nil?
|
2711
|
-
|
2712
|
+
HostNicWriter.write_many(object.nics, writer, 'host_nic', 'nics') unless object.nics.nil?
|
2712
2713
|
NumaNodeWriter.write_many(object.numa_nodes, writer, 'host_numa_node', 'host_numa_nodes') unless object.numa_nodes.nil?
|
2713
2714
|
PermissionWriter.write_many(object.permissions, writer, 'permission', 'permissions') unless object.permissions.nil?
|
2714
2715
|
StatisticWriter.write_many(object.statistics, writer, 'statistic', 'statistics') unless object.statistics.nil?
|
@@ -2746,6 +2747,7 @@ module OvirtSDK4
|
|
2746
2747
|
Writer.write_string(writer, 'capability', object.capability) unless object.capability.nil?
|
2747
2748
|
Writer.write_string(writer, 'comment', object.comment) unless object.comment.nil?
|
2748
2749
|
Writer.write_string(writer, 'description', object.description) unless object.description.nil?
|
2750
|
+
Writer.write_string(writer, 'driver', object.driver) unless object.driver.nil?
|
2749
2751
|
Writer.write_integer(writer, 'iommu_group', object.iommu_group) unless object.iommu_group.nil?
|
2750
2752
|
Writer.write_string(writer, 'name', object.name) unless object.name.nil?
|
2751
2753
|
HostDeviceWriter.write_one(object.physical_function, writer, 'physical_function') unless object.physical_function.nil?
|
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.1.
|
4
|
+
version: 4.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -115,8 +115,12 @@ files:
|
|
115
115
|
- ext/ovirtsdk4c/ov_http_request.h
|
116
116
|
- ext/ovirtsdk4c/ov_http_response.c
|
117
117
|
- ext/ovirtsdk4c/ov_http_response.h
|
118
|
+
- ext/ovirtsdk4c/ov_http_transfer.c
|
119
|
+
- ext/ovirtsdk4c/ov_http_transfer.h
|
118
120
|
- ext/ovirtsdk4c/ov_module.c
|
119
121
|
- ext/ovirtsdk4c/ov_module.h
|
122
|
+
- ext/ovirtsdk4c/ov_string.c
|
123
|
+
- ext/ovirtsdk4c/ov_string.h
|
120
124
|
- ext/ovirtsdk4c/ov_xml_reader.c
|
121
125
|
- ext/ovirtsdk4c/ov_xml_reader.h
|
122
126
|
- ext/ovirtsdk4c/ov_xml_writer.c
|
@@ -124,6 +128,7 @@ files:
|
|
124
128
|
- ext/ovirtsdk4c/ovirtsdk4c.c
|
125
129
|
- lib/ovirtsdk4.rb
|
126
130
|
- lib/ovirtsdk4/connection.rb
|
131
|
+
- lib/ovirtsdk4/error.rb
|
127
132
|
- lib/ovirtsdk4/probe.rb
|
128
133
|
- lib/ovirtsdk4/reader.rb
|
129
134
|
- lib/ovirtsdk4/readers.rb
|