ovirt-engine-sdk 4.2.0.alpha3 → 4.2.0.alpha4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80eb53f5a009746e0161ca6038d089370c372df8
4
- data.tar.gz: 6285abc6584ca83aec8df2be1dfabca6d2485afa
3
+ metadata.gz: 230614a52420a3f291acff2868274b00220cfe6a
4
+ data.tar.gz: 4480ebcee091051f2acaf8dbca74e9d3903e4196
5
5
  SHA512:
6
- metadata.gz: 123a67164cf851403136b4af9362d8c3c73826b30a6573bae326827929c4f9df5f46642a02a8f10a16634ae1782f77f3e202ed10a9d2f3069b5d6fbcf95f4616
7
- data.tar.gz: 9ca5ab17eba09f5a7f1ae1e73d66008a9ccfc76d0f77f589c6cbaa12c5a9f9e0e072f83ded518d68111c6db63fd7d3e4cc5cbeecb4defad008dc08318977504e
6
+ metadata.gz: ae02f9d1e89464b19f72438d726f4d30a416fe30d18db16fc3f4fec2f08230f7ba3e64326d2e17a638b23de0ce0405725121793c3736385d30b34b59e2ebb5ea
7
+ data.tar.gz: d3e7722a5ecba2632d1f8259f43d61691463e63be959c8f66bb1289f4a61cf3dc1a774aa0dc2a0df13bd8376a37bb01ae7210860027e9f0d769cd6eff412cf40
data/CHANGES.adoc CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  This document describes the relevant changes between releases of the SDK.
4
4
 
5
+ == 4.2.0-alpha4 / Oct 23 2017
6
+
7
+ Update to model 4.2.23:
8
+
9
+ * Add new services and types to enable automatic provisioning of
10
+ external network providers during host installation.
11
+
12
+ * Explicitly indicate that CPU type is mandtory when adding a cluster.
13
+
14
+ * Add `image` parameter to `HostService.upgrade`
15
+ https://bugzilla.redhat.com/1488434[#1488434].
16
+
17
+ * Add `storageErrorResumeBehaviour` to virtual machines, templates and
18
+ instance types https://bugzilla.redhat.com/1317450[#1317450].
19
+
20
+ * Don't require name or identifier for adding SSH public key
21
+ https://bugzilla.redhat.com/1497641[#1497641].
22
+
23
+ * Add `reboot` parameter to the `upgrade` method of the service that
24
+ manages a host.
25
+
26
+ * Add `registrationConfiguration` parameter to the operations that
27
+ register virtual machines and templates.
28
+
29
+ * Add documentation explaining how to add snapshots with disk
30
+ attachments.
31
+
32
+ * Add documentation explaining how to add a template with disks in
33
+ specific storage domains https://bugzilla.redhat.com/1492614[#1492614].
34
+
35
+ * Add `vnicProfileMappings` parameter to the operation that registers a
36
+ template.
37
+
38
+ New features:
39
+
40
+ * Check types of service method parameters
41
+ https://bugzilla.redhat.com/1378113[#1378113].
42
+
43
+ * Add support for multiple threads
44
+ https://bugzilla.redhat.com/1496846[#1496846].
45
+
46
+ Bug fixes:
47
+
48
+ * Check types of HTTP client constructor parameters.
49
+
5
50
  == 4.2.0-alpha3 / Sep 25 2017
6
51
 
7
52
  Update to model 4.2.19:
@@ -50,7 +50,7 @@ static VALUE PROXY_PASSWORD_SYMBOL;
50
50
  static VALUE PROXY_URL_SYMBOL;
51
51
  static VALUE PROXY_USERNAME_SYMBOL;
52
52
  static VALUE TIMEOUT_SYMBOL;
53
- static VALUE USERNAME_SYMBOL;
53
+ static VALUE COOKIES_SYMBOL;
54
54
 
55
55
  /* Method identifiers: */
56
56
  static ID COMPARE_BY_IDENTITY_ID;
@@ -154,6 +154,7 @@ static void ov_http_client_free(void* vptr) {
154
154
  /* Release the resources used by libcurl: */
155
155
  if (ptr->handle != NULL) {
156
156
  curl_multi_cleanup(ptr->handle);
157
+ curl_share_cleanup(ptr->share);
157
158
  ptr->handle = NULL;
158
159
  }
159
160
 
@@ -162,6 +163,7 @@ static void ov_http_client_free(void* vptr) {
162
163
  ov_string_free(ptr->proxy_url);
163
164
  ov_string_free(ptr->proxy_username);
164
165
  ov_string_free(ptr->proxy_password);
166
+ ov_string_free(ptr->cookies);
165
167
 
166
168
  /* Free this object: */
167
169
  xfree(ptr);
@@ -186,6 +188,20 @@ static VALUE ov_http_client_alloc(VALUE klass) {
186
188
  ov_http_client_object* ptr;
187
189
 
188
190
  ptr = ALLOC(ov_http_client_object);
191
+ ptr->handle = NULL;
192
+ ptr->share = NULL;
193
+ ptr->log = Qnil;
194
+ ptr->pending = Qnil;
195
+ ptr->completed = Qnil;
196
+ ptr->compress = false;
197
+ ptr->debug = false;
198
+ ptr->insecure = false;
199
+ ptr->ca_file = NULL;
200
+ ptr->proxy_url = NULL;
201
+ ptr->proxy_username = NULL;
202
+ ptr->proxy_password = NULL;
203
+ ptr->timeout = 0;
204
+ ptr->cookies = NULL;
189
205
  return TypedData_Wrap_Struct(klass, &ov_http_client_type, ptr);
190
206
  }
191
207
 
@@ -466,7 +482,13 @@ static VALUE ov_http_client_initialize(int argc, VALUE* argv, VALUE self) {
466
482
 
467
483
  /* Get the value of the 'ca_file' parameter: */
468
484
  opt = rb_hash_aref(opts, CA_FILE_SYMBOL);
469
- ptr->ca_file = ov_string_dup(opt);
485
+ if (NIL_P(opt)) {
486
+ ptr->ca_file = NULL;
487
+ }
488
+ else {
489
+ Check_Type(opt, T_STRING);
490
+ ptr->ca_file = ov_string_dup(opt);
491
+ }
470
492
 
471
493
  /* Get the value of the 'insecure' parameter: */
472
494
  opt = rb_hash_aref(opts, INSECURE_SYMBOL);
@@ -492,15 +514,33 @@ static VALUE ov_http_client_initialize(int argc, VALUE* argv, VALUE self) {
492
514
 
493
515
  /* Get the value of the 'proxy_url' parameter: */
494
516
  opt = rb_hash_aref(opts, PROXY_URL_SYMBOL);
495
- ptr->proxy_url = ov_string_dup(opt);
517
+ if (NIL_P(opt)) {
518
+ ptr->proxy_url = NULL;
519
+ }
520
+ else {
521
+ Check_Type(opt, T_STRING);
522
+ ptr->proxy_url = ov_string_dup(opt);
523
+ }
496
524
 
497
525
  /* Get the value of the 'proxy_username' parameter: */
498
526
  opt = rb_hash_aref(opts, PROXY_USERNAME_SYMBOL);
499
- ptr->proxy_username = ov_string_dup(opt);
527
+ if (NIL_P(opt)) {
528
+ ptr->proxy_username = NULL;
529
+ }
530
+ else {
531
+ Check_Type(opt, T_STRING);
532
+ ptr->proxy_username = ov_string_dup(opt);
533
+ }
500
534
 
501
535
  /* Get the value of the 'proxy_password' parameter: */
502
536
  opt = rb_hash_aref(opts, PROXY_PASSWORD_SYMBOL);
503
- ptr->proxy_password = ov_string_dup(opt);
537
+ if (NIL_P(opt)) {
538
+ ptr->proxy_password = NULL;
539
+ }
540
+ else {
541
+ Check_Type(opt, T_STRING);
542
+ ptr->proxy_password = ov_string_dup(opt);
543
+ }
504
544
 
505
545
  /* Get the value of the 'log' parameter: */
506
546
  opt = rb_hash_aref(opts, LOG_SYMBOL);
@@ -526,6 +566,20 @@ static VALUE ov_http_client_initialize(int argc, VALUE* argv, VALUE self) {
526
566
  connections = NUM2LONG(opt);
527
567
  }
528
568
 
569
+ /* Get the value of the 'cookies' parameter. If it is a string it will be used as the path of the file where the
570
+ cookies will be stored. If it is any other thing it will be treated as a boolean flag indicating if cookies
571
+ should be enabled but not loaded/saved from/to any file. */
572
+ opt = rb_hash_aref(opts, COOKIES_SYMBOL);
573
+ if (TYPE(opt) == T_STRING) {
574
+ ptr->cookies = ov_string_dup(opt);
575
+ }
576
+ else if (RTEST(opt)) {
577
+ ptr->cookies = ov_string_dup(rb_str_new2(""));
578
+ }
579
+ else {
580
+ ptr->cookies = NULL;
581
+ }
582
+
529
583
  /* Create the hash that contains the transfers are pending an completed. Both use the identity of the request
530
584
  as key. */
531
585
  ptr->completed = rb_funcall(rb_hash_new(), COMPARE_BY_IDENTITY_ID, 0);
@@ -534,7 +588,16 @@ static VALUE ov_http_client_initialize(int argc, VALUE* argv, VALUE self) {
534
588
  /* Create the libcurl multi handle: */
535
589
  ptr->handle = curl_multi_init();
536
590
  if (ptr->handle == NULL) {
537
- rb_raise(ov_error_class, "Can't create libcurl object");
591
+ rb_raise(ov_error_class, "Can't create libcurl multi object");
592
+ }
593
+
594
+ /* Create the libcurl share handle in order to share cookie data: */
595
+ ptr->share = curl_share_init();
596
+ if (ptr->share == NULL) {
597
+ rb_raise(ov_error_class, "Can't create libcurl share object");
598
+ }
599
+ if (ptr->cookies != NULL) {
600
+ curl_share_setopt(ptr->share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
538
601
  }
539
602
 
540
603
  /* Enable pipelining: */
@@ -738,6 +801,13 @@ static void ov_http_client_prepare_handle(ov_http_client_object* client_ptr, ov_
738
801
  VALUE url;
739
802
  int timeout;
740
803
 
804
+ /* Configure sharing of cookies with other handlers created by the client: */
805
+ curl_easy_setopt(handle, CURLOPT_SHARE, client_ptr->share);
806
+ if (client_ptr->cookies != NULL && strlen(client_ptr->cookies) > 0) {
807
+ curl_easy_setopt(handle, CURLOPT_COOKIEFILE, client_ptr->cookies);
808
+ curl_easy_setopt(handle, CURLOPT_COOKIEJAR, client_ptr->cookies);
809
+ }
810
+
741
811
  /* Configure TLS parameters: */
742
812
  if (client_ptr->insecure) {
743
813
  curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L);
@@ -968,7 +1038,7 @@ void ov_http_client_define(void) {
968
1038
  PROXY_URL_SYMBOL = ID2SYM(rb_intern("proxy_url"));
969
1039
  PROXY_USERNAME_SYMBOL = ID2SYM(rb_intern("proxy_username"));
970
1040
  TIMEOUT_SYMBOL = ID2SYM(rb_intern("timeout"));
971
- USERNAME_SYMBOL = ID2SYM(rb_intern("username"));
1041
+ COOKIES_SYMBOL = ID2SYM(rb_intern("cookies"));
972
1042
 
973
1043
  /* Define the method identifiers: */
974
1044
  COMPARE_BY_IDENTITY_ID = rb_intern("compare_by_identity");
@@ -28,9 +28,12 @@ extern VALUE ov_http_client_class;
28
28
 
29
29
  /* Content: */
30
30
  typedef struct {
31
- /* The libcurl multi handle: */
31
+ /* The libcurl multi handle, used to implement multiple simultaneous requests: */
32
32
  CURLM* handle;
33
33
 
34
+ /* The libcurl share handle, used to share cookie data between multiple requests: */
35
+ CURLSH* share;
36
+
34
37
  /* The logger: */
35
38
  VALUE log;
36
39
 
@@ -51,6 +54,7 @@ typedef struct {
51
54
  char* proxy_username;
52
55
  char* proxy_password;
53
56
  int timeout;
57
+ char* cookies;
54
58
  } ov_http_client_object;
55
59
 
56
60
  /* Macro to get the pointer: */
@@ -16,6 +16,7 @@
16
16
 
17
17
  require 'json'
18
18
  require 'tempfile'
19
+ require 'thread'
19
20
  require 'uri'
20
21
 
21
22
  module OvirtSDK4
@@ -145,6 +146,9 @@ module OvirtSDK4
145
146
  @ca_store.close
146
147
  end
147
148
 
149
+ # Create the mutex that will be used to prevents simultaneous access to the same HTTP client by multiple threads:
150
+ @mutex = Mutex.new
151
+
148
152
  # Create the HTTP client:
149
153
  @client = HttpClient.new(
150
154
  insecure: @insecure,
@@ -184,67 +188,26 @@ module OvirtSDK4
184
188
  end
185
189
 
186
190
  #
187
- # Sends an HTTP request.
191
+ # Sends an HTTP request, making sure that multiple threads are coordinated correctly.
188
192
  #
189
193
  # @param request [HttpRequest] The request object containing the details of the HTTP request to send.
190
194
  #
191
195
  # @api private
192
196
  #
193
197
  def send(request)
194
- # Add the base URL to the request:
195
- request.url = request.url.nil? ? request.url = @url : "#{@url}/#{request.url}"
196
-
197
- # Set the headers common to all requests:
198
- request.headers.merge!(
199
- 'User-Agent' => "RubySDK/#{VERSION}",
200
- 'Version' => '4',
201
- 'Content-Type' => 'application/xml',
202
- 'Accept' => 'application/xml'
203
- )
204
-
205
- # Older versions of the engine (before 4.1) required the 'all_content' as an HTTP header instead of a query
206
- # parameter. In order to better support those older versions of the engine we need to check if this parameter is
207
- # included in the request, and add the corresponding header.
208
- unless request.query.nil?
209
- all_content = request.query['all_content']
210
- request.headers['All-Content'] = all_content unless all_content.nil?
211
- end
212
-
213
- # Add the global headers, but without replacing the values that may already exist:
214
- request.headers.merge!(@headers) { |_name, local, _global| local } if @headers
215
-
216
- # Set the authentication token:
217
- @token ||= create_access_token
218
- request.token = @token
219
-
220
- # Send the request:
221
- @client.send(request)
198
+ @mutex.synchronize { internal_send(request) }
222
199
  end
223
200
 
224
201
  #
225
- # Waits for the response to the given request.
202
+ # Waits for the response to the given request, making sure that multiple threads are coordinated correctly.
226
203
  #
227
204
  # @param request [HttpRequest] The request object whose corresponding response you want to wait for.
228
- # @return [Response] A request object containing the details of the HTTP response received.
205
+ # @return [HttpResponse] A request object containing the details of the HTTP response received.
229
206
  #
230
207
  # @api private
231
208
  #
232
209
  def wait(request)
233
- # Wait for the response:
234
- response = @client.wait(request)
235
- raise response if response.is_a?(Exception)
236
-
237
- # If the request failed because of authentication, and it wasn't a request to the SSO service, then the
238
- # most likely cause is an expired SSO token. In this case we need to request a new token, and try the original
239
- # request again, but only once. It if fails again, we just return the failed response.
240
- if response.code == 401 && request.token
241
- @token = create_access_token
242
- request.token = @token
243
- @client.send(request)
244
- response = @client.wait(request)
245
- end
246
-
247
- response
210
+ @mutex.synchronize { internal_wait(request) }
248
211
  end
249
212
 
250
213
  #
@@ -330,17 +293,10 @@ module OvirtSDK4
330
293
  end
331
294
 
332
295
  #
333
- # Releases the resources used by this connection.
296
+ # Releases the resources used by this connection, making sure that multiple threads are coordinated correctly.
334
297
  #
335
298
  def close
336
- # Revoke the SSO access token:
337
- revoke_access_token if @token
338
-
339
- # Close the HTTP client:
340
- @client.close if @client
341
-
342
- # Remove the temporary file that contains the trusted CA certificates:
343
- @ca_store.unlink if @ca_store
299
+ @mutex.synchronize { internal_close }
344
300
  end
345
301
 
346
302
  #
@@ -625,5 +581,85 @@ module OvirtSDK4
625
581
  end
626
582
  "#{code}: #{description}" if code
627
583
  end
584
+
585
+ #
586
+ # Sends an HTTP request.
587
+ #
588
+ # @param request [HttpRequest] The request object containing the details of the HTTP request to send.
589
+ #
590
+ # @api private
591
+ #
592
+ def internal_send(request)
593
+ # Add the base URL to the request:
594
+ request.url = request.url.nil? ? request.url = @url : "#{@url}/#{request.url}"
595
+
596
+ # Set the headers common to all requests:
597
+ request.headers.merge!(
598
+ 'User-Agent' => "RubySDK/#{VERSION}",
599
+ 'Version' => '4',
600
+ 'Content-Type' => 'application/xml',
601
+ 'Accept' => 'application/xml'
602
+ )
603
+
604
+ # Older versions of the engine (before 4.1) required the 'all_content' as an HTTP header instead of a query
605
+ # parameter. In order to better support those older versions of the engine we need to check if this parameter is
606
+ # included in the request, and add the corresponding header.
607
+ unless request.query.nil?
608
+ all_content = request.query['all_content']
609
+ request.headers['All-Content'] = all_content unless all_content.nil?
610
+ end
611
+
612
+ # Add the global headers, but without replacing the values that may already exist:
613
+ request.headers.merge!(@headers) { |_name, local, _global| local } if @headers
614
+
615
+ # Set the authentication token:
616
+ @token ||= create_access_token
617
+ request.token = @token
618
+
619
+ # Send the request:
620
+ @client.send(request)
621
+ end
622
+
623
+ #
624
+ # Waits for the response to the given request.
625
+ #
626
+ # @param request [HttpRequest] The request object whose corresponding response you want to wait for.
627
+ # @return [Response] A request object containing the details of the HTTP response received.
628
+ #
629
+ # @api private
630
+ #
631
+ def internal_wait(request)
632
+ # Wait for the response:
633
+ response = @client.wait(request)
634
+ raise response if response.is_a?(Exception)
635
+
636
+ # If the request failed because of authentication, and it wasn't a request to the SSO service, then the
637
+ # most likely cause is an expired SSO token. In this case we need to request a new token, and try the original
638
+ # request again, but only once. It if fails again, we just return the failed response.
639
+ if response.code == 401 && request.token
640
+ @token = create_access_token
641
+ request.token = @token
642
+ @client.send(request)
643
+ response = @client.wait(request)
644
+ end
645
+
646
+ response
647
+ end
648
+
649
+ #
650
+ # Releases the resources used by this connection.
651
+ #
652
+ # @api private
653
+ #
654
+ def internal_close
655
+ # Revoke the SSO access token:
656
+ revoke_access_token if @token
657
+
658
+ # Close the HTTP client:
659
+ @client.close if @client
660
+
661
+ # Remove the temporary file that contains the trusted CA certificates:
662
+ @ca_store.unlink if @ca_store
663
+ end
628
664
  end
629
665
  end
@@ -78,6 +78,8 @@ module OvirtSDK4
78
78
  object.reason = value if not value.nil?
79
79
  value = reader.get_attribute('reassign_bad_macs')
80
80
  object.reassign_bad_macs = value if not value.nil?
81
+ value = reader.get_attribute('reboot')
82
+ object.reboot = value if not value.nil?
81
83
  value = reader.get_attribute('remote_viewer_connection_file')
82
84
  object.remote_viewer_connection_file = value if not value.nil?
83
85
  value = reader.get_attribute('resolution_type')
@@ -209,6 +211,10 @@ module OvirtSDK4
209
211
  object.reason = Reader.read_string(reader)
210
212
  when 'reassign_bad_macs'
211
213
  object.reassign_bad_macs = Reader.read_boolean(reader)
214
+ when 'reboot'
215
+ object.reboot = Reader.read_boolean(reader)
216
+ when 'registration_configuration'
217
+ object.registration_configuration = RegistrationConfigurationReader.read_one(reader)
212
218
  when 'remote_viewer_connection_file'
213
219
  object.remote_viewer_connection_file = Reader.read_string(reader)
214
220
  when 'removed_bonds'
@@ -2036,6 +2042,8 @@ module OvirtSDK4
2036
2042
  object.data_center = DataCenterReader.read_one(reader)
2037
2043
  when 'enabled_features'
2038
2044
  object.enabled_features = ClusterFeatureReader.read_many(reader)
2045
+ when 'external_network_providers'
2046
+ object.external_network_providers = ExternalProviderReader.read_many(reader)
2039
2047
  when 'gluster_hooks'
2040
2048
  object.gluster_hooks = GlusterHookReader.read_many(reader)
2041
2049
  when 'gluster_volumes'
@@ -2104,6 +2112,8 @@ module OvirtSDK4
2104
2112
  object.cpu_profiles = list
2105
2113
  when 'enabledfeatures'
2106
2114
  object.enabled_features = list
2115
+ when 'externalnetworkproviders'
2116
+ object.external_network_providers = list
2107
2117
  when 'glusterhooks'
2108
2118
  object.gluster_hooks = list
2109
2119
  when 'glustervolumes'
@@ -4884,6 +4894,84 @@ module OvirtSDK4
4884
4894
 
4885
4895
  end
4886
4896
 
4897
+ class ExternalNetworkProviderConfigurationReader < Reader
4898
+
4899
+ def self.read_one(reader)
4900
+ # Do nothing if there aren't more tags:
4901
+ return nil unless reader.forward
4902
+
4903
+ # Create the object:
4904
+ object = ExternalNetworkProviderConfiguration.new
4905
+
4906
+ # Process the attributes:
4907
+ object.href = reader.get_attribute('href')
4908
+ value = reader.get_attribute('comment')
4909
+ object.comment = value if not value.nil?
4910
+ value = reader.get_attribute('description')
4911
+ object.description = value if not value.nil?
4912
+ value = reader.get_attribute('id')
4913
+ object.id = value if not value.nil?
4914
+ value = reader.get_attribute('name')
4915
+ object.name = value if not value.nil?
4916
+
4917
+ # Discard the start tag:
4918
+ empty = reader.empty_element?
4919
+ reader.read
4920
+ return object if empty
4921
+
4922
+ # Process the inner elements:
4923
+ while reader.forward do
4924
+ case reader.node_name
4925
+ when 'comment'
4926
+ object.comment = Reader.read_string(reader)
4927
+ when 'description'
4928
+ object.description = Reader.read_string(reader)
4929
+ when 'id'
4930
+ object.id = Reader.read_string(reader)
4931
+ when 'name'
4932
+ object.name = Reader.read_string(reader)
4933
+ when 'external_network_provider'
4934
+ object.external_network_provider = ExternalProviderReader.read_one(reader)
4935
+ when 'host'
4936
+ object.host = HostReader.read_one(reader)
4937
+ else
4938
+ reader.next_element
4939
+ end
4940
+ end
4941
+
4942
+ # Discard the end tag:
4943
+ reader.read
4944
+
4945
+ return object
4946
+ end
4947
+
4948
+
4949
+ def self.read_many(reader)
4950
+ # Do nothing if there aren't more tags:
4951
+ list = List.new
4952
+ return list unless reader.forward
4953
+
4954
+ # Process the attributes:
4955
+ list.href = reader.get_attribute('href')
4956
+
4957
+ # Discard the start tag:
4958
+ empty = reader.empty_element?
4959
+ reader.read
4960
+ return list if empty
4961
+
4962
+ # Process the inner elements:
4963
+ while reader.forward do
4964
+ list << read_one(reader)
4965
+ end
4966
+
4967
+ # Discard the end tag:
4968
+ reader.read
4969
+
4970
+ return list
4971
+ end
4972
+
4973
+ end
4974
+
4887
4975
  class ExternalProviderReader < Reader
4888
4976
 
4889
4977
  def self.read_one(reader)
@@ -7202,6 +7290,8 @@ module OvirtSDK4
7202
7290
  object.devices = DeviceReader.read_many(reader)
7203
7291
  when 'external_host_provider'
7204
7292
  object.external_host_provider = ExternalHostProviderReader.read_one(reader)
7293
+ when 'external_network_provider_configurations'
7294
+ object.external_network_provider_configurations = ExternalNetworkProviderConfigurationReader.read_many(reader)
7205
7295
  when 'hooks'
7206
7296
  object.hooks = HookReader.read_many(reader)
7207
7297
  when 'katello_errata'
@@ -7276,6 +7366,8 @@ module OvirtSDK4
7276
7366
  object.agents = list
7277
7367
  when 'devices'
7278
7368
  object.devices = list
7369
+ when 'externalnetworkproviderconfigurations'
7370
+ object.external_network_provider_configurations = list
7279
7371
  when 'hooks'
7280
7372
  object.hooks = list
7281
7373
  when 'katelloerrata'
@@ -8420,6 +8512,8 @@ module OvirtSDK4
8420
8512
  object.stateless = value if not value.nil?
8421
8513
  value = reader.get_attribute('status')
8422
8514
  object.status = value if not value.nil?
8515
+ value = reader.get_attribute('storage_error_resume_behaviour')
8516
+ object.storage_error_resume_behaviour = value if not value.nil?
8423
8517
  value = reader.get_attribute('tunnel_migration')
8424
8518
  object.tunnel_migration = value if not value.nil?
8425
8519
  value = reader.get_attribute('type')
@@ -8503,6 +8597,8 @@ module OvirtSDK4
8503
8597
  object.stateless = Reader.read_boolean(reader)
8504
8598
  when 'status'
8505
8599
  object.status = Reader.read_enum(TemplateStatus, reader)
8600
+ when 'storage_error_resume_behaviour'
8601
+ object.storage_error_resume_behaviour = Reader.read_enum(VmStorageErrorResumeBehaviour, reader)
8506
8602
  when 'time_zone'
8507
8603
  object.time_zone = TimeZoneReader.read_one(reader)
8508
8604
  when 'tunnel_migration'
@@ -13756,6 +13852,448 @@ module OvirtSDK4
13756
13852
 
13757
13853
  end
13758
13854
 
13855
+ class RegistrationAffinityGroupMappingReader < Reader
13856
+
13857
+ def self.read_one(reader)
13858
+ # Do nothing if there aren't more tags:
13859
+ return nil unless reader.forward
13860
+
13861
+ # Create the object:
13862
+ object = RegistrationAffinityGroupMapping.new
13863
+
13864
+ # Process the attributes:
13865
+ object.href = reader.get_attribute('href')
13866
+
13867
+ # Discard the start tag:
13868
+ empty = reader.empty_element?
13869
+ reader.read
13870
+ return object if empty
13871
+
13872
+ # Process the inner elements:
13873
+ while reader.forward do
13874
+ case reader.node_name
13875
+ when 'from'
13876
+ object.from = AffinityGroupReader.read_one(reader)
13877
+ when 'to'
13878
+ object.to = AffinityGroupReader.read_one(reader)
13879
+ else
13880
+ reader.next_element
13881
+ end
13882
+ end
13883
+
13884
+ # Discard the end tag:
13885
+ reader.read
13886
+
13887
+ return object
13888
+ end
13889
+
13890
+
13891
+ def self.read_many(reader)
13892
+ # Do nothing if there aren't more tags:
13893
+ list = List.new
13894
+ return list unless reader.forward
13895
+
13896
+ # Process the attributes:
13897
+ list.href = reader.get_attribute('href')
13898
+
13899
+ # Discard the start tag:
13900
+ empty = reader.empty_element?
13901
+ reader.read
13902
+ return list if empty
13903
+
13904
+ # Process the inner elements:
13905
+ while reader.forward do
13906
+ list << read_one(reader)
13907
+ end
13908
+
13909
+ # Discard the end tag:
13910
+ reader.read
13911
+
13912
+ return list
13913
+ end
13914
+
13915
+ end
13916
+
13917
+ class RegistrationAffinityLabelMappingReader < Reader
13918
+
13919
+ def self.read_one(reader)
13920
+ # Do nothing if there aren't more tags:
13921
+ return nil unless reader.forward
13922
+
13923
+ # Create the object:
13924
+ object = RegistrationAffinityLabelMapping.new
13925
+
13926
+ # Process the attributes:
13927
+ object.href = reader.get_attribute('href')
13928
+
13929
+ # Discard the start tag:
13930
+ empty = reader.empty_element?
13931
+ reader.read
13932
+ return object if empty
13933
+
13934
+ # Process the inner elements:
13935
+ while reader.forward do
13936
+ case reader.node_name
13937
+ when 'from'
13938
+ object.from = AffinityLabelReader.read_one(reader)
13939
+ when 'to'
13940
+ object.to = AffinityLabelReader.read_one(reader)
13941
+ else
13942
+ reader.next_element
13943
+ end
13944
+ end
13945
+
13946
+ # Discard the end tag:
13947
+ reader.read
13948
+
13949
+ return object
13950
+ end
13951
+
13952
+
13953
+ def self.read_many(reader)
13954
+ # Do nothing if there aren't more tags:
13955
+ list = List.new
13956
+ return list unless reader.forward
13957
+
13958
+ # Process the attributes:
13959
+ list.href = reader.get_attribute('href')
13960
+
13961
+ # Discard the start tag:
13962
+ empty = reader.empty_element?
13963
+ reader.read
13964
+ return list if empty
13965
+
13966
+ # Process the inner elements:
13967
+ while reader.forward do
13968
+ list << read_one(reader)
13969
+ end
13970
+
13971
+ # Discard the end tag:
13972
+ reader.read
13973
+
13974
+ return list
13975
+ end
13976
+
13977
+ end
13978
+
13979
+ class RegistrationClusterMappingReader < Reader
13980
+
13981
+ def self.read_one(reader)
13982
+ # Do nothing if there aren't more tags:
13983
+ return nil unless reader.forward
13984
+
13985
+ # Create the object:
13986
+ object = RegistrationClusterMapping.new
13987
+
13988
+ # Process the attributes:
13989
+ object.href = reader.get_attribute('href')
13990
+
13991
+ # Discard the start tag:
13992
+ empty = reader.empty_element?
13993
+ reader.read
13994
+ return object if empty
13995
+
13996
+ # Process the inner elements:
13997
+ while reader.forward do
13998
+ case reader.node_name
13999
+ when 'from'
14000
+ object.from = ClusterReader.read_one(reader)
14001
+ when 'to'
14002
+ object.to = ClusterReader.read_one(reader)
14003
+ else
14004
+ reader.next_element
14005
+ end
14006
+ end
14007
+
14008
+ # Discard the end tag:
14009
+ reader.read
14010
+
14011
+ return object
14012
+ end
14013
+
14014
+
14015
+ def self.read_many(reader)
14016
+ # Do nothing if there aren't more tags:
14017
+ list = List.new
14018
+ return list unless reader.forward
14019
+
14020
+ # Process the attributes:
14021
+ list.href = reader.get_attribute('href')
14022
+
14023
+ # Discard the start tag:
14024
+ empty = reader.empty_element?
14025
+ reader.read
14026
+ return list if empty
14027
+
14028
+ # Process the inner elements:
14029
+ while reader.forward do
14030
+ list << read_one(reader)
14031
+ end
14032
+
14033
+ # Discard the end tag:
14034
+ reader.read
14035
+
14036
+ return list
14037
+ end
14038
+
14039
+ end
14040
+
14041
+ class RegistrationConfigurationReader < Reader
14042
+
14043
+ def self.read_one(reader)
14044
+ # Do nothing if there aren't more tags:
14045
+ return nil unless reader.forward
14046
+
14047
+ # Create the object:
14048
+ object = RegistrationConfiguration.new
14049
+
14050
+ # Process the attributes:
14051
+ object.href = reader.get_attribute('href')
14052
+
14053
+ # Discard the start tag:
14054
+ empty = reader.empty_element?
14055
+ reader.read
14056
+ return object if empty
14057
+
14058
+ # Process the inner elements:
14059
+ while reader.forward do
14060
+ case reader.node_name
14061
+ when 'affinity_group_mappings'
14062
+ object.affinity_group_mappings = RegistrationAffinityGroupMappingReader.read_many(reader)
14063
+ when 'affinity_label_mappings'
14064
+ object.affinity_label_mappings = RegistrationAffinityLabelMappingReader.read_many(reader)
14065
+ when 'cluster_mappings'
14066
+ object.cluster_mappings = RegistrationClusterMappingReader.read_many(reader)
14067
+ when 'domain_mappings'
14068
+ object.domain_mappings = RegistrationDomainMappingReader.read_many(reader)
14069
+ when 'lun_mappings'
14070
+ object.lun_mappings = RegistrationLunMappingReader.read_many(reader)
14071
+ when 'role_mappings'
14072
+ object.role_mappings = RegistrationRoleMappingReader.read_many(reader)
14073
+ else
14074
+ reader.next_element
14075
+ end
14076
+ end
14077
+
14078
+ # Discard the end tag:
14079
+ reader.read
14080
+
14081
+ return object
14082
+ end
14083
+
14084
+
14085
+ def self.read_many(reader)
14086
+ # Do nothing if there aren't more tags:
14087
+ list = List.new
14088
+ return list unless reader.forward
14089
+
14090
+ # Process the attributes:
14091
+ list.href = reader.get_attribute('href')
14092
+
14093
+ # Discard the start tag:
14094
+ empty = reader.empty_element?
14095
+ reader.read
14096
+ return list if empty
14097
+
14098
+ # Process the inner elements:
14099
+ while reader.forward do
14100
+ list << read_one(reader)
14101
+ end
14102
+
14103
+ # Discard the end tag:
14104
+ reader.read
14105
+
14106
+ return list
14107
+ end
14108
+
14109
+ end
14110
+
14111
+ class RegistrationDomainMappingReader < Reader
14112
+
14113
+ def self.read_one(reader)
14114
+ # Do nothing if there aren't more tags:
14115
+ return nil unless reader.forward
14116
+
14117
+ # Create the object:
14118
+ object = RegistrationDomainMapping.new
14119
+
14120
+ # Process the attributes:
14121
+ object.href = reader.get_attribute('href')
14122
+
14123
+ # Discard the start tag:
14124
+ empty = reader.empty_element?
14125
+ reader.read
14126
+ return object if empty
14127
+
14128
+ # Process the inner elements:
14129
+ while reader.forward do
14130
+ case reader.node_name
14131
+ when 'from'
14132
+ object.from = DomainReader.read_one(reader)
14133
+ when 'to'
14134
+ object.to = DomainReader.read_one(reader)
14135
+ else
14136
+ reader.next_element
14137
+ end
14138
+ end
14139
+
14140
+ # Discard the end tag:
14141
+ reader.read
14142
+
14143
+ return object
14144
+ end
14145
+
14146
+
14147
+ def self.read_many(reader)
14148
+ # Do nothing if there aren't more tags:
14149
+ list = List.new
14150
+ return list unless reader.forward
14151
+
14152
+ # Process the attributes:
14153
+ list.href = reader.get_attribute('href')
14154
+
14155
+ # Discard the start tag:
14156
+ empty = reader.empty_element?
14157
+ reader.read
14158
+ return list if empty
14159
+
14160
+ # Process the inner elements:
14161
+ while reader.forward do
14162
+ list << read_one(reader)
14163
+ end
14164
+
14165
+ # Discard the end tag:
14166
+ reader.read
14167
+
14168
+ return list
14169
+ end
14170
+
14171
+ end
14172
+
14173
+ class RegistrationLunMappingReader < Reader
14174
+
14175
+ def self.read_one(reader)
14176
+ # Do nothing if there aren't more tags:
14177
+ return nil unless reader.forward
14178
+
14179
+ # Create the object:
14180
+ object = RegistrationLunMapping.new
14181
+
14182
+ # Process the attributes:
14183
+ object.href = reader.get_attribute('href')
14184
+
14185
+ # Discard the start tag:
14186
+ empty = reader.empty_element?
14187
+ reader.read
14188
+ return object if empty
14189
+
14190
+ # Process the inner elements:
14191
+ while reader.forward do
14192
+ case reader.node_name
14193
+ when 'from'
14194
+ object.from = DiskReader.read_one(reader)
14195
+ when 'to'
14196
+ object.to = DiskReader.read_one(reader)
14197
+ else
14198
+ reader.next_element
14199
+ end
14200
+ end
14201
+
14202
+ # Discard the end tag:
14203
+ reader.read
14204
+
14205
+ return object
14206
+ end
14207
+
14208
+
14209
+ def self.read_many(reader)
14210
+ # Do nothing if there aren't more tags:
14211
+ list = List.new
14212
+ return list unless reader.forward
14213
+
14214
+ # Process the attributes:
14215
+ list.href = reader.get_attribute('href')
14216
+
14217
+ # Discard the start tag:
14218
+ empty = reader.empty_element?
14219
+ reader.read
14220
+ return list if empty
14221
+
14222
+ # Process the inner elements:
14223
+ while reader.forward do
14224
+ list << read_one(reader)
14225
+ end
14226
+
14227
+ # Discard the end tag:
14228
+ reader.read
14229
+
14230
+ return list
14231
+ end
14232
+
14233
+ end
14234
+
14235
+ class RegistrationRoleMappingReader < Reader
14236
+
14237
+ def self.read_one(reader)
14238
+ # Do nothing if there aren't more tags:
14239
+ return nil unless reader.forward
14240
+
14241
+ # Create the object:
14242
+ object = RegistrationRoleMapping.new
14243
+
14244
+ # Process the attributes:
14245
+ object.href = reader.get_attribute('href')
14246
+
14247
+ # Discard the start tag:
14248
+ empty = reader.empty_element?
14249
+ reader.read
14250
+ return object if empty
14251
+
14252
+ # Process the inner elements:
14253
+ while reader.forward do
14254
+ case reader.node_name
14255
+ when 'from'
14256
+ object.from = RoleReader.read_one(reader)
14257
+ when 'to'
14258
+ object.to = RoleReader.read_one(reader)
14259
+ else
14260
+ reader.next_element
14261
+ end
14262
+ end
14263
+
14264
+ # Discard the end tag:
14265
+ reader.read
14266
+
14267
+ return object
14268
+ end
14269
+
14270
+
14271
+ def self.read_many(reader)
14272
+ # Do nothing if there aren't more tags:
14273
+ list = List.new
14274
+ return list unless reader.forward
14275
+
14276
+ # Process the attributes:
14277
+ list.href = reader.get_attribute('href')
14278
+
14279
+ # Discard the start tag:
14280
+ empty = reader.empty_element?
14281
+ reader.read
14282
+ return list if empty
14283
+
14284
+ # Process the inner elements:
14285
+ while reader.forward do
14286
+ list << read_one(reader)
14287
+ end
14288
+
14289
+ # Discard the end tag:
14290
+ reader.read
14291
+
14292
+ return list
14293
+ end
14294
+
14295
+ end
14296
+
13759
14297
  class ReportedConfigurationReader < Reader
13760
14298
 
13761
14299
  def self.read_one(reader)
@@ -14697,6 +15235,8 @@ module OvirtSDK4
14697
15235
  object.stop_reason = value if not value.nil?
14698
15236
  value = reader.get_attribute('stop_time')
14699
15237
  object.stop_time = value if not value.nil?
15238
+ value = reader.get_attribute('storage_error_resume_behaviour')
15239
+ object.storage_error_resume_behaviour = value if not value.nil?
14700
15240
  value = reader.get_attribute('tunnel_migration')
14701
15241
  object.tunnel_migration = value if not value.nil?
14702
15242
  value = reader.get_attribute('type')
@@ -14816,6 +15356,8 @@ module OvirtSDK4
14816
15356
  object.stop_reason = Reader.read_string(reader)
14817
15357
  when 'stop_time'
14818
15358
  object.stop_time = Reader.read_date(reader)
15359
+ when 'storage_error_resume_behaviour'
15360
+ object.storage_error_resume_behaviour = Reader.read_enum(VmStorageErrorResumeBehaviour, reader)
14819
15361
  when 'time_zone'
14820
15362
  object.time_zone = TimeZoneReader.read_one(reader)
14821
15363
  when 'tunnel_migration'
@@ -16316,6 +16858,8 @@ module OvirtSDK4
16316
16858
  object.stateless = value if not value.nil?
16317
16859
  value = reader.get_attribute('status')
16318
16860
  object.status = value if not value.nil?
16861
+ value = reader.get_attribute('storage_error_resume_behaviour')
16862
+ object.storage_error_resume_behaviour = value if not value.nil?
16319
16863
  value = reader.get_attribute('tunnel_migration')
16320
16864
  object.tunnel_migration = value if not value.nil?
16321
16865
  value = reader.get_attribute('type')
@@ -16399,6 +16943,8 @@ module OvirtSDK4
16399
16943
  object.stateless = Reader.read_boolean(reader)
16400
16944
  when 'status'
16401
16945
  object.status = Reader.read_enum(TemplateStatus, reader)
16946
+ when 'storage_error_resume_behaviour'
16947
+ object.storage_error_resume_behaviour = Reader.read_enum(VmStorageErrorResumeBehaviour, reader)
16402
16948
  when 'time_zone'
16403
16949
  object.time_zone = TimeZoneReader.read_one(reader)
16404
16950
  when 'tunnel_migration'
@@ -17659,6 +18205,8 @@ module OvirtSDK4
17659
18205
  object.stop_reason = value if not value.nil?
17660
18206
  value = reader.get_attribute('stop_time')
17661
18207
  object.stop_time = value if not value.nil?
18208
+ value = reader.get_attribute('storage_error_resume_behaviour')
18209
+ object.storage_error_resume_behaviour = value if not value.nil?
17662
18210
  value = reader.get_attribute('tunnel_migration')
17663
18211
  object.tunnel_migration = value if not value.nil?
17664
18212
  value = reader.get_attribute('type')
@@ -17770,6 +18318,8 @@ module OvirtSDK4
17770
18318
  object.stop_reason = Reader.read_string(reader)
17771
18319
  when 'stop_time'
17772
18320
  object.stop_time = Reader.read_date(reader)
18321
+ when 'storage_error_resume_behaviour'
18322
+ object.storage_error_resume_behaviour = Reader.read_enum(VmStorageErrorResumeBehaviour, reader)
17773
18323
  when 'time_zone'
17774
18324
  object.time_zone = TimeZoneReader.read_one(reader)
17775
18325
  when 'tunnel_migration'
@@ -17966,6 +18516,8 @@ module OvirtSDK4
17966
18516
  object.start_paused = value if not value.nil?
17967
18517
  value = reader.get_attribute('stateless')
17968
18518
  object.stateless = value if not value.nil?
18519
+ value = reader.get_attribute('storage_error_resume_behaviour')
18520
+ object.storage_error_resume_behaviour = value if not value.nil?
17969
18521
  value = reader.get_attribute('tunnel_migration')
17970
18522
  object.tunnel_migration = value if not value.nil?
17971
18523
  value = reader.get_attribute('type')
@@ -18047,6 +18599,8 @@ module OvirtSDK4
18047
18599
  object.start_paused = Reader.read_boolean(reader)
18048
18600
  when 'stateless'
18049
18601
  object.stateless = Reader.read_boolean(reader)
18602
+ when 'storage_error_resume_behaviour'
18603
+ object.storage_error_resume_behaviour = Reader.read_enum(VmStorageErrorResumeBehaviour, reader)
18050
18604
  when 'time_zone'
18051
18605
  object.time_zone = TimeZoneReader.read_one(reader)
18052
18606
  when 'tunnel_migration'
@@ -19001,6 +19555,8 @@ module OvirtSDK4
19001
19555
  Reader.register('external_host_groups', ExternalHostGroupReader.method(:read_many))
19002
19556
  Reader.register('external_host_provider', ExternalHostProviderReader.method(:read_one))
19003
19557
  Reader.register('external_host_providers', ExternalHostProviderReader.method(:read_many))
19558
+ Reader.register('external_network_provider_configuration', ExternalNetworkProviderConfigurationReader.method(:read_one))
19559
+ Reader.register('external_network_provider_configurations', ExternalNetworkProviderConfigurationReader.method(:read_many))
19004
19560
  Reader.register('external_provider', ExternalProviderReader.method(:read_one))
19005
19561
  Reader.register('external_providers', ExternalProviderReader.method(:read_many))
19006
19562
  Reader.register('external_vm_import', ExternalVmImportReader.method(:read_one))
@@ -19195,6 +19751,20 @@ module OvirtSDK4
19195
19751
  Reader.register('ranges', RangeReader.method(:read_many))
19196
19752
  Reader.register('rate', RateReader.method(:read_one))
19197
19753
  Reader.register('rates', RateReader.method(:read_many))
19754
+ Reader.register('registration_affinity_group_mapping', RegistrationAffinityGroupMappingReader.method(:read_one))
19755
+ Reader.register('registration_affinity_group_mappings', RegistrationAffinityGroupMappingReader.method(:read_many))
19756
+ Reader.register('registration_affinity_label_mapping', RegistrationAffinityLabelMappingReader.method(:read_one))
19757
+ Reader.register('registration_affinity_label_mappings', RegistrationAffinityLabelMappingReader.method(:read_many))
19758
+ Reader.register('registration_cluster_mapping', RegistrationClusterMappingReader.method(:read_one))
19759
+ Reader.register('registration_cluster_mappings', RegistrationClusterMappingReader.method(:read_many))
19760
+ Reader.register('registration_configuration', RegistrationConfigurationReader.method(:read_one))
19761
+ Reader.register('registration_configurations', RegistrationConfigurationReader.method(:read_many))
19762
+ Reader.register('registration_domain_mapping', RegistrationDomainMappingReader.method(:read_one))
19763
+ Reader.register('registration_domain_mappings', RegistrationDomainMappingReader.method(:read_many))
19764
+ Reader.register('registration_lun_mapping', RegistrationLunMappingReader.method(:read_one))
19765
+ Reader.register('registration_lun_mappings', RegistrationLunMappingReader.method(:read_many))
19766
+ Reader.register('registration_role_mapping', RegistrationRoleMappingReader.method(:read_one))
19767
+ Reader.register('registration_role_mappings', RegistrationRoleMappingReader.method(:read_many))
19198
19768
  Reader.register('reported_configuration', ReportedConfigurationReader.method(:read_one))
19199
19769
  Reader.register('reported_configurations', ReportedConfigurationReader.method(:read_many))
19200
19770
  Reader.register('reported_device', ReportedDeviceReader.method(:read_one))