ovirt-engine-sdk 4.0.0.alpha14 → 4.0.0.alpha15

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: cf1696675d47e92593addb9b06009bcd91635eed
4
- data.tar.gz: b72f0002c3ef4748781130e4e3d0027de190d41b
3
+ metadata.gz: 45f68dcb075baaac787e50ab40a5216f83007bee
4
+ data.tar.gz: a2551fe22711d50fa1403679945f7b7f5ce46439
5
5
  SHA512:
6
- metadata.gz: 6bcf816c99cbd8d8c0d8fd1eeb13d87b1e92eff95f30171c2936b4d8b81aa30d10d7c96bbf5ab5d1bff661a629e747026162d4ebf0a982c9290f5e3ceb488cbb
7
- data.tar.gz: be600fc25637f451c44a7c2fc14ef3c21f114b7898e23474bb5caa4183fb3b4c4e605181c4e6d8f3ff23ca7eb56e55f685d44053e158afd6380a887a248fa50a
6
+ metadata.gz: 2cadec05dd57ba9e08d040d117d9ffa03cfc296d2451e91ac4a345a6635ac8a5a3b922f3322f10aa37c993c5704268379d20015f62273e5dc74399c02ad9ed26
7
+ data.tar.gz: 302fd95b00e9742c35b7960d6b1f8c4f06bd71be3411de5d273f4486e6cfb17f81b5d85480c33902715235ef1ed528734a69ce10c8db11aceec82dd407eebc26
@@ -284,10 +284,10 @@ module OvirtSDK4
284
284
 
285
285
  #
286
286
  # Returns a reference to the service corresponding to the given path. For example, if the `path` parameter
287
- # is `vms/123/disks` then it will return a reference to the service that manages the disks for the virtual
288
- # machine with identifier `123`.
287
+ # is `vms/123/diskattachments` then it will return a reference to the service that manages the disk
288
+ # attachments for the virtual machine with identifier `123`.
289
289
  #
290
- # @param path [String] The path of the service, for example `vms/123/disks`.
290
+ # @param path [String] The path of the service, for example `vms/123/diskattachments`.
291
291
  # @return [Service]
292
292
  # @raise [Error] If there is no service corresponding to the given path.
293
293
  #
@@ -325,6 +325,9 @@ module OvirtSDK4
325
325
  @curl.headers['Accept'] = 'application/xml'
326
326
  @curl.headers['Authorization'] = 'Bearer ' + @sso_token
327
327
 
328
+ # Clear any data that may be in the buffers:
329
+ @curl.post_body = nil
330
+
328
331
  # Send the request and wait for the response:
329
332
  case request.method
330
333
  when :DELETE
@@ -3172,6 +3172,8 @@ module OvirtSDK4
3172
3172
 
3173
3173
  # Process the attributes:
3174
3174
  object.href = reader.get_attribute('href')
3175
+ value = reader.get_attribute('active')
3176
+ object.active = value if not value.nil?
3175
3177
  value = reader.get_attribute('bootable')
3176
3178
  object.bootable = value if not value.nil?
3177
3179
  value = reader.get_attribute('comment')
@@ -3193,6 +3195,8 @@ module OvirtSDK4
3193
3195
  # Process the inner elements:
3194
3196
  while reader.forward do
3195
3197
  case reader.node_name
3198
+ when 'active'
3199
+ object.active = Reader.read_boolean(reader)
3196
3200
  when 'bootable'
3197
3201
  object.bootable = Reader.read_boolean(reader)
3198
3202
  when 'comment'
@@ -3207,6 +3211,8 @@ module OvirtSDK4
3207
3211
  object.name = Reader.read_string(reader)
3208
3212
  when 'disk'
3209
3213
  object.disk = DiskReader.read_one(reader)
3214
+ when 'template'
3215
+ object.template = TemplateReader.read_one(reader)
3210
3216
  when 'vm'
3211
3217
  object.vm = VmReader.read_one(reader)
3212
3218
  else
@@ -7966,8 +7972,8 @@ module OvirtSDK4
7966
7972
  object.cluster = ClusterReader.read_one(reader)
7967
7973
  when 'cpu_profile'
7968
7974
  object.cpu_profile = CpuProfileReader.read_one(reader)
7969
- when 'disks'
7970
- object.disks = DiskReader.read_many(reader)
7975
+ when 'disk_attachments'
7976
+ object.disk_attachments = DiskAttachmentReader.read_many(reader)
7971
7977
  when 'graphics_consoles'
7972
7978
  object.graphics_consoles = GraphicsConsoleReader.read_many(reader)
7973
7979
  when 'nics'
@@ -8028,8 +8034,8 @@ module OvirtSDK4
8028
8034
  case rel
8029
8035
  when 'cdroms'
8030
8036
  object.cdroms = list
8031
- when 'disks'
8032
- object.disks = list
8037
+ when 'diskattachments'
8038
+ object.disk_attachments = list
8033
8039
  when 'graphicsconsoles'
8034
8040
  object.graphics_consoles = list
8035
8041
  when 'nics'
@@ -14081,8 +14087,6 @@ module OvirtSDK4
14081
14087
  object.cpu_profile = CpuProfileReader.read_one(reader)
14082
14088
  when 'disk_attachments'
14083
14089
  object.disk_attachments = DiskAttachmentReader.read_many(reader)
14084
- when 'disks'
14085
- object.disks = DiskReader.read_many(reader)
14086
14090
  when 'external_host_provider'
14087
14091
  object.external_host_provider = ExternalHostProviderReader.read_one(reader)
14088
14092
  when 'floppies'
@@ -14179,8 +14183,6 @@ module OvirtSDK4
14179
14183
  object.cdroms = list
14180
14184
  when 'diskattachments'
14181
14185
  object.disk_attachments = list
14182
- when 'disks'
14183
- object.disks = list
14184
14186
  when 'floppies'
14185
14187
  object.floppies = list
14186
14188
  when 'graphicsconsoles'
@@ -15436,8 +15438,8 @@ module OvirtSDK4
15436
15438
  object.cluster = ClusterReader.read_one(reader)
15437
15439
  when 'cpu_profile'
15438
15440
  object.cpu_profile = CpuProfileReader.read_one(reader)
15439
- when 'disks'
15440
- object.disks = DiskReader.read_many(reader)
15441
+ when 'disk_attachments'
15442
+ object.disk_attachments = DiskAttachmentReader.read_many(reader)
15441
15443
  when 'graphics_consoles'
15442
15444
  object.graphics_consoles = GraphicsConsoleReader.read_many(reader)
15443
15445
  when 'nics'
@@ -15498,8 +15500,8 @@ module OvirtSDK4
15498
15500
  case rel
15499
15501
  when 'cdroms'
15500
15502
  object.cdroms = list
15501
- when 'disks'
15502
- object.disks = list
15503
+ when 'diskattachments'
15504
+ object.disk_attachments = list
15503
15505
  when 'graphicsconsoles'
15504
15506
  object.graphics_consoles = list
15505
15507
  when 'nics'
@@ -16803,8 +16805,6 @@ module OvirtSDK4
16803
16805
  object.cpu_profile = CpuProfileReader.read_one(reader)
16804
16806
  when 'disk_attachments'
16805
16807
  object.disk_attachments = DiskAttachmentReader.read_many(reader)
16806
- when 'disks'
16807
- object.disks = DiskReader.read_many(reader)
16808
16808
  when 'external_host_provider'
16809
16809
  object.external_host_provider = ExternalHostProviderReader.read_one(reader)
16810
16810
  when 'floppies'
@@ -16899,8 +16899,6 @@ module OvirtSDK4
16899
16899
  object.cdroms = list
16900
16900
  when 'diskattachments'
16901
16901
  object.disk_attachments = list
16902
- when 'disks'
16903
- object.disks = list
16904
16902
  when 'floppies'
16905
16903
  object.floppies = list
16906
16904
  when 'graphicsconsoles'
@@ -584,6 +584,12 @@ module OvirtSDK4
584
584
  class TemplateDiskService < Service
585
585
  end
586
586
 
587
+ class TemplateDiskAttachmentService < Service
588
+ end
589
+
590
+ class TemplateDiskAttachmentsService < Service
591
+ end
592
+
587
593
  class TemplateDisksService < Service
588
594
  end
589
595
 
@@ -796,7 +802,7 @@ module OvirtSDK4
796
802
  request = Request.new(:method => :PUT, :path => @path)
797
803
  begin
798
804
  writer = XmlWriter.new(nil, true)
799
- AffinityGroupWriter.write_one(group, writer, 'group')
805
+ AffinityGroupWriter.write_one(group, writer)
800
806
  request.body = writer.string
801
807
  ensure
802
808
  writer.close
@@ -947,7 +953,7 @@ module OvirtSDK4
947
953
  request = Request.new(:method => :POST, :path => @path)
948
954
  begin
949
955
  writer = XmlWriter.new(nil, true)
950
- VmWriter.write_one(vm, writer, 'vm')
956
+ VmWriter.write_one(vm, writer)
951
957
  request.body = writer.string
952
958
  ensure
953
959
  writer.close
@@ -1068,7 +1074,7 @@ module OvirtSDK4
1068
1074
  request = Request.new(:method => :POST, :path => @path)
1069
1075
  begin
1070
1076
  writer = XmlWriter.new(nil, true)
