ovirt-engine-sdk 4.0.1 → 4.4.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 +684 -0
- data/README.adoc +729 -32
- data/ext/ovirtsdk4c/extconf.rb +31 -5
- data/ext/ovirtsdk4c/ov_error.c +9 -2
- data/ext/ovirtsdk4c/ov_error.h +3 -1
- data/ext/ovirtsdk4c/ov_http_client.c +1218 -0
- data/ext/ovirtsdk4c/ov_http_client.h +75 -0
- data/ext/ovirtsdk4c/ov_http_request.c +397 -0
- data/ext/ovirtsdk4c/ov_http_request.h +54 -0
- data/ext/ovirtsdk4c/ov_http_response.c +210 -0
- data/ext/ovirtsdk4c/ov_http_response.h +41 -0
- data/ext/ovirtsdk4c/ov_http_transfer.c +91 -0
- data/ext/ovirtsdk4c/ov_http_transfer.h +47 -0
- data/ext/ovirtsdk4c/ov_module.h +2 -2
- 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 +10 -2
- data/lib/ovirtsdk4/connection.rb +695 -0
- data/lib/ovirtsdk4/errors.rb +70 -0
- data/lib/ovirtsdk4/probe.rb +324 -0
- data/lib/ovirtsdk4/reader.rb +74 -40
- data/lib/ovirtsdk4/readers.rb +3325 -976
- data/lib/ovirtsdk4/service.rb +439 -48
- data/lib/ovirtsdk4/services.rb +29365 -21180
- data/lib/ovirtsdk4/type.rb +20 -6
- data/lib/ovirtsdk4/types.rb +15048 -3198
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writer.rb +108 -13
- data/lib/ovirtsdk4/writers.rb +1373 -294
- data/lib/ovirtsdk4.rb +4 -2
- metadata +88 -36
- data/lib/ovirtsdk4/http.rb +0 -548
data/lib/ovirtsdk4/type.rb
CHANGED
@@ -15,19 +15,17 @@
|
|
15
15
|
#
|
16
16
|
|
17
17
|
module OvirtSDK4
|
18
|
-
|
19
18
|
#
|
20
19
|
# This module is a mixin that contains the methods common to struct and list types.
|
21
20
|
#
|
22
21
|
module Type
|
23
|
-
|
24
22
|
#
|
25
23
|
# Returns the value of the `href` attribute.
|
26
24
|
#
|
27
25
|
# @return [String]
|
28
26
|
#
|
29
27
|
def href
|
30
|
-
|
28
|
+
@href
|
31
29
|
end
|
32
30
|
|
33
31
|
#
|
@@ -86,13 +84,12 @@ module OvirtSDK4
|
|
86
84
|
elsif key.is_a?(Integer)
|
87
85
|
current = current[key]
|
88
86
|
else
|
89
|
-
raise TypeError
|
87
|
+
raise TypeError, "The key '#{key}' isn't a symbol or integer"
|
90
88
|
end
|
91
89
|
break if current.nil?
|
92
90
|
end
|
93
91
|
current
|
94
92
|
end
|
95
|
-
|
96
93
|
end
|
97
94
|
|
98
95
|
#
|
@@ -108,6 +105,24 @@ module OvirtSDK4
|
|
108
105
|
self.href = opts[:href]
|
109
106
|
end
|
110
107
|
|
108
|
+
#
|
109
|
+
# Returns `true` if `self` and `other` have the same attributes and values.
|
110
|
+
#
|
111
|
+
def ==(other)
|
112
|
+
!other.nil? && self.class == other.class
|
113
|
+
end
|
114
|
+
|
115
|
+
#
|
116
|
+
# Use the same logic for `eql?` and `==`.
|
117
|
+
#
|
118
|
+
alias eql? ==
|
119
|
+
|
120
|
+
#
|
121
|
+
# Generates a hash value for this object.
|
122
|
+
#
|
123
|
+
def hash
|
124
|
+
0
|
125
|
+
end
|
111
126
|
end
|
112
127
|
|
113
128
|
#
|
@@ -116,5 +131,4 @@ module OvirtSDK4
|
|
116
131
|
class List < Array
|
117
132
|
include Type
|
118
133
|
end
|
119
|
-
|
120
134
|
end
|