1071
- AffinityGroupWriter.write_one(group, writer, 'group')
1077
+ AffinityGroupWriter.write_one(group, writer)
1072
1078
  request.body = writer.string
1073
1079
  ensure
1074
1080
  writer.close
@@ -1226,7 +1232,7 @@ module OvirtSDK4
1226
1232
  request = Request.new(:method => :PUT, :path => @path)
1227
1233
  begin
1228
1234
  writer = XmlWriter.new(nil, true)
1229
- AffinityLabelWriter.write_one(label, writer, 'label')
1235
+ AffinityLabelWriter.write_one(label, writer)
1230
1236
  request.body = writer.string
1231
1237
  ensure
1232
1238
  writer.close
@@ -1408,7 +1414,7 @@ module OvirtSDK4
1408
1414
  request = Request.new(:method => :POST, :path => @path)
1409
1415
  begin
1410
1416
  writer = XmlWriter.new(nil, true)
1411
- HostWriter.write_one(host, writer, 'host')
1417
+ HostWriter.write_one(host, writer)
1412
1418
  request.body = writer.string
1413
1419
  ensure
1414
1420
  writer.close
@@ -1601,7 +1607,7 @@ module OvirtSDK4
1601
1607
  request = Request.new(:method => :POST, :path => @path)
1602
1608
  begin
1603
1609
  writer = XmlWriter.new(nil, true)
1604
- VmWriter.write_one(vm, writer, 'vm')
1610
+ VmWriter.write_one(vm, writer)
1605
1611
  request.body = writer.string
1606
1612
  ensure
1607
1613
  writer.close
@@ -1716,7 +1722,7 @@ module OvirtSDK4
1716
1722
  request = Request.new(:method => :POST, :path => @path)
1717
1723
  begin
1718
1724
  writer = XmlWriter.new(nil, true)
1719
- AffinityLabelWriter.write_one(label, writer, 'label')
1725
+ AffinityLabelWriter.write_one(label, writer)
1720
1726
  request.body = writer.string
1721
1727
  ensure
1722
1728
  writer.close
@@ -1915,7 +1921,7 @@ module OvirtSDK4
1915
1921
  request = Request.new(:method => :POST, :path => @path)
1916
1922
  begin
1917
1923
  writer = XmlWriter.new(nil, true)
1918
- AffinityLabelWriter.write_one(label, writer, 'label')
1924
+ AffinityLabelWriter.write_one(label, writer)
1919
1925
  request.body = writer.string
1920
1926
  ensure
1921
1927
  writer.close
@@ -2115,7 +2121,7 @@ module OvirtSDK4
2115
2121
  request = Request.new(:method => :POST, :path => @path)
2116
2122
  begin
2117
2123
  writer = XmlWriter.new(nil, true)
2118
- CpuProfileWriter.write_one(profile, writer, 'profile')
2124
+ CpuProfileWriter.write_one(profile, writer)
2119
2125
  request.body = writer.string
2120
2126
  ensure
2121
2127
  writer.close
@@ -2321,7 +2327,7 @@ module OvirtSDK4
2321
2327
  request = Request.new(:method => :POST, :path => @path)
2322
2328
  begin
2323
2329
  writer = XmlWriter.new(nil, true)
2324
- DiskProfileWriter.write_one(profile, writer, 'profile')
2330
+ DiskProfileWriter.write_one(profile, writer)
2325
2331
  request.body = writer.string
2326
2332
  ensure
2327
2333
  writer.close
@@ -2482,7 +2488,7 @@ module OvirtSDK4
2482
2488
  request = Request.new(:method => :PUT, :path => @path)
2483
2489
  begin
2484
2490
  writer = XmlWriter.new(nil, true)
2485
- NetworkWriter.write_one(network, writer, 'network')
2491
+ NetworkWriter.write_one(network, writer)
2486
2492
  request.body = writer.string
2487
2493
  ensure
2488
2494
  writer.close
@@ -2557,7 +2563,7 @@ module OvirtSDK4
2557
2563
  request = Request.new(:method => :POST, :path => @path)
2558
2564
  begin
2559
2565
  writer = XmlWriter.new(nil, true)
2560
- NetworkWriter.write_one(network, writer, 'network')
2566
+ NetworkWriter.write_one(network, writer)
2561
2567
  request.body = writer.string
2562
2568
  ensure
2563
2569
  writer.close
@@ -2677,7 +2683,7 @@ module OvirtSDK4
2677
2683
  request = Request.new(:method => :POST, :path => @path)
2678
2684
  begin
2679
2685
  writer = XmlWriter.new(nil, true)
2680
- PermissionWriter.write_one(permission, writer, 'permission')
2686
+ PermissionWriter.write_one(permission, writer)
2681
2687
  request.body = writer.string
2682
2688
  ensure
2683
2689
  writer.close
@@ -2964,7 +2970,7 @@ module OvirtSDK4
2964
2970
  request = Request.new(:method => :POST, :path => @path)
2965
2971
  begin
2966
2972
  writer = XmlWriter.new(nil, true)
2967
- TagWriter.write_one(tag, writer, 'tag')
2973
+ TagWriter.write_one(tag, writer)
2968
2974
  request.body = writer.string
2969
2975
  ensure
2970
2976
  writer.close
@@ -3184,7 +3190,7 @@ module OvirtSDK4
3184
3190
  request = Request.new(:method => :POST, :path => @path)
3185
3191
  begin
3186
3192
  writer = XmlWriter.new(nil, true)
3187
- VnicProfileWriter.write_one(profile, writer, 'profile')
3193
+ VnicProfileWriter.write_one(profile, writer)
3188
3194
  request.body = writer.string
3189
3195
  ensure
3190
3196
  writer.close
@@ -3450,7 +3456,7 @@ module OvirtSDK4
3450
3456
  request = Request.new(:method => :POST, :path => @path)
3451
3457
  begin
3452
3458
  writer = XmlWriter.new(nil, true)
3453
- StorageDomainWriter.write_one(storage_domain, writer, 'storage_domain')
3459
+ StorageDomainWriter.write_one(storage_domain, writer)
3454
3460
  request.body = writer.string
3455
3461
  ensure
3456
3462
  writer.close
@@ -3663,7 +3669,7 @@ module OvirtSDK4
3663
3669
  request = Request.new(:method => :POST, :path => @path)
3664
3670
  begin
3665
3671
  writer = XmlWriter.new(nil, true)
3666
- BalanceWriter.write_one(balance, writer, 'balance')
3672
+ BalanceWriter.write_one(balance, writer)
3667
3673
  request.body = writer.string
3668
3674
  ensure
3669
3675
  writer.close
@@ -3831,7 +3837,7 @@ module OvirtSDK4
3831
3837
  request = Request.new(:method => :PUT, :path => @path)
3832
3838
  begin
3833
3839
  writer = XmlWriter.new(nil, true)
3834
- BookmarkWriter.write_one(bookmark, writer, 'bookmark')
3840
+ BookmarkWriter.write_one(bookmark, writer)
3835
3841
  request.body = writer.string
3836
3842
  ensure
3837
3843
  writer.close
@@ -3906,7 +3912,7 @@ module OvirtSDK4
3906
3912
  request = Request.new(:method => :POST, :path => @path)
3907
3913
  begin
3908
3914
  writer = XmlWriter.new(nil, true)
3909
- BookmarkWriter.write_one(bookmark, writer, 'bookmark')
3915
+ BookmarkWriter.write_one(bookmark, writer)
3910
3916
  request.body = writer.string
3911
3917
  ensure
3912
3918
  writer.close
@@ -4097,7 +4103,7 @@ module OvirtSDK4
4097
4103
  request = Request.new(:method => :PUT, :path => @path)
4098
4104
  begin
4099
4105
  writer = XmlWriter.new(nil, true)
4100
- ClusterWriter.write_one(cluster, writer, 'cluster')
4106
+ ClusterWriter.write_one(cluster, writer)
4101
4107
  request.body = writer.string
4102
4108
  ensure
4103
4109
  writer.close
@@ -4415,7 +4421,7 @@ module OvirtSDK4
4415
4421
  request = Request.new(:method => :POST, :path => @path)
4416
4422
  begin
4417
4423
  writer = XmlWriter.new(nil, true)
4418
- ClusterWriter.write_one(cluster, writer, 'cluster')
4424
+ ClusterWriter.write_one(cluster, writer)
4419
4425
  request.body = writer.string
4420
4426
  ensure
4421
4427
  writer.close
@@ -4662,7 +4668,7 @@ module OvirtSDK4
4662
4668
  request = Request.new(:method => :PUT, :path => @path)
4663
4669
  begin
4664
4670
  writer = XmlWriter.new(nil, true)
4665
- CpuProfileWriter.write_one(profile, writer, 'profile')
4671
+ CpuProfileWriter.write_one(profile, writer)
4666
4672
  request.body = writer.string
4667
4673
  ensure
4668
4674
  writer.close
@@ -4751,7 +4757,7 @@ module OvirtSDK4
4751
4757
  request = Request.new(:method => :POST, :path => @path)
4752
4758
  begin
4753
4759
  writer = XmlWriter.new(nil, true)
4754
- CpuProfileWriter.write_one(profile, writer, 'profile')
4760
+ CpuProfileWriter.write_one(profile, writer)
4755
4761
  request.body = writer.string
4756
4762
  ensure
4757
4763
  writer.close
@@ -4919,7 +4925,7 @@ module OvirtSDK4
4919
4925
  request = Request.new(:method => :PUT, :path => @path)
4920
4926
  begin
4921
4927
  writer = XmlWriter.new(nil, true)
4922
- DataCenterWriter.write_one(data_center, writer, 'data_center')
4928
+ DataCenterWriter.write_one(data_center, writer)
4923
4929
  request.body = writer.string
4924
4930
  ensure
4925
4931
  writer.close
@@ -5092,7 +5098,7 @@ module OvirtSDK4
5092
5098
  request = Request.new(:method => :POST, :path => @path)
5093
5099
  begin
5094
5100
  writer = XmlWriter.new(nil, true)
5095
- DataCenterWriter.write_one(data_center, writer, 'data_center')
5101
+ DataCenterWriter.write_one(data_center, writer)
5096
5102
  request.body = writer.string
5097
5103
  ensure
5098
5104
  writer.close
@@ -5291,7 +5297,7 @@ module OvirtSDK4
5291
5297
  request = Request.new(:method => :PUT, :path => @path)
5292
5298
  begin
5293
5299
  writer = XmlWriter.new(nil, true)
5294
- DiskAttachmentWriter.write_one(disk_attachment, writer, 'disk_attachment')
5300
+ DiskAttachmentWriter.write_one(disk_attachment, writer)
5295
5301
  request.body = writer.string
5296
5302
  ensure
5297
5303
  writer.close
@@ -5393,7 +5399,7 @@ module OvirtSDK4
5393
5399
  request = Request.new(:method => :POST, :path => @path)
5394
5400
  begin
5395
5401
  writer = XmlWriter.new(nil, true)
5396
- DiskAttachmentWriter.write_one(attachment, writer, 'attachment')
5402
+ DiskAttachmentWriter.write_one(attachment, writer)
5397
5403
  request.body = writer.string
5398
5404
  ensure
5399
5405
  writer.close
@@ -5547,7 +5553,7 @@ module OvirtSDK4
5547
5553
  request = Request.new(:method => :PUT, :path => @path)
5548
5554
  begin
5549
5555
  writer = XmlWriter.new(nil, true)
5550
- DiskProfileWriter.write_one(profile, writer, 'profile')
5556
+ DiskProfileWriter.write_one(profile, writer)
5551
5557
  request.body = writer.string
5552
5558
  ensure
5553
5559
  writer.close
@@ -5636,7 +5642,7 @@ module OvirtSDK4
5636
5642
  request = Request.new(:method => :POST, :path => @path)
5637
5643
  begin
5638
5644
  writer = XmlWriter.new(nil, true)
5639
- DiskProfileWriter.write_one(profile, writer, 'profile')
5645
+ DiskProfileWriter.write_one(profile, writer)
5640
5646
  request.body = writer.string
5641
5647
  ensure
5642
5648
  writer.close
@@ -5929,7 +5935,7 @@ module OvirtSDK4
5929
5935
  request = Request.new(:method => :POST, :path => @path)
5930
5936
  begin
5931
5937
  writer = XmlWriter.new(nil, true)
5932
- DiskWriter.write_one(disk, writer, 'disk')
5938
+ DiskWriter.write_one(disk, writer)
5933
5939
  request.body = writer.string
5934
5940
  ensure
5935
5941
  writer.close
@@ -6651,7 +6657,41 @@ module OvirtSDK4
6651
6657
  end
6652
6658
 
6653
6659
  #
6654
- # Adds a new `event`.
6660
+ # Adds an external event to the internal audit log.
6661
+ #
6662
+ # This is intended for integration with external systems that detect or produce events relevant for the
6663
+ # administrator of the system. For example, an external monitoring tool may be able to detect that a file system
6664
+ # is full inside the guest operating system of a virtual machine. This event can be added to the internal audit
6665
+ # log sending a request like this:
6666
+ #
6667
+ # [source]
6668
+ # ----
6669
+ # POST /ovirt-engine/api/events
6670
+ # <event>
6671
+ # <description>File system /home is full</description>
6672
+ # <severity>alert</severity>
6673
+ # <origin>mymonitor</origin>
6674
+ # <custom_id>1467879754</custom_id>
6675
+ # </event>
6676
+ # ----
6677
+ #
6678
+ # Events can also be linked to specific objects. For example, the above event could be linked to the specific
6679
+ # virtual machine where it happened, using the `vm` link:
6680
+ #
6681
+ # [source]
6682
+ # ----
6683
+ # POST /ovirt-engine/api/events
6684
+ # <event>
6685
+ # <description>File system /home is full</description>
6686
+ # <severity>alert</severity>
6687
+ # <origin>mymonitor</origin>
6688
+ # <custom_id>1467879754</custom_id>
6689
+ # <vm id="aae98225-5b73-490d-a252-899209af17e9"/>
6690
+ # </event>
6691
+ # ----
6692
+ #
6693
+ # NOTE: When using links, like the `vm` in the previous example, only the `id` attribute is accepted. The `name`
6694
+ # attribute, if provided, is simply ignored.
6655
6695
  #
6656
6696
  # @param event [Event]
6657
6697
  #
@@ -6664,7 +6704,7 @@ module OvirtSDK4
6664
6704
  request = Request.new(:method => :POST, :path => @path)
6665
6705
  begin
6666
6706
  writer = XmlWriter.new(nil, true)
6667
- EventWriter.write_one(event, writer, 'event')
6707
+ EventWriter.write_one(event, writer)
6668
6708
  request.body = writer.string
6669
6709
  ensure
6670
6710
  writer.close
@@ -6692,6 +6732,19 @@ module OvirtSDK4
6692
6732
  # account. The default value is `true`, which means that case is taken into account. If you want to search
6693
6733
  # ignoring case set it to `false`.
6694
6734
  #
6735
+ # @option opts [Integer] :from Indicates the identifier of the the first event that should be returned. The identifiers of events are
6736
+ # strictly increasing, so when this parameter is used only the events with that identifiers equal or greater
6737
+ # than the given value will be returned. For example, the following request will return only the events
6738
+ # with identifiers greater or equal than `123`:
6739
+ #
6740
+ # [source]
6741
+ # ----
6742
+ # GET /ovirt-engine/api/events?from=123
6743
+ # ----
6744
+ #
6745
+ # This parameter is optional, and if not specified then the first event returned will be most recently
6746
+ # generated.
6747
+ #
6695
6748
  # @option opts [Integer] :max Sets the maximum number of events to return. If not specified all the events are returned.
6696
6749
  #
6697
6750
  # @option opts [String] :search A query string used to restrict the returned events.
@@ -6705,6 +6758,11 @@ module OvirtSDK4
6705
6758
  value = Writer.render_boolean(value)
6706
6759
  query['case_sensitive'] = value
6707
6760
  end
6761
+ value = opts[:from]
6762
+ unless value.nil?
6763
+ value = Writer.render_integer(value)
6764
+ query['from'] = value
6765
+ end
6708
6766
  value = opts[:max]
6709
6767
  unless value.nil?
6710
6768
  value = Writer.render_integer(value)
@@ -7343,7 +7401,7 @@ module OvirtSDK4
7343
7401
  request = Request.new(:method => :POST, :path => @path)
7344
7402
  begin
7345
7403
  writer = XmlWriter.new(nil, true)
7346
- ExternalHostProviderWriter.write_one(provider, writer, 'provider')
7404
+ ExternalHostProviderWriter.write_one(provider, writer)
7347
7405
  request.body = writer.string
7348
7406
  ensure
7349
7407
  writer.close
@@ -7844,7 +7902,7 @@ module OvirtSDK4
7844
7902
  request = Request.new(:method => :PUT, :path => @path)
7845
7903
  begin
7846
7904
  writer = XmlWriter.new(nil, true)
7847
- AgentWriter.write_one(agent, writer, 'agent')
7905
+ AgentWriter.write_one(agent, writer)
7848
7906
  request.body = writer.string
7849
7907
  ensure
7850
7908
  writer.close
@@ -7919,7 +7977,7 @@ module OvirtSDK4
7919
7977
  request = Request.new(:method => :POST, :path => @path)
7920
7978
  begin
7921
7979
  writer = XmlWriter.new(nil, true)
7922
- AgentWriter.write_one(agent, writer, 'agent')
7980
+ AgentWriter.write_one(agent, writer)
7923
7981
  request.body = writer.string
7924
7982
  ensure
7925
7983
  writer.close
@@ -8299,7 +8357,7 @@ module OvirtSDK4
8299
8357
  request = Request.new(:method => :POST, :path => @path)
8300
8358
  begin
8301
8359
  writer = XmlWriter.new(nil, true)
8302
- FilterWriter.write_one(filter, writer, 'filter')
8360
+ FilterWriter.write_one(filter, writer)
8303
8361
  request.body = writer.string
8304
8362
  ensure
8305
8363
  writer.close
@@ -8455,7 +8513,7 @@ module OvirtSDK4
8455
8513
  request = Request.new(:method => :POST, :path => @path)
8456
8514
  begin
8457
8515
  writer = XmlWriter.new(nil, true)
8458
- GlusterBrickWriter.write_many(bricks, writer, 'bricks')
8516
+ GlusterBrickWriter.write_many(bricks, writer)
8459
8517
  request.body = writer.string
8460
8518
  ensure
8461
8519
  writer.close
@@ -8901,7 +8959,7 @@ module OvirtSDK4
8901
8959
  request = Request.new(:method => :POST, :path => @path)
8902
8960
  begin
8903
8961
  writer = XmlWriter.new(nil, true)
8904
- GlusterVolumeWriter.write_one(volume, writer, 'volume')
8962
+ GlusterVolumeWriter.write_one(volume, writer)
8905
8963
  request.body = writer.string
8906
8964
  ensure
8907
8965
  writer.close
@@ -9122,7 +9180,7 @@ module OvirtSDK4
9122
9180
  request = Request.new(:method => :POST, :path => @path)
9123
9181
  begin
9124
9182
  writer = XmlWriter.new(nil, true)
9125
- GraphicsConsoleWriter.write_one(console, writer, 'console')
9183
+ GraphicsConsoleWriter.write_one(console, writer)
9126
9184
  request.body = writer.string
9127
9185
  ensure
9128
9186
  writer.close
@@ -9370,7 +9428,7 @@ module OvirtSDK4
9370
9428
  request = Request.new(:method => :POST, :path => @path)
9371
9429
  begin
9372
9430
  writer = XmlWriter.new(nil, true)
9373
- GroupWriter.write_one(group, writer, 'group')
9431
+ GroupWriter.write_one(group, writer)
9374
9432
  request.body = writer.string
9375
9433
  ensure
9376
9434
  writer.close
@@ -10119,7 +10177,7 @@ module OvirtSDK4
10119
10177
  request = Request.new(:method => :POST, :path => @path)
10120
10178
  begin
10121
10179
  writer = XmlWriter.new(nil, true)
10122
- HostWriter.write_one(host, writer, 'host')
10180
+ HostWriter.write_one(host, writer)
10123
10181
  request.body = writer.string
10124
10182
  ensure
10125
10183
  writer.close
@@ -10629,7 +10687,7 @@ module OvirtSDK4
10629
10687
  request = Request.new(:method => :PUT, :path => @path)
10630
10688
  begin
10631
10689
  writer = XmlWriter.new(nil, true)
10632
- InstanceTypeWriter.write_one(instance_type, writer, 'instance_type')
10690
+ InstanceTypeWriter.write_one(instance_type, writer)
10633
10691
  request.body = writer.string
10634
10692
  ensure
10635
10693
  writer.close
@@ -10787,7 +10845,7 @@ module OvirtSDK4
10787
10845
  request = Request.new(:method => :PUT, :path => @path)
10788
10846
  begin
10789
10847
  writer = XmlWriter.new(nil, true)
10790
- NicWriter.write_one(nic, writer, 'nic')
10848
+ NicWriter.write_one(nic, writer)
10791
10849
  request.body = writer.string
10792
10850
  ensure
10793
10851
  writer.close
@@ -10862,7 +10920,7 @@ module OvirtSDK4
10862
10920
  request = Request.new(:method => :POST, :path => @path)
10863
10921
  begin
10864
10922
  writer = XmlWriter.new(nil, true)
10865
- NicWriter.write_one(nic, writer, 'nic')
10923
+ NicWriter.write_one(nic, writer)
10866
10924
  request.body = writer.string
10867
10925
  ensure
10868
10926
  writer.close
@@ -11023,7 +11081,7 @@ module OvirtSDK4
11023
11081
  request = Request.new(:method => :PUT, :path => @path)
11024
11082
  begin
11025
11083
  writer = XmlWriter.new(nil, true)
11026
- WatchdogWriter.write_one(watchdog, writer, 'watchdog')
11084
+ WatchdogWriter.write_one(watchdog, writer)
11027
11085
  request.body = writer.string
11028
11086
  ensure
11029
11087
  writer.close
@@ -11098,7 +11156,7 @@ module OvirtSDK4
11098
11156
  request = Request.new(:method => :POST, :path => @path)
11099
11157
  begin
11100
11158
  writer = XmlWriter.new(nil, true)
11101
- WatchdogWriter.write_one(watchdog, writer, 'watchdog')
11159
+ WatchdogWriter.write_one(watchdog, writer)
11102
11160
  request.body = writer.string
11103
11161
  ensure
11104
11162
  writer.close
@@ -11218,7 +11276,7 @@ module OvirtSDK4
11218
11276
  request = Request.new(:method => :POST, :path => @path)
11219
11277
  begin
11220
11278
  writer = XmlWriter.new(nil, true)
11221
- InstanceTypeWriter.write_one(instance_type, writer, 'instance_type')
11279
+ InstanceTypeWriter.write_one(instance_type, writer)
11222
11280
  request.body = writer.string
11223
11281
  ensure
11224
11282
  writer.close
@@ -11379,7 +11437,7 @@ module OvirtSDK4
11379
11437
  request = Request.new(:method => :PUT, :path => @path)
11380
11438
  begin
11381
11439
  writer = XmlWriter.new(nil, true)
11382
- IscsiBondWriter.write_one(bond, writer, 'bond')
11440
+ IscsiBondWriter.write_one(bond, writer)
11383
11441
  request.body = writer.string
11384
11442
  ensure
11385
11443
  writer.close
@@ -11482,7 +11540,7 @@ module OvirtSDK4
11482
11540
  request = Request.new(:method => :POST, :path => @path)
11483
11541
  begin
11484
11542
  writer = XmlWriter.new(nil, true)
11485
- IscsiBondWriter.write_one(bond, writer, 'bond')
11543
+ IscsiBondWriter.write_one(bond, writer)
11486
11544
  request.body = writer.string
11487
11545
  ensure
11488
11546
  writer.close
@@ -11727,7 +11785,7 @@ module OvirtSDK4
11727
11785
  request = Request.new(:method => :POST, :path => @path)
11728
11786
  begin
11729
11787
  writer = XmlWriter.new(nil, true)
11730
- JobWriter.write_one(job, writer, 'job')
11788
+ JobWriter.write_one(job, writer)
11731
11789
  request.body = writer.string
11732
11790
  ensure
11733
11791
  writer.close
@@ -12040,7 +12098,7 @@ module OvirtSDK4
12040
12098
  request = Request.new(:method => :PUT, :path => @path)
12041
12099
  begin
12042
12100
  writer = XmlWriter.new(nil, true)
12043
- MacPoolWriter.write_one(pool, writer, 'pool')
12101
+ MacPoolWriter.write_one(pool, writer)
12044
12102
  request.body = writer.string
12045
12103
  ensure
12046
12104
  writer.close
@@ -12115,7 +12173,7 @@ module OvirtSDK4
12115
12173
  request = Request.new(:method => :POST, :path => @path)
12116
12174
  begin
12117
12175
  writer = XmlWriter.new(nil, true)
12118
- MacPoolWriter.write_one(pool, writer, 'pool')
12176
+ MacPoolWriter.write_one(pool, writer)
12119
12177
  request.body = writer.string
12120
12178
  ensure
12121
12179
  writer.close
@@ -12395,7 +12453,7 @@ module OvirtSDK4
12395
12453
  request = Request.new(:method => :PUT, :path => @path)
12396
12454
  begin
12397
12455
  writer = XmlWriter.new(nil, true)
12398
- NetworkWriter.write_one(network, writer, 'network')
12456
+ NetworkWriter.write_one(network, writer)
12399
12457
  request.body = writer.string
12400
12458
  ensure
12401
12459
  writer.close
@@ -12553,7 +12611,7 @@ module OvirtSDK4
12553
12611
  request = Request.new(:method => :PUT, :path => @path)
12554
12612
  begin
12555
12613
  writer = XmlWriter.new(nil, true)
12556
- NetworkAttachmentWriter.write_one(attachment, writer, 'attachment')
12614
+ NetworkAttachmentWriter.write_one(attachment, writer)
12557
12615
  request.body = writer.string
12558
12616
  ensure
12559
12617
  writer.close
@@ -12628,7 +12686,7 @@ module OvirtSDK4
12628
12686
  request = Request.new(:method => :POST, :path => @path)
12629
12687
  begin
12630
12688
  writer = XmlWriter.new(nil, true)
12631
- NetworkAttachmentWriter.write_one(attachment, writer, 'attachment')
12689
+ NetworkAttachmentWriter.write_one(attachment, writer)
12632
12690
  request.body = writer.string
12633
12691
  ensure
12634
12692
  writer.close
@@ -12979,7 +13037,7 @@ module OvirtSDK4
12979
13037
  request = Request.new(:method => :POST, :path => @path)
12980
13038
  begin
12981
13039
  writer = XmlWriter.new(nil, true)
12982
- NetworkLabelWriter.write_one(label, writer, 'label')
13040
+ NetworkLabelWriter.write_one(label, writer)
12983
13041
  request.body = writer.string
12984
13042
  ensure
12985
13043
  writer.close
@@ -13099,7 +13157,7 @@ module OvirtSDK4
13099
13157
  request = Request.new(:method => :POST, :path => @path)
13100
13158
  begin
13101
13159
  writer = XmlWriter.new(nil, true)
13102
- NetworkWriter.write_one(network, writer, 'network')
13160
+ NetworkWriter.write_one(network, writer)
13103
13161
  request.body = writer.string
13104
13162
  ensure
13105
13163
  writer.close
@@ -13409,7 +13467,7 @@ module OvirtSDK4
13409
13467
  request = Request.new(:method => :PUT, :path => @path)
13410
13468
  begin
13411
13469
  writer = XmlWriter.new(nil, true)
13412
- OpenStackImageProviderWriter.write_one(provider, writer, 'provider')
13470
+ OpenStackImageProviderWriter.write_one(provider, writer)
13413
13471
  request.body = writer.string
13414
13472
  ensure
13415
13473
  writer.close
@@ -13512,7 +13570,7 @@ module OvirtSDK4
13512
13570
  request = Request.new(:method => :POST, :path => @path)
13513
13571
  begin
13514
13572
  writer = XmlWriter.new(nil, true)
13515
- OpenStackImageProviderWriter.write_one(provider, writer, 'provider')
13573
+ OpenStackImageProviderWriter.write_one(provider, writer)
13516
13574
  request.body = writer.string
13517
13575
  ensure
13518
13576
  writer.close
@@ -13909,7 +13967,7 @@ module OvirtSDK4
13909
13967
  request = Request.new(:method => :PUT, :path => @path)
13910
13968
  begin
13911
13969
  writer = XmlWriter.new(nil, true)
13912
- OpenStackNetworkProviderWriter.write_one(provider, writer, 'provider')
13970
+ OpenStackNetworkProviderWriter.write_one(provider, writer)
13913
13971
  request.body = writer.string
13914
13972
  ensure
13915
13973
  writer.close
@@ -14013,7 +14071,7 @@ module OvirtSDK4
14013
14071
  request = Request.new(:method => :POST, :path => @path)
14014
14072
  begin
14015
14073
  writer = XmlWriter.new(nil, true)
14016
- OpenStackNetworkProviderWriter.write_one(provider, writer, 'provider')
14074
+ OpenStackNetworkProviderWriter.write_one(provider, writer)
14017
14075
  request.body = writer.string
14018
14076
  ensure
14019
14077
  writer.close
@@ -14306,7 +14364,7 @@ module OvirtSDK4
14306
14364
  request = Request.new(:method => :POST, :path => @path)
14307
14365
  begin
14308
14366
  writer = XmlWriter.new(nil, true)
14309
- OpenStackSubnetWriter.write_one(subnet, writer, 'subnet')
14367
+ OpenStackSubnetWriter.write_one(subnet, writer)
14310
14368
  request.body = writer.string
14311
14369
  ensure
14312
14370
  writer.close
@@ -14467,7 +14525,7 @@ module OvirtSDK4
14467
14525
  request = Request.new(:method => :PUT, :path => @path)
14468
14526
  begin
14469
14527
  writer = XmlWriter.new(nil, true)
14470
- OpenstackVolumeAuthenticationKeyWriter.write_one(key, writer, 'key')
14528
+ OpenstackVolumeAuthenticationKeyWriter.write_one(key, writer)
14471
14529
  request.body = writer.string
14472
14530
  ensure
14473
14531
  writer.close
@@ -14542,7 +14600,7 @@ module OvirtSDK4
14542
14600
  request = Request.new(:method => :POST, :path => @path)
14543
14601
  begin
14544
14602
  writer = XmlWriter.new(nil, true)
14545
- OpenstackVolumeAuthenticationKeyWriter.write_one(key, writer, 'key')
14603
+ OpenstackVolumeAuthenticationKeyWriter.write_one(key, writer)
14546
14604
  request.body = writer.string
14547
14605
  ensure
14548
14606
  writer.close
@@ -14749,7 +14807,7 @@ module OvirtSDK4
14749
14807
  request = Request.new(:method => :PUT, :path => @path)
14750
14808
  begin
14751
14809
  writer = XmlWriter.new(nil, true)
14752
- OpenStackVolumeProviderWriter.write_one(provider, writer, 'provider')
14810
+ OpenStackVolumeProviderWriter.write_one(provider, writer)
14753
14811
  request.body = writer.string
14754
14812
  ensure
14755
14813
  writer.close
@@ -14866,7 +14924,7 @@ module OvirtSDK4
14866
14924
  request = Request.new(:method => :POST, :path => @path)
14867
14925
  begin
14868
14926
  writer = XmlWriter.new(nil, true)
14869
- OpenStackVolumeProviderWriter.write_one(provider, writer, 'provider')
14927
+ OpenStackVolumeProviderWriter.write_one(provider, writer)
14870
14928
  request.body = writer.string
14871
14929
  ensure
14872
14930
  writer.close
@@ -15463,7 +15521,7 @@ module OvirtSDK4
15463
15521
  request = Request.new(:method => :POST, :path => @path)
15464
15522
  begin
15465
15523
  writer = XmlWriter.new(nil, true)
15466
- PermitWriter.write_one(permit, writer, 'permit')
15524
+ PermitWriter.write_one(permit, writer)
15467
15525
  request.body = writer.string
15468
15526
  ensure
15469
15527
  writer.close
@@ -15624,7 +15682,7 @@ module OvirtSDK4
15624
15682
  request = Request.new(:method => :PUT, :path => @path)
15625
15683
  begin
15626
15684
  writer = XmlWriter.new(nil, true)
15627
- QosWriter.write_one(qos, writer, 'qos')
15685
+ QosWriter.write_one(qos, writer)
15628
15686
  request.body = writer.string
15629
15687
  ensure
15630
15688
  writer.close
@@ -15699,7 +15757,7 @@ module OvirtSDK4
15699
15757
  request = Request.new(:method => :POST, :path => @path)
15700
15758
  begin
15701
15759
  writer = XmlWriter.new(nil, true)
15702
- QosWriter.write_one(qos, writer, 'qos')
15760
+ QosWriter.write_one(qos, writer)
15703
15761
  request.body = writer.string
15704
15762
  ensure
15705
15763
  writer.close
@@ -15860,7 +15918,7 @@ module OvirtSDK4
15860
15918
  request = Request.new(:method => :PUT, :path => @path)
15861
15919
  begin
15862
15920
  writer = XmlWriter.new(nil, true)
15863
- QuotaWriter.write_one(quota, writer, 'quota')
15921
+ QuotaWriter.write_one(quota, writer)
15864
15922
  request.body = writer.string
15865
15923
  ensure
15866
15924
  writer.close
@@ -16063,7 +16121,7 @@ module OvirtSDK4
16063
16121
  request = Request.new(:method => :POST, :path => @path)
16064
16122
  begin
16065
16123
  writer = XmlWriter.new(nil, true)
16066
- QuotaClusterLimitWriter.write_one(limit, writer, 'limit')
16124
+ QuotaClusterLimitWriter.write_one(limit, writer)
16067
16125
  request.body = writer.string
16068
16126
  ensure
16069
16127
  writer.close
@@ -16269,7 +16327,7 @@ module OvirtSDK4
16269
16327
  request = Request.new(:method => :POST, :path => @path)
16270
16328
  begin
16271
16329
  writer = XmlWriter.new(nil, true)
16272
- QuotaStorageLimitWriter.write_one(limit, writer, 'limit')
16330
+ QuotaStorageLimitWriter.write_one(limit, writer)
16273
16331
  request.body = writer.string
16274
16332
  ensure
16275
16333
  writer.close
@@ -16389,7 +16447,7 @@ module OvirtSDK4
16389
16447
  request = Request.new(:method => :POST, :path => @path)
16390
16448
  begin
16391
16449
  writer = XmlWriter.new(nil, true)
16392
- QuotaWriter.write_one(quota, writer, 'quota')
16450
+ QuotaWriter.write_one(quota, writer)
16393
16451
  request.body = writer.string
16394
16452
  ensure
16395
16453
  writer.close
@@ -16550,7 +16608,7 @@ module OvirtSDK4
16550
16608
  request = Request.new(:method => :PUT, :path => @path)
16551
16609
  begin
16552
16610
  writer = XmlWriter.new(nil, true)
16553
- RoleWriter.write_one(role, writer, 'role')
16611
+ RoleWriter.write_one(role, writer)
16554
16612
  request.body = writer.string
16555
16613
  ensure
16556
16614
  writer.close
@@ -16639,7 +16697,7 @@ module OvirtSDK4
16639
16697
  request = Request.new(:method => :POST, :path => @path)
16640
16698
  begin
16641
16699
  writer = XmlWriter.new(nil, true)
16642
- RoleWriter.write_one(role, writer, 'role')
16700
+ RoleWriter.write_one(role, writer)
16643
16701
  request.body = writer.string
16644
16702
  ensure
16645
16703
  writer.close
@@ -16759,7 +16817,7 @@ module OvirtSDK4
16759
16817
  request = Request.new(:method => :POST, :path => @path)
16760
16818
  begin
16761
16819
  writer = XmlWriter.new(nil, true)
16762
- SchedulingPolicyWriter.write_one(policy, writer, 'policy')
16820
+ SchedulingPolicyWriter.write_one(policy, writer)
16763
16821
  request.body = writer.string
16764
16822
  ensure
16765
16823
  writer.close
@@ -16934,7 +16992,7 @@ module OvirtSDK4
16934
16992
  request = Request.new(:method => :PUT, :path => @path)
16935
16993
  begin
16936
16994
  writer = XmlWriter.new(nil, true)
16937
- SchedulingPolicyWriter.write_one(policy, writer, 'policy')
16995
+ SchedulingPolicyWriter.write_one(policy, writer)
16938
16996
  request.body = writer.string
16939
16997
  ensure
16940
16998
  writer.close
@@ -17845,7 +17903,7 @@ module OvirtSDK4
17845
17903
  request = Request.new(:method => :POST, :path => @path)
17846
17904
  begin
17847
17905
  writer = XmlWriter.new(nil, true)
17848
- SnapshotWriter.write_one(snapshot, writer, 'snapshot')
17906
+ SnapshotWriter.write_one(snapshot, writer)
17849
17907
  request.body = writer.string
17850
17908
  ensure
17851
17909
  writer.close
@@ -18006,7 +18064,7 @@ module OvirtSDK4
18006
18064
  request = Request.new(:method => :PUT, :path => @path)
18007
18065
  begin
18008
18066
  writer = XmlWriter.new(nil, true)
18009
- SshPublicKeyWriter.write_one(key, writer, 'key')
18067
+ SshPublicKeyWriter.write_one(key, writer)
18010
18068
  request.body = writer.string
18011
18069
  ensure
18012
18070
  writer.close
@@ -18081,7 +18139,7 @@ module OvirtSDK4
18081
18139
  request = Request.new(:method => :POST, :path => @path)
18082
18140
  begin
18083
18141
  writer = XmlWriter.new(nil, true)
18084
- SshPublicKeyWriter.write_one(key, writer, 'key')
18142
+ SshPublicKeyWriter.write_one(key, writer)
18085
18143
  request.body = writer.string
18086
18144
  ensure
18087
18145
  writer.close
@@ -18461,7 +18519,7 @@ module OvirtSDK4
18461
18519
  request = Request.new(:method => :POST, :path => @path)
18462
18520
  begin
18463
18521
  writer = XmlWriter.new(nil, true)
18464
- StepWriter.write_one(step, writer, 'step')
18522
+ StepWriter.write_one(step, writer)
18465
18523
  request.body = writer.string
18466
18524
  ensure
18467
18525
  writer.close
@@ -18840,7 +18898,7 @@ module OvirtSDK4
18840
18898
  request = Request.new(:method => :PUT, :path => @path)
18841
18899
  begin
18842
18900
  writer = XmlWriter.new(nil, true)
18843
- StorageDomainWriter.write_one(storage_domain, writer, 'storage_domain')
18901
+ StorageDomainWriter.write_one(storage_domain, writer)
18844
18902
  request.body = writer.string
18845
18903
  ensure
18846
18904
  writer.close
@@ -19339,7 +19397,7 @@ module OvirtSDK4
19339
19397
  request = Request.new(:method => :POST, :path => @path)
19340
19398
  begin
19341
19399
  writer = XmlWriter.new(nil, true)
19342
- StorageConnectionWriter.write_one(connection, writer, 'connection')
19400
+ StorageConnectionWriter.write_one(connection, writer)
19343
19401
  request.body = writer.string
19344
19402
  ensure
19345
19403
  writer.close
@@ -19926,7 +19984,7 @@ module OvirtSDK4
19926
19984
  request = Request.new(:method => :POST, :path => @path)
19927
19985
  begin
19928
19986
  writer = XmlWriter.new(nil, true)
19929
- StorageDomainWriter.write_one(storage_domain, writer, 'storage_domain')
19987
+ StorageDomainWriter.write_one(storage_domain, writer)
19930
19988
  request.body = writer.string
19931
19989
  ensure
19932
19990
  writer.close
@@ -20109,7 +20167,7 @@ module OvirtSDK4
20109
20167
  request = Request.new(:method => :PUT, :path => @path)
20110
20168
  begin
20111
20169
  writer = XmlWriter.new(nil, true)
20112
- StorageConnectionWriter.write_one(connection, writer, 'connection')
20170
+ StorageConnectionWriter.write_one(connection, writer)
20113
20171
  request.body = writer.string
20114
20172
  ensure
20115
20173
  writer.close
@@ -20225,7 +20283,7 @@ module OvirtSDK4
20225
20283
  request = Request.new(:method => :PUT, :path => @path)
20226
20284
  begin
20227
20285
  writer = XmlWriter.new(nil, true)
20228
- StorageConnectionExtensionWriter.write_one(extension, writer, 'extension')
20286
+ StorageConnectionExtensionWriter.write_one(extension, writer)
20229
20287
  request.body = writer.string
20230
20288
  ensure
20231
20289
  writer.close
@@ -20300,7 +20358,7 @@ module OvirtSDK4
20300
20358
  request = Request.new(:method => :POST, :path => @path)
20301
20359
  begin
20302
20360
  writer = XmlWriter.new(nil, true)
20303
- StorageConnectionExtensionWriter.write_one(extension, writer, 'extension')
20361
+ StorageConnectionExtensionWriter.write_one(extension, writer)
20304
20362
  request.body = writer.string
20305
20363
  ensure
20306
20364
  writer.close
@@ -20420,7 +20478,7 @@ module OvirtSDK4
20420
20478
  request = Request.new(:method => :POST, :path => @path)
20421
20479
  begin
20422
20480
  writer = XmlWriter.new(nil, true)
20423
- StorageConnectionWriter.write_one(connection, writer, 'connection')
20481
+ StorageConnectionWriter.write_one(connection, writer)
20424
20482
  request.body = writer.string
20425
20483
  ensure
20426
20484
  writer.close
@@ -21134,7 +21192,7 @@ module OvirtSDK4
21134
21192
  request = Request.new(:method => :POST, :path => @path)
21135
21193
  begin
21136
21194
  writer = XmlWriter.new(nil, true)
21137
- PermissionWriter.write_one(permission, writer, 'permission')
21195
+ PermissionWriter.write_one(permission, writer)
21138
21196
  request.body = writer.string
21139
21197
  ensure
21140
21198
  writer.close
@@ -21289,7 +21347,7 @@ module OvirtSDK4
21289
21347
  request = Request.new(:method => :PUT, :path => @path)
21290
21348
  begin
21291
21349
  writer = XmlWriter.new(nil, true)
21292
- TagWriter.write_one(tag, writer, 'tag')
21350
+ TagWriter.write_one(tag, writer)
21293
21351
  request.body = writer.string
21294
21352
  ensure
21295
21353
  writer.close
@@ -21364,7 +21422,7 @@ module OvirtSDK4
21364
21422
  request = Request.new(:method => :POST, :path => @path)
21365
21423
  begin
21366
21424
  writer = XmlWriter.new(nil, true)
21367
- TagWriter.write_one(tag, writer, 'tag')
21425
+ TagWriter.write_one(tag, writer)
21368
21426
  request.body = writer.string
21369
21427
  ensure
21370
21428
  writer.close
@@ -21555,7 +21613,7 @@ module OvirtSDK4
21555
21613
  request = Request.new(:method => :PUT, :path => @path)
21556
21614
  begin
21557
21615
  writer = XmlWriter.new(nil, true)
21558
- TemplateWriter.write_one(template, writer, 'template')
21616
+ TemplateWriter.write_one(template, writer)
21559
21617
  request.body = writer.string
21560
21618
  ensure
21561
21619
  writer.close
@@ -21584,11 +21642,12 @@ module OvirtSDK4
21584
21642
  end
21585
21643
 
21586
21644
  #
21587
- # Locates the `disks` service.
21645
+ # Reference to the service that manages a specific
21646
+ # disk attachment of the template.
21588
21647
  #
21589
- # @return [TemplateDisksService] A reference to `disks` service.
21590
- def disks_service
21591
- return TemplateDisksService.new(@connection, "#{@path}/disks")
21648
+ # @return [TemplateDiskAttachmentsService] A reference to `disk_attachments` service.
21649
+ def disk_attachments_service
21650
+ return TemplateDiskAttachmentsService.new(@connection, "#{@path}/diskattachments")
21592
21651
  end
21593
21652
 
21594
21653
  #
@@ -21648,11 +21707,11 @@ module OvirtSDK4
21648
21707
  if path.start_with?('cdroms/')
21649
21708
  return cdroms_service.service(path[7..-1])
21650
21709
  end
21651
- if path == 'disks'
21652
- return disks_service
21710
+ if path == 'diskattachments'
21711
+ return disk_attachments_service
21653
21712
  end
21654
- if path.start_with?('disks/')
21655
- return disks_service.service(path[6..-1])
21713
+ if path.start_with?('diskattachments/')
21714
+ return disk_attachments_service.service(path[16..-1])
21656
21715
  end
21657
21716
  if path == 'graphicsconsoles'
21658
21717
  return graphics_consoles_service
@@ -21982,6 +22041,187 @@ module OvirtSDK4
21982
22041
 
21983
22042
  end
21984
22043
 
22044
+ class TemplateDiskAttachmentService < Service
22045
+
22046
+ #
22047
+ # Creates a new implementation of the service.
22048
+ #
22049
+ # @param connection [Connection] The connection to be used by this service.
22050
+ #
22051
+ # @param path [String] The relative path of this service, for example `vms/123/disks`.
22052
+ #
22053
+ # @api private
22054
+ #
22055
+ def initialize(connection, path)
22056
+ @connection = connection
22057
+ @path = path
22058
+ end
22059
+
22060
+ #
22061
+ # Returns the details of the attachment.
22062
+ #
22063
+ # @param opts [Hash] Additional options.
22064
+ #
22065
+ # @return [DiskAttachment]
22066
+ #
22067
+ def get(opts = {})
22068
+ query = {}
22069
+ request = Request.new(:method => :GET, :path => @path, :query => query)
22070
+ response = @connection.send(request)
22071
+ case response.code
22072
+ when 200
22073
+ begin
22074
+ reader = XmlReader.new(response.body)
22075
+ return DiskAttachmentReader.read_one(reader)
22076
+ ensure
22077
+ reader.close
22078
+ end
22079
+ else
22080
+ check_fault(response)
22081
+ end
22082
+ end
22083
+
22084
+ #
22085
+ # Removes the disk from the template. The disk will only be removed if there are other existing copies of the
22086
+ # disk on other storage domains.
22087
+ #
22088
+ # A storage domain has to be specified to determine which of the copies should be removed (template disks can
22089
+ # have copies on multiple storage domains).
22090
+ #
22091
+ # [source]
22092
+ # ----
22093
+ # DELETE /ovirt-engine/api/templates/{template:id}/diskattachments/{attachment:id}?storage_domain=072fbaa1-08f3-4a40-9f34-a5ca22dd1d74
22094
+ # ----
22095
+ #
22096
+ # @param opts [Hash] Additional options.
22097
+ #
22098
+ # @option opts [Boolean] :force
22099
+ #
22100
+ # @option opts [String] :storage_domain Specifies the identifier of the storage domain the image to be removed resides on.
22101
+ #
22102
+ def remove(opts = {})
22103
+ query = {}
22104
+ value = opts[:force]
22105
+ unless value.nil?
22106
+ value = Writer.render_boolean(value)
22107
+ query['force'] = value
22108
+ end
22109
+ value = opts[:storage_domain]
22110
+ unless value.nil?
22111
+ query['storage_domain'] = value
22112
+ end
22113
+ request = Request.new(:method => :DELETE, :path => @path, :query => query)
22114
+ response = @connection.send(request)
22115
+ unless response.code == 200
22116
+ check_fault(response)
22117
+ end
22118
+ end
22119
+
22120
+ #
22121
+ # Locates the service corresponding to the given path.
22122
+ #
22123
+ # @param path [String] The path of the service.
22124
+ #
22125
+ # @return [Service] A reference to the service.
22126
+ #
22127
+ def service(path)
22128
+ if path.nil? || path == ''
22129
+ return self
22130
+ end
22131
+ raise Error.new("The path \"#{path}\" doesn't correspond to any service")
22132
+ end
22133
+
22134
+ #
22135
+ # Returns an string representation of this service.
22136
+ #
22137
+ # @return [String]
22138
+ #
22139
+ def to_s
22140
+ return "#<#{TemplateDiskAttachmentService}:#{@path}>"
22141
+ end
22142
+
22143
+ end
22144
+
22145
+ class TemplateDiskAttachmentsService < Service
22146
+
22147
+ #
22148
+ # Creates a new implementation of the service.
22149
+ #
22150
+ # @param connection [Connection] The connection to be used by this service.
22151
+ #
22152
+ # @param path [String] The relative path of this service, for example `vms/123/disks`.
22153
+ #
22154
+ # @api private
22155
+ #
22156
+ def initialize(connection, path)
22157
+ @connection = connection
22158
+ @path = path
22159
+ end
22160
+
22161
+ #
22162
+ # List the disks that are attached to the template.
22163
+ #
22164
+ # @param opts [Hash] Additional options.
22165
+ #
22166
+ # @return [Array<DiskAttachment>]
22167
+ #
22168
+ def list(opts = {})
22169
+ query = {}
22170
+ request = Request.new(:method => :GET, :path => @path, :query => query)
22171
+ response = @connection.send(request)
22172
+ case response.code
22173
+ when 200
22174
+ begin
22175
+ reader = XmlReader.new(response.body)
22176
+ return DiskAttachmentReader.read_many(reader)
22177
+ ensure
22178
+ reader.close
22179
+ end
22180
+ else
22181
+ check_fault(response)
22182
+ end
22183
+ end
22184
+
22185
+ #
22186
+ # Reference to the service that manages a specific attachment.
22187
+ #
22188
+ # @param id [String] The identifier of the `attachment`.
22189
+ #
22190
+ # @return [TemplateDiskAttachmentService] A reference to the `attachment` service.
22191
+ #
22192
+ def attachment_service(id)
22193
+ return TemplateDiskAttachmentService.new(@connection, "#{@path}/#{id}")
22194
+ end
22195
+
22196
+ #
22197
+ # Locates the service corresponding to the given path.
22198
+ #
22199
+ # @param path [String] The path of the service.
22200
+ #
22201
+ # @return [Service] A reference to the service.
22202
+ #
22203
+ def service(path)
22204
+ if path.nil? || path == ''
22205
+ return self
22206
+ end
22207
+ index = path.index('/')
22208
+ if index.nil?
22209
+ return attachment_service(path)
22210
+ end
22211
+ return attachment_service(path[0..(index - 1)]).service(path[(index +1)..-1])
22212
+ end
22213
+
22214
+ #
22215
+ # Returns an string representation of this service.
22216
+ #
22217
+ # @return [String]
22218
+ #
22219
+ def to_s
22220
+ return "#<#{TemplateDiskAttachmentsService}:#{@path}>"
22221
+ end
22222
+
22223
+ end
22224
+
21985
22225
  class TemplateDisksService < Service
21986
22226
 
21987
22227
  #
@@ -22140,7 +22380,7 @@ module OvirtSDK4
22140
22380
  request = Request.new(:method => :PUT, :path => @path)
22141
22381
  begin
22142
22382
  writer = XmlWriter.new(nil, true)
22143
- NicWriter.write_one(nic, writer, 'nic')
22383
+ NicWriter.write_one(nic, writer)
22144
22384
  request.body = writer.string
22145
22385
  ensure
22146
22386
  writer.close
@@ -22215,7 +22455,7 @@ module OvirtSDK4
22215
22455
  request = Request.new(:method => :POST, :path => @path)
22216
22456
  begin
22217
22457
  writer = XmlWriter.new(nil, true)
22218
- NicWriter.write_one(nic, writer, 'nic')
22458
+ NicWriter.write_one(nic, writer)
22219
22459
  request.body = writer.string
22220
22460
  ensure
22221
22461
  writer.close
@@ -22376,7 +22616,7 @@ module OvirtSDK4
22376
22616
  request = Request.new(:method => :PUT, :path => @path)
22377
22617
  begin
22378
22618
  writer = XmlWriter.new(nil, true)
22379
- WatchdogWriter.write_one(watchdog, writer, 'watchdog')
22619
+ WatchdogWriter.write_one(watchdog, writer)
22380
22620
  request.body = writer.string
22381
22621
  ensure
22382
22622
  writer.close
@@ -22451,7 +22691,7 @@ module OvirtSDK4
22451
22691
  request = Request.new(:method => :POST, :path => @path)
22452
22692
  begin
22453
22693
  writer = XmlWriter.new(nil, true)
22454
- WatchdogWriter.write_one(watchdog, writer, 'watchdog')
22694
+ WatchdogWriter.write_one(watchdog, writer)
22455
22695
  request.body = writer.string
22456
22696
  ensure
22457
22697
  writer.close
@@ -22571,7 +22811,7 @@ module OvirtSDK4
22571
22811
  request = Request.new(:method => :POST, :path => @path)
22572
22812
  begin
22573
22813
  writer = XmlWriter.new(nil, true)
22574
- TemplateWriter.write_one(template, writer, 'template')
22814
+ TemplateWriter.write_one(template, writer)
22575
22815
  request.body = writer.string
22576
22816
  ensure
22577
22817
  writer.close
@@ -23028,7 +23268,7 @@ module OvirtSDK4
23028
23268
  request = Request.new(:method => :POST, :path => @path)
23029
23269
  begin
23030
23270
  writer = XmlWriter.new(nil, true)
23031
- UserWriter.write_one(user, writer, 'user')
23271
+ UserWriter.write_one(user, writer)
23032
23272
  request.body = writer.string
23033
23273
  ensure
23034
23274
  writer.close
@@ -23249,7 +23489,7 @@ module OvirtSDK4
23249
23489
  request = Request.new(:method => :POST, :path => @path)
23250
23490
  begin
23251
23491
  writer = XmlWriter.new(nil, true)
23252
- NetworkWriter.write_one(network, writer, 'network')
23492
+ NetworkWriter.write_one(network, writer)
23253
23493
  request.body = writer.string
23254
23494
  ensure
23255
23495
  writer.close
@@ -23900,7 +24140,7 @@ module OvirtSDK4
23900
24140
  request = Request.new(:method => :PUT, :path => @path)
23901
24141
  begin
23902
24142
  writer = XmlWriter.new(nil, true)
23903
- VmWriter.write_one(vm, writer, 'vm')
24143
+ VmWriter.write_one(vm, writer)
23904
24144
  request.body = writer.string
23905
24145
  ensure
23906
24146
  writer.close
@@ -23952,14 +24192,6 @@ module OvirtSDK4
23952
24192
  return DiskAttachmentsService.new(@connection, "#{@path}/diskattachments")
23953
24193
  end
23954
24194
 
23955
- #
23956
- # Locates the `disks` service.
23957
- #
23958
- # @return [VmDisksService] A reference to `disks` service.
23959
- def disks_service
23960
- return VmDisksService.new(@connection, "#{@path}/disks")
23961
- end
23962
-
23963
24195
  #
23964
24196
  # Locates the `graphics_consoles` service.
23965
24197
  #
@@ -24091,12 +24323,6 @@ module OvirtSDK4
24091
24323
  if path.start_with?('diskattachments/')
24092
24324
  return disk_attachments_service.service(path[16..-1])
24093
24325
  end
24094
- if path == 'disks'
24095
- return disks_service
24096
- end
24097
- if path.start_with?('disks/')
24098
- return disks_service.service(path[6..-1])
24099
- end
24100
24326
  if path == 'graphicsconsoles'
24101
24327
  return graphics_consoles_service
24102
24328
  end
@@ -24420,7 +24646,7 @@ module OvirtSDK4
24420
24646
  request = Request.new(:method => :PUT, :path => @path)
24421
24647
  begin
24422
24648
  writer = XmlWriter.new(nil, true)
24423
- CdromWriter.write_one(cdorm, writer, 'cdorm')
24649
+ CdromWriter.write_one(cdorm, writer)
24424
24650
  request.body = writer.string
24425
24651
  ensure
24426
24652
  writer.close
@@ -24495,7 +24721,7 @@ module OvirtSDK4
24495
24721
  request = Request.new(:method => :POST, :path => @path)
24496
24722
  begin
24497
24723
  writer = XmlWriter.new(nil, true)
24498
- CdromWriter.write_one(cdrom, writer, 'cdrom')
24724
+ CdromWriter.write_one(cdrom, writer)
24499
24725
  request.body = writer.string
24500
24726
  ensure
24501
24727
  writer.close
@@ -24752,7 +24978,7 @@ module OvirtSDK4
24752
24978
  request = Request.new(:method => :PUT, :path => @path)
24753
24979
  begin
24754
24980
  writer = XmlWriter.new(nil, true)
24755
- DiskWriter.write_one(disk, writer, 'disk')
24981
+ DiskWriter.write_one(disk, writer)
24756
24982
  request.body = writer.string
24757
24983
  ensure
24758
24984
  writer.close
@@ -24855,7 +25081,7 @@ module OvirtSDK4
24855
25081
  request = Request.new(:method => :POST, :path => @path)
24856
25082
  begin
24857
25083
  writer = XmlWriter.new(nil, true)
24858
- DiskWriter.write_one(disk, writer, 'disk')
25084
+ DiskWriter.write_one(disk, writer)
24859
25085
  request.body = writer.string
24860
25086
  ensure
24861
25087
  writer.close
@@ -25171,7 +25397,7 @@ module OvirtSDK4
25171
25397
  request = Request.new(:method => :POST, :path => @path)
25172
25398
  begin
25173
25399
  writer = XmlWriter.new(nil, true)
25174
- HostDeviceWriter.write_one(device, writer, 'device')
25400
+ HostDeviceWriter.write_one(device, writer)
25175
25401
  request.body = writer.string
25176
25402
  ensure
25177
25403
  writer.close
@@ -25378,7 +25604,7 @@ module OvirtSDK4
25378
25604
  request = Request.new(:method => :PUT, :path => @path)
25379
25605
  begin
25380
25606
  writer = XmlWriter.new(nil, true)
25381
- NicWriter.write_one(nic, writer, 'nic')
25607
+ NicWriter.write_one(nic, writer)
25382
25608
  request.body = writer.string
25383
25609
  ensure
25384
25610
  writer.close
@@ -25481,7 +25707,7 @@ module OvirtSDK4
25481
25707
  request = Request.new(:method => :POST, :path => @path)
25482
25708
  begin
25483
25709
  writer = XmlWriter.new(nil, true)
25484
- NicWriter.write_one(nic, writer, 'nic')
25710
+ NicWriter.write_one(nic, writer)
25485
25711
  request.body = writer.string
25486
25712
  ensure
25487
25713
  writer.close
@@ -25642,7 +25868,7 @@ module OvirtSDK4
25642
25868
  request = Request.new(:method => :PUT, :path => @path)
25643
25869
  begin
25644
25870
  writer = XmlWriter.new(nil, true)
25645
- VirtualNumaNodeWriter.write_one(node, writer, 'node')
25871
+ VirtualNumaNodeWriter.write_one(node, writer)
25646
25872
  request.body = writer.string
25647
25873
  ensure
25648
25874
  writer.close
@@ -25717,7 +25943,7 @@ module OvirtSDK4
25717
25943
  request = Request.new(:method => :POST, :path => @path)
25718
25944
  begin
25719
25945
  writer = XmlWriter.new(nil, true)
25720
- VirtualNumaNodeWriter.write_one(node, writer, 'node')
25946
+ VirtualNumaNodeWriter.write_one(node, writer)
25721
25947
  request.body = writer.string
25722
25948
  ensure
25723
25949
  writer.close
@@ -25908,7 +26134,7 @@ module OvirtSDK4
25908
26134
  request = Request.new(:method => :PUT, :path => @path)
25909
26135
  begin
25910
26136
  writer = XmlWriter.new(nil, true)
25911
- VmPoolWriter.write_one(pool, writer, 'pool')
26137
+ VmPoolWriter.write_one(pool, writer)
25912
26138
  request.body = writer.string
25913
26139
  ensure
25914
26140
  writer.close
@@ -25997,7 +26223,7 @@ module OvirtSDK4
25997
26223
  request = Request.new(:method => :POST, :path => @path)
25998
26224
  begin
25999
26225
  writer = XmlWriter.new(nil, true)
26000
- VmPoolWriter.write_one(pool, writer, 'pool')
26226
+ VmPoolWriter.write_one(pool, writer)
26001
26227
  request.body = writer.string
26002
26228
  ensure
26003
26229
  writer.close
@@ -26484,7 +26710,7 @@ module OvirtSDK4
26484
26710
  request = Request.new(:method => :PUT, :path => @path)
26485
26711
  begin
26486
26712
  writer = XmlWriter.new(nil, true)
26487
- WatchdogWriter.write_one(watchdog, writer, 'watchdog')
26713
+ WatchdogWriter.write_one(watchdog, writer)
26488
26714
  request.body = writer.string
26489
26715
  ensure
26490
26716
  writer.close
@@ -26559,7 +26785,7 @@ module OvirtSDK4
26559
26785
  request = Request.new(:method => :POST, :path => @path)
26560
26786
  begin
26561
26787
  writer = XmlWriter.new(nil, true)
26562
- WatchdogWriter.write_one(watchdog, writer, 'watchdog')
26788
+ WatchdogWriter.write_one(watchdog, writer)
26563
26789
  request.body = writer.string
26564
26790
  ensure
26565
26791
  writer.close
@@ -26842,7 +27068,7 @@ module OvirtSDK4
26842
27068
  request = Request.new(:method => :POST, :path => @path)
26843
27069
  begin
26844
27070
  writer = XmlWriter.new(nil, true)
26845
- VmWriter.write_one(vm, writer, 'vm')
27071
+ VmWriter.write_one(vm, writer)
26846
27072
  request.body = writer.string
26847
27073
  ensure
26848
27074
  writer.close
@@ -27025,7 +27251,7 @@ module OvirtSDK4
27025
27251
  request = Request.new(:method => :PUT, :path => @path)
27026
27252
  begin
27027
27253
  writer = XmlWriter.new(nil, true)
27028
- VnicProfileWriter.write_one(profile, writer, 'profile')
27254
+ VnicProfileWriter.write_one(profile, writer)
27029
27255
  request.body = writer.string
27030
27256
  ensure
27031
27257
  writer.close
@@ -27114,7 +27340,7 @@ module OvirtSDK4
27114
27340
  request = Request.new(:method => :POST, :path => @path)
27115
27341
  begin
27116
27342
  writer = XmlWriter.new(nil, true)
27117
- VnicProfileWriter.write_one(profile, writer, 'profile')
27343
+ VnicProfileWriter.write_one(profile, writer)
27118
27344
  request.body = writer.string
27119
27345
  ensure
27120
27346
  writer.close
@@ -27327,7 +27553,7 @@ module OvirtSDK4
27327
27553
  request = Request.new(:method => :POST, :path => @path)
27328
27554
  begin
27329
27555
  writer = XmlWriter.new(nil, true)
27330
- WeightWriter.write_one(weight, writer, 'weight')
27556
+ WeightWriter.write_one(weight, writer)
27331
27557
  request.body = writer.string
27332
27558
  ensure
27333
27559
  writer.close
@@ -27811,7 +28037,7 @@ module OvirtSDK4
27811
28037
  request = Request.new(:method => :PUT, :path => @path)
27812
28038
  begin
27813
28039
  writer = XmlWriter.new(nil, true)
27814
- ExternalHostProviderWriter.write_one(provider, writer, 'provider')
28040
+ ExternalHostProviderWriter.write_one(provider, writer)
27815
28041
  request.body = writer.string
27816
28042
  ensure
27817
28043
  writer.close
@@ -28904,7 +29130,7 @@ module OvirtSDK4
28904
29130
  request = Request.new(:method => :PUT, :path => @path)
28905
29131
  begin
28906
29132
  writer = XmlWriter.new(nil, true)
28907
- HostWriter.write_one(host, writer, 'host')
29133
+ HostWriter.write_one(host, writer)
28908
29134
  request.body = writer.string
28909
29135
  ensure
28910
29136
  writer.close