ovirt-engine-sdk 4.4.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.adoc +14 -2
- data/ext/ovirtsdk4c/ov_http_client.c +10 -2
- data/ext/ovirtsdk4c/ov_http_request.c +1 -1
- data/ext/ovirtsdk4c/ov_http_response.c +1 -1
- data/ext/ovirtsdk4c/ov_http_transfer.c +1 -1
- data/ext/ovirtsdk4c/ov_xml_reader.c +1 -1
- data/lib/ovirtsdk4/readers.rb +874 -34
- data/lib/ovirtsdk4/services.rb +2175 -206
- data/lib/ovirtsdk4/types.rb +3311 -355
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writers.rb +276 -1
- metadata +26 -13
data/lib/ovirtsdk4/services.rb
CHANGED
@@ -278,6 +278,9 @@ module OvirtSDK4
|
|
278
278
|
class ExternalProviderCertificatesService < Service
|
279
279
|
end
|
280
280
|
|
281
|
+
class ExternalTemplateImportsService < Service
|
282
|
+
end
|
283
|
+
|
281
284
|
class ExternalVmImportsService < Service
|
282
285
|
end
|
283
286
|
|
@@ -320,6 +323,9 @@ module OvirtSDK4
|
|
320
323
|
class GroupsService < Service
|
321
324
|
end
|
322
325
|
|
326
|
+
class HostCpuUnitsService < Service
|
327
|
+
end
|
328
|
+
|
323
329
|
class HostDeviceService < Service
|
324
330
|
end
|
325
331
|
|
@@ -698,6 +704,12 @@ module OvirtSDK4
|
|
698
704
|
class TemplateGraphicsConsolesService < Service
|
699
705
|
end
|
700
706
|
|
707
|
+
class TemplateMediatedDeviceService < Service
|
708
|
+
end
|
709
|
+
|
710
|
+
class TemplateMediatedDevicesService < Service
|
711
|
+
end
|
712
|
+
|
701
713
|
class TemplateNicService < Service
|
702
714
|
end
|
703
715
|
|
@@ -722,6 +734,12 @@ module OvirtSDK4
|
|
722
734
|
class UserService < Service
|
723
735
|
end
|
724
736
|
|
737
|
+
class UserOptionService < Service
|
738
|
+
end
|
739
|
+
|
740
|
+
class UserOptionsService < Service
|
741
|
+
end
|
742
|
+
|
725
743
|
class UsersService < Service
|
726
744
|
end
|
727
745
|
|
@@ -758,6 +776,18 @@ module OvirtSDK4
|
|
758
776
|
class VmCdromsService < Service
|
759
777
|
end
|
760
778
|
|
779
|
+
class VmCheckpointService < Service
|
780
|
+
end
|
781
|
+
|
782
|
+
class VmCheckpointDiskService < Service
|
783
|
+
end
|
784
|
+
|
785
|
+
class VmCheckpointDisksService < Service
|
786
|
+
end
|
787
|
+
|
788
|
+
class VmCheckpointsService < Service
|
789
|
+
end
|
790
|
+
|
761
791
|
class VmDiskService < MeasurableService
|
762
792
|
end
|
763
793
|
|
@@ -776,6 +806,12 @@ module OvirtSDK4
|
|
776
806
|
class VmHostDevicesService < Service
|
777
807
|
end
|
778
808
|
|
809
|
+
class VmMediatedDeviceService < Service
|
810
|
+
end
|
811
|
+
|
812
|
+
class VmMediatedDevicesService < Service
|
813
|
+
end
|
814
|
+
|
779
815
|
class VmNicService < MeasurableService
|
780
816
|
end
|
781
817
|
|
@@ -1312,14 +1348,14 @@ module OvirtSDK4
|
|
1312
1348
|
end
|
1313
1349
|
|
1314
1350
|
#
|
1315
|
-
# Access the service that manages the host assignment to this affinity group.
|
1351
|
+
# Access the service that manages the host assignment to this affinity group by host id or name.
|
1316
1352
|
#
|
1317
|
-
# @param
|
1353
|
+
# @param id_or_name [String] The identifier of the `host`.
|
1318
1354
|
#
|
1319
1355
|
# @return [AffinityGroupHostService] A reference to the `host` service.
|
1320
1356
|
#
|
1321
|
-
def host_service(
|
1322
|
-
AffinityGroupHostService.new(self,
|
1357
|
+
def host_service(id_or_name)
|
1358
|
+
AffinityGroupHostService.new(self, id_or_name)
|
1323
1359
|
end
|
1324
1360
|
|
1325
1361
|
#
|
@@ -3908,9 +3944,9 @@ module OvirtSDK4
|
|
3908
3944
|
# Adds or registers a disk.
|
3909
3945
|
#
|
3910
3946
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
3911
|
-
# compatibility. It will be removed in the future. To add a new disk use the
|
3947
|
+
# compatibility. It will be removed in the future. To add a new disk use the xref:services-disks-methods-add[add]
|
3912
3948
|
# operation of the service that manages the disks of the system. To register an unregistered disk use the
|
3913
|
-
#
|
3949
|
+
# xref:services-attached_storage_domain_disk-methods-register[register] operation of the service that manages
|
3914
3950
|
# that disk.
|
3915
3951
|
#
|
3916
3952
|
# @param disk [Disk] The disk to add or register.
|
@@ -4853,14 +4889,16 @@ module OvirtSDK4
|
|
4853
4889
|
|
4854
4890
|
UPGRADE = [
|
4855
4891
|
[:async, TrueClass].freeze,
|
4892
|
+
[:correlation_id, String].freeze,
|
4893
|
+
[:upgrade_percent_complete, Integer].freeze,
|
4856
4894
|
].freeze
|
4857
4895
|
|
4858
4896
|
private_constant :UPGRADE
|
4859
4897
|
|
4860
4898
|
#
|
4861
|
-
# Start or finish upgrade process for the cluster based on the action value. This action marks the
|
4862
|
-
# upgrade or clears the upgrade running flag on the cluster based on the
|
4863
|
-
# start or
|
4899
|
+
# Start, update or finish upgrade process for the cluster based on the action value. This action marks the
|
4900
|
+
# cluster for upgrade, updates the progress, or clears the upgrade running flag on the cluster based on the
|
4901
|
+
# action value which takes values of `start`, `stop` or `update_progress`.
|
4864
4902
|
#
|
4865
4903
|
# [source]
|
4866
4904
|
# ----
|
@@ -4878,12 +4916,32 @@ module OvirtSDK4
|
|
4878
4916
|
# </action>
|
4879
4917
|
# ----
|
4880
4918
|
#
|
4919
|
+
# After starting the upgrade, use a request body like this to update the progress to 15%:
|
4920
|
+
#
|
4921
|
+
# [source,xml]
|
4922
|
+
# ----
|
4923
|
+
# <action>
|
4924
|
+
# <upgrade_action>
|
4925
|
+
# update_progress
|
4926
|
+
# </upgrade_action>
|
4927
|
+
# <upgrade_percent_complete>
|
4928
|
+
# 15
|
4929
|
+
# </upgrade_percent_complete>
|
4930
|
+
# </action>
|
4931
|
+
# ----
|
4932
|
+
#
|
4881
4933
|
# @param opts [Hash] Additional options.
|
4882
4934
|
#
|
4883
4935
|
# @option opts [Boolean] :async Indicates if the action should be performed asynchronously.
|
4884
4936
|
#
|
4937
|
+
# @option opts [String] :correlation_id Explicitly set the upgrade correlation identifier. Use to correlate events
|
4938
|
+
# detailing the cluster upgrade to the upgrade itself. If not specificed, the
|
4939
|
+
# correlation id from `Correlation-Id` http header will be used.
|
4940
|
+
#
|
4885
4941
|
# @option opts [ClusterUpgradeAction] :upgrade_action The action to be performed.
|
4886
4942
|
#
|
4943
|
+
# @option opts [Integer] :upgrade_percent_complete Update the upgrade's progress as a percent complete of the total process.
|
4944
|
+
#
|
4887
4945
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
4888
4946
|
#
|
4889
4947
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -5066,7 +5124,7 @@ module OvirtSDK4
|
|
5066
5124
|
# GET /ovirt-engine/api/clusters/123/enabledfeatures/456
|
5067
5125
|
# ----
|
5068
5126
|
#
|
5069
|
-
# That will return a
|
5127
|
+
# That will return a xref:types-cluster_feature[ClusterFeature] object containing the name:
|
5070
5128
|
#
|
5071
5129
|
# [source,xml]
|
5072
5130
|
# ----
|
@@ -5331,7 +5389,7 @@ module OvirtSDK4
|
|
5331
5389
|
# GET /ovirt-engine/api/clusterlevels/4.1/clusterfeatures/456
|
5332
5390
|
# ----
|
5333
5391
|
#
|
5334
|
-
# That will return a
|
5392
|
+
# That will return a xref:types-cluster_feature[ClusterFeature] object containing the name:
|
5335
5393
|
#
|
5336
5394
|
# [source,xml]
|
5337
5395
|
# ----
|
@@ -5473,7 +5531,7 @@ module OvirtSDK4
|
|
5473
5531
|
# GET /ovirt-engine/api/clusterlevels/3.6
|
5474
5532
|
# ----
|
5475
5533
|
#
|
5476
|
-
# That will return a
|
5534
|
+
# That will return a xref:types-cluster_level[ClusterLevel] object containing the supported CPU types, and other
|
5477
5535
|
# information which describes the cluster level:
|
5478
5536
|
#
|
5479
5537
|
# [source,xml]
|
@@ -6240,6 +6298,48 @@ module OvirtSDK4
|
|
6240
6298
|
|
6241
6299
|
class DataCenterService < Service
|
6242
6300
|
|
6301
|
+
CLEAN_FINISHED_TASKS = [
|
6302
|
+
[:async, TrueClass].freeze,
|
6303
|
+
].freeze
|
6304
|
+
|
6305
|
+
private_constant :CLEAN_FINISHED_TASKS
|
6306
|
+
|
6307
|
+
#
|
6308
|
+
# Currently, the storage pool manager (SPM) fails to
|
6309
|
+
# switch to another host if the SPM has uncleared tasks.
|
6310
|
+
# Clearing all finished tasks enables the SPM switching.
|
6311
|
+
#
|
6312
|
+
# For example, to clean all the finished tasks on a data center with ID `123` send a request like this:
|
6313
|
+
#
|
6314
|
+
# [source]
|
6315
|
+
# ----
|
6316
|
+
# POST /ovirt-engine/api/datacenters/123/cleanfinishedtasks
|
6317
|
+
# ----
|
6318
|
+
#
|
6319
|
+
# With a request body like this:
|
6320
|
+
#
|
6321
|
+
# [source,xml]
|
6322
|
+
# ----
|
6323
|
+
# <action/>
|
6324
|
+
# ----
|
6325
|
+
#
|
6326
|
+
# @param opts [Hash] Additional options.
|
6327
|
+
#
|
6328
|
+
# @option opts [Boolean] :async Indicates if the action should be performed asynchronously.
|
6329
|
+
#
|
6330
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
6331
|
+
#
|
6332
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
6333
|
+
#
|
6334
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
6335
|
+
# given then the timeout set globally for the connection will be used.
|
6336
|
+
#
|
6337
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
6338
|
+
#
|
6339
|
+
def clean_finished_tasks(opts = {})
|
6340
|
+
internal_action(:cleanfinishedtasks, nil, CLEAN_FINISHED_TASKS, opts)
|
6341
|
+
end
|
6342
|
+
|
6243
6343
|
GET = [
|
6244
6344
|
[:filter, TrueClass].freeze,
|
6245
6345
|
[:follow, String].freeze,
|
@@ -6352,6 +6452,53 @@ module OvirtSDK4
|
|
6352
6452
|
internal_remove(REMOVE, opts)
|
6353
6453
|
end
|
6354
6454
|
|
6455
|
+
SET_MASTER = [
|
6456
|
+
[:async, TrueClass].freeze,
|
6457
|
+
[:storage_domain, StorageDomain].freeze,
|
6458
|
+
].freeze
|
6459
|
+
|
6460
|
+
private_constant :SET_MASTER
|
6461
|
+
|
6462
|
+
#
|
6463
|
+
# Used for manually setting a storage domain in the data center as a master.
|
6464
|
+
# For example, for setting a storage domain with ID '456' as a master on a data center with ID '123',
|
6465
|
+
# send a request like this:
|
6466
|
+
#
|
6467
|
+
# [source]
|
6468
|
+
# ----
|
6469
|
+
# POST /ovirt-engine/api/datacenters/123/setmaster
|
6470
|
+
# ----
|
6471
|
+
#
|
6472
|
+
# With a request body like this:
|
6473
|
+
#
|
6474
|
+
# [source,xml]
|
6475
|
+
# ----
|
6476
|
+
# <action>
|
6477
|
+
# <storage_domain id="456"/>
|
6478
|
+
# </action>
|
6479
|
+
# ----
|
6480
|
+
#
|
6481
|
+
# The new master storage domain can be also specified by its name.
|
6482
|
+
#
|
6483
|
+
# @param opts [Hash] Additional options.
|
6484
|
+
#
|
6485
|
+
# @option opts [Boolean] :async Indicates if the action should be performed asynchronously.
|
6486
|
+
#
|
6487
|
+
# @option opts [StorageDomain] :storage_domain The new master storage domain for the data center.
|
6488
|
+
#
|
6489
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
6490
|
+
#
|
6491
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
6492
|
+
#
|
6493
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
6494
|
+
# given then the timeout set globally for the connection will be used.
|
6495
|
+
#
|
6496
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
6497
|
+
#
|
6498
|
+
def set_master(opts = {})
|
6499
|
+
internal_action(:setmaster, nil, SET_MASTER, opts)
|
6500
|
+
end
|
6501
|
+
|
6355
6502
|
UPDATE = [
|
6356
6503
|
[:async, TrueClass].freeze,
|
6357
6504
|
].freeze
|
@@ -7119,7 +7266,7 @@ module OvirtSDK4
|
|
7119
7266
|
# POST /ovirt-engine/api/vms/345/diskattachments
|
7120
7267
|
# ----
|
7121
7268
|
#
|
7122
|
-
# IMPORTANT: The server accepts requests that
|
7269
|
+
# IMPORTANT: The server accepts requests that do not contain the `active` attribute, but the effect is
|
7123
7270
|
# undefined. In some cases the disk will be automatically activated and in other cases it won't. To
|
7124
7271
|
# avoid issues it is strongly recommended to always include the `active` attribute with the desired
|
7125
7272
|
# value.
|
@@ -7545,6 +7692,8 @@ module OvirtSDK4
|
|
7545
7692
|
|
7546
7693
|
LIST = [
|
7547
7694
|
[:follow, String].freeze,
|
7695
|
+
[:include_active, TrueClass].freeze,
|
7696
|
+
[:include_template, TrueClass].freeze,
|
7548
7697
|
[:max, Integer].freeze,
|
7549
7698
|
].freeze
|
7550
7699
|
|
@@ -7560,6 +7709,10 @@ module OvirtSDK4
|
|
7560
7709
|
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
7561
7710
|
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
7562
7711
|
#
|
7712
|
+
# @option opts [Boolean] :include_active If true return also active snapshots. If not specified active snapshots are not returned.
|
7713
|
+
#
|
7714
|
+
# @option opts [Boolean] :include_template If true return also template snapshots. If not specified template snapshots are not returned.
|
7715
|
+
#
|
7563
7716
|
# @option opts [Integer] :max Sets the maximum number of snapshots to return. If not specified all the snapshots are returned.
|
7564
7717
|
#
|
7565
7718
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
@@ -7618,20 +7771,20 @@ module OvirtSDK4
|
|
7618
7771
|
#
|
7619
7772
|
# Adds a new floating disk.
|
7620
7773
|
#
|
7621
|
-
# There are three types of disks that can be added - disk image, direct LUN and
|
7622
|
-
#
|
7774
|
+
# There are three types of disks that can be added - disk image, direct LUN and Managed Block disk.
|
7775
|
+
# link:https://wiki.openstack.org/wiki/Cinder[Cinder] integration has been replaced by Managed Block Storage.
|
7623
7776
|
#
|
7624
7777
|
# *Adding a new image disk:*
|
7625
7778
|
#
|
7626
|
-
# When creating a new floating image
|
7779
|
+
# When creating a new floating image xref:types-disk[Disk], the API requires the `storage_domain`, `provisioned_size`
|
7627
7780
|
# and `format` attributes.
|
7628
7781
|
#
|
7629
|
-
# Note that block storage domains (i.e
|
7630
|
-
# FCP)
|
7782
|
+
# Note that block storage domains (i.e. storage domains with the xref:types-storage_type[storage type] of iSCSI or
|
7783
|
+
# FCP) do not support the combination of the raw `format` with `sparse=true`, so `sparse=false` must be stated
|
7631
7784
|
# explicitly.
|
7632
7785
|
#
|
7633
7786
|
# To create a new floating image disk with specified `provisioned_size`, `format` and `name` on a storage domain
|
7634
|
-
# with an id `123
|
7787
|
+
# with an id `123` and enabled for incremental backup, send a request as follows:
|
7635
7788
|
#
|
7636
7789
|
# [source]
|
7637
7790
|
# ----
|
@@ -7649,6 +7802,7 @@ module OvirtSDK4
|
|
7649
7802
|
# <name>mydisk</name>
|
7650
7803
|
# <provisioned_size>1048576</provisioned_size>
|
7651
7804
|
# <format>cow</format>
|
7805
|
+
# <backup>incremental</backup>
|
7652
7806
|
# </disk>
|
7653
7807
|
# ----
|
7654
7808
|
#
|
@@ -7696,32 +7850,8 @@ module OvirtSDK4
|
|
7696
7850
|
#
|
7697
7851
|
# *Adding a new Cinder disk:*
|
7698
7852
|
#
|
7699
|
-
#
|
7700
|
-
#
|
7701
|
-
# [source]
|
7702
|
-
# ----
|
7703
|
-
# POST /ovirt-engine/api/disks
|
7704
|
-
# ----
|
7705
|
-
#
|
7706
|
-
# With a request body as follows:
|
7707
|
-
#
|
7708
|
-
# [source,xml]
|
7709
|
-
# ----
|
7710
|
-
# <disk>
|
7711
|
-
# <openstack_volume_type>
|
7712
|
-
# <name>myceph</name>
|
7713
|
-
# </openstack_volume_type>
|
7714
|
-
# <storage_domains>
|
7715
|
-
# <storage_domain>
|
7716
|
-
# <name>cinderDomain</name>
|
7717
|
-
# </storage_domain>
|
7718
|
-
# </storage_domains>
|
7719
|
-
# <provisioned_size>1073741824</provisioned_size>
|
7720
|
-
# <interface>virtio</interface>
|
7721
|
-
# <format>raw</format>
|
7722
|
-
# </disk>
|
7723
|
-
# ----
|
7724
|
-
#
|
7853
|
+
# Cinder integration has been replaced by Managed Block Storage.
|
7854
|
+
# //TODO: Add an example for adding an MBS disk
|
7725
7855
|
#
|
7726
7856
|
# *Adding a floating disks in order to upload disk snapshots:*
|
7727
7857
|
#
|
@@ -10138,6 +10268,73 @@ module OvirtSDK4
|
|
10138
10268
|
|
10139
10269
|
end
|
10140
10270
|
|
10271
|
+
class ExternalTemplateImportsService < Service
|
10272
|
+
|
10273
|
+
ADD = [
|
10274
|
+
].freeze
|
10275
|
+
|
10276
|
+
private_constant :ADD
|
10277
|
+
|
10278
|
+
#
|
10279
|
+
# This operation is used to import a template from external hypervisor.
|
10280
|
+
#
|
10281
|
+
# For example import of a template OVA can be facilitated using the following request:
|
10282
|
+
#
|
10283
|
+
# [source]
|
10284
|
+
# ----
|
10285
|
+
# POST /externaltemplateimports
|
10286
|
+
# ----
|
10287
|
+
#
|
10288
|
+
# With request body of type xref:types-external_template_import[ExternalTemplateImport], for example:
|
10289
|
+
#
|
10290
|
+
# [source,xml]
|
10291
|
+
# ----
|
10292
|
+
# <external_template_import>
|
10293
|
+
# <template>
|
10294
|
+
# <name>my_template</name>
|
10295
|
+
# </template>
|
10296
|
+
# <cluster id="2b18aca2-4469-11eb-9449-482ae35a5f83" />
|
10297
|
+
# <storage_domain id="8bb5ade5-e988-4000-8b93-dbfc6717fe50" />
|
10298
|
+
# <url>ova:///mnt/ova/ova_template.ova</url>
|
10299
|
+
# <host id="8bb5ade5-e988-4000-8b93-dbfc6717fe50" />
|
10300
|
+
# </external_template_import>
|
10301
|
+
# ----
|
10302
|
+
#
|
10303
|
+
# @param import [ExternalTemplateImport] The `import` to add.
|
10304
|
+
#
|
10305
|
+
# @param opts [Hash] Additional options.
|
10306
|
+
#
|
10307
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
10308
|
+
#
|
10309
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
10310
|
+
#
|
10311
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
10312
|
+
# given then the timeout set globally for the connection will be used.
|
10313
|
+
#
|
10314
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
10315
|
+
#
|
10316
|
+
# @return [ExternalTemplateImport]
|
10317
|
+
#
|
10318
|
+
def add(import, opts = {})
|
10319
|
+
internal_add(import, ExternalTemplateImport, ADD, opts)
|
10320
|
+
end
|
10321
|
+
|
10322
|
+
#
|
10323
|
+
# Locates the service corresponding to the given path.
|
10324
|
+
#
|
10325
|
+
# @param path [String] The path of the service.
|
10326
|
+
#
|
10327
|
+
# @return [Service] A reference to the service.
|
10328
|
+
#
|
10329
|
+
def service(path)
|
10330
|
+
if path.nil? || path == ''
|
10331
|
+
return self
|
10332
|
+
end
|
10333
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
10334
|
+
end
|
10335
|
+
|
10336
|
+
end
|
10337
|
+
|
10141
10338
|
class ExternalVmImportsService < Service
|
10142
10339
|
|
10143
10340
|
ADD = [
|
@@ -10155,7 +10352,7 @@ module OvirtSDK4
|
|
10155
10352
|
# POST /externalvmimports
|
10156
10353
|
# ----
|
10157
10354
|
#
|
10158
|
-
# With request body of type
|
10355
|
+
# With request body of type xref:types-external_vm_import[ExternalVmImport], for example:
|
10159
10356
|
#
|
10160
10357
|
# [source,xml]
|
10161
10358
|
# ----
|
@@ -11034,8 +11231,8 @@ module OvirtSDK4
|
|
11034
11231
|
#
|
11035
11232
|
# Removing bricks is a two-step process, where the data on bricks to be removed, is first migrated to remaining
|
11036
11233
|
# bricks. Once migration is completed the removal of bricks is confirmed via the API
|
11037
|
-
#
|
11038
|
-
#
|
11234
|
+
# xref:services-gluster_bricks-methods-remove[remove]. If at any point, the action needs to be cancelled
|
11235
|
+
# xref:services-gluster_bricks-methods-stop_migrate[stopmigrate] has to be called.
|
11039
11236
|
#
|
11040
11237
|
# For instance, to delete a brick from a gluster volume with id `123`, send a request:
|
11041
11238
|
#
|
@@ -11058,7 +11255,7 @@ module OvirtSDK4
|
|
11058
11255
|
# ----
|
11059
11256
|
#
|
11060
11257
|
# The migration process can be tracked from the job id returned from the API using
|
11061
|
-
#
|
11258
|
+
# xref:services-job-methods-get[job] and steps in job using xref:services-step-methods-get[step]
|
11062
11259
|
#
|
11063
11260
|
# @param opts [Hash] Additional options.
|
11064
11261
|
#
|
@@ -11091,7 +11288,7 @@ module OvirtSDK4
|
|
11091
11288
|
# Removes bricks from gluster volume.
|
11092
11289
|
#
|
11093
11290
|
# The recommended way to remove bricks without data loss is to first migrate the data using
|
11094
|
-
#
|
11291
|
+
# xref:services-gluster_bricks-methods-stop_migrate[stopmigrate] and then removing them. If migrate was not called on
|
11095
11292
|
# bricks prior to remove, the bricks are removed without data migration which may lead to data loss.
|
11096
11293
|
#
|
11097
11294
|
# For example, to delete the bricks from gluster volume `123`, send a request like this:
|
@@ -11167,7 +11364,7 @@ module OvirtSDK4
|
|
11167
11364
|
# @option opts [Boolean] :async Indicates if the action should be performed asynchronously.
|
11168
11365
|
#
|
11169
11366
|
# @option opts [Array<GlusterBrick>] :bricks List of bricks for which data migration needs to be stopped. This list should match the arguments passed to
|
11170
|
-
#
|
11367
|
+
# xref:services-gluster_bricks-methods-migrate[migrate].
|
11171
11368
|
#
|
11172
11369
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
11173
11370
|
#
|
@@ -11886,6 +12083,55 @@ module OvirtSDK4
|
|
11886
12083
|
|
11887
12084
|
end
|
11888
12085
|
|
12086
|
+
class HostCpuUnitsService < Service
|
12087
|
+
|
12088
|
+
LIST = [
|
12089
|
+
[:follow, String].freeze,
|
12090
|
+
].freeze
|
12091
|
+
|
12092
|
+
private_constant :LIST
|
12093
|
+
|
12094
|
+
#
|
12095
|
+
# Returns the List of all host's CPUs with detailed information
|
12096
|
+
# about the topology (socket, core) and with information
|
12097
|
+
# about the current CPU pinning.
|
12098
|
+
#
|
12099
|
+
# @param opts [Hash] Additional options.
|
12100
|
+
#
|
12101
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
12102
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
12103
|
+
#
|
12104
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
12105
|
+
#
|
12106
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
12107
|
+
#
|
12108
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
12109
|
+
# given then the timeout set globally for the connection will be used.
|
12110
|
+
#
|
12111
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
12112
|
+
#
|
12113
|
+
# @return [Array<HostCpuUnit>]
|
12114
|
+
#
|
12115
|
+
def list(opts = {})
|
12116
|
+
internal_get(LIST, opts)
|
12117
|
+
end
|
12118
|
+
|
12119
|
+
#
|
12120
|
+
# Locates the service corresponding to the given path.
|
12121
|
+
#
|
12122
|
+
# @param path [String] The path of the service.
|
12123
|
+
#
|
12124
|
+
# @return [Service] A reference to the service.
|
12125
|
+
#
|
12126
|
+
def service(path)
|
12127
|
+
if path.nil? || path == ''
|
12128
|
+
return self
|
12129
|
+
end
|
12130
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
12131
|
+
end
|
12132
|
+
|
12133
|
+
end
|
12134
|
+
|
11889
12135
|
class HostDeviceService < Service
|
11890
12136
|
|
11891
12137
|
GET = [
|
@@ -12421,6 +12667,7 @@ module OvirtSDK4
|
|
12421
12667
|
ADD = [
|
12422
12668
|
[:activate, TrueClass].freeze,
|
12423
12669
|
[:deploy_hosted_engine, TrueClass].freeze,
|
12670
|
+
[:reboot, TrueClass].freeze,
|
12424
12671
|
[:undeploy_hosted_engine, TrueClass].freeze,
|
12425
12672
|
].freeze
|
12426
12673
|
|
@@ -12504,6 +12751,8 @@ module OvirtSDK4
|
|
12504
12751
|
# as `true`, i.e., deploy the hosted engine components. Omitting this parameter equals `false`, and
|
12505
12752
|
# the host performs no operation in the hosted engine area.
|
12506
12753
|
#
|
12754
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
12755
|
+
#
|
12507
12756
|
# @option opts [Boolean] :undeploy_hosted_engine When set to `true`, this host un-deploys the hosted engine components and does not
|
12508
12757
|
# function as part of the High Availability cluster. A missing value is treated as `true`, i.e., un-deploy.
|
12509
12758
|
# Omitting this parameter equals `false` and the host performs no operation in the hosted engine area.
|
@@ -12636,6 +12885,7 @@ module OvirtSDK4
|
|
12636
12885
|
ADD_USING_ROOT_PASSWORD = [
|
12637
12886
|
[:activate, TrueClass].freeze,
|
12638
12887
|
[:deploy_hosted_engine, TrueClass].freeze,
|
12888
|
+
[:reboot, TrueClass].freeze,
|
12639
12889
|
[:undeploy_hosted_engine, TrueClass].freeze,
|
12640
12890
|
].freeze
|
12641
12891
|
|
@@ -12657,6 +12907,8 @@ module OvirtSDK4
|
|
12657
12907
|
# as `true`, i.e., deploy the hosted engine components. Omitting this parameter equals `false`, and
|
12658
12908
|
# the host performs no operation in the hosted engine area.
|
12659
12909
|
#
|
12910
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
12911
|
+
#
|
12660
12912
|
# @option opts [Boolean] :undeploy_hosted_engine When set to `true`, this host un-deploys the hosted engine components and does not
|
12661
12913
|
# function as part of the High Availability cluster. A missing value is treated as `true`, i.e., un-deploy.
|
12662
12914
|
# Omitting this parameter equals `false` and the host performs no operation in the hosted engine area.
|
@@ -12679,13 +12931,14 @@ module OvirtSDK4
|
|
12679
12931
|
ADD_USING_SSH = [
|
12680
12932
|
[:activate, TrueClass].freeze,
|
12681
12933
|
[:deploy_hosted_engine, TrueClass].freeze,
|
12934
|
+
[:reboot, TrueClass].freeze,
|
12682
12935
|
[:undeploy_hosted_engine, TrueClass].freeze,
|
12683
12936
|
].freeze
|
12684
12937
|
|
12685
12938
|
private_constant :ADD_USING_SSH
|
12686
12939
|
|
12687
12940
|
#
|
12688
|
-
# Add a new host to the system providing the ssh password or
|
12941
|
+
# Add a new host to the system providing the ssh password, fingerprint or public key.
|
12689
12942
|
#
|
12690
12943
|
# @param host [Host] The host definition with which the new host is created is passed as a parameter, and the newly created host
|
12691
12944
|
# is returned.
|
@@ -12700,6 +12953,8 @@ module OvirtSDK4
|
|
12700
12953
|
# as `true`, i.e., deploy the hosted engine components. Omitting this parameter equals `false`, and
|
12701
12954
|
# the host performs no operation in the hosted engine area.
|
12702
12955
|
#
|
12956
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
12957
|
+
#
|
12703
12958
|
# @option opts [Boolean] :undeploy_hosted_engine When set to `true`, this host un-deploys the hosted engine components and does not
|
12704
12959
|
# function as part of the High Availability cluster. A missing value is treated as `true`, i.e., un-deploy.
|
12705
12960
|
# Omitting this parameter equals `false` and the host performs no operation in the hosted engine area.
|
@@ -15366,6 +15621,15 @@ module OvirtSDK4
|
|
15366
15621
|
internal_update(pool, MacPool, UPDATE, opts)
|
15367
15622
|
end
|
15368
15623
|
|
15624
|
+
#
|
15625
|
+
# Returns a reference to the service that manages the permissions that are associated with the MacPool.
|
15626
|
+
#
|
15627
|
+
# @return [AssignedPermissionsService] A reference to `permissions` service.
|
15628
|
+
#
|
15629
|
+
def permissions_service
|
15630
|
+
@permissions_service ||= AssignedPermissionsService.new(self, 'permissions')
|
15631
|
+
end
|
15632
|
+
|
15369
15633
|
#
|
15370
15634
|
# Locates the service corresponding to the given path.
|
15371
15635
|
#
|
@@ -15377,6 +15641,12 @@ module OvirtSDK4
|
|
15377
15641
|
if path.nil? || path == ''
|
15378
15642
|
return self
|
15379
15643
|
end
|
15644
|
+
if path == 'permissions'
|
15645
|
+
return permissions_service
|
15646
|
+
end
|
15647
|
+
if path.start_with?('permissions/')
|
15648
|
+
return permissions_service.service(path[12..-1])
|
15649
|
+
end
|
15380
15650
|
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
15381
15651
|
end
|
15382
15652
|
|
@@ -15665,9 +15935,9 @@ module OvirtSDK4
|
|
15665
15935
|
# ----
|
15666
15936
|
#
|
15667
15937
|
# NOTE: To remove an external logical network, the network has to be removed directly from its provider by
|
15668
|
-
# https://developer.openstack.org/api-ref/network[OpenStack Networking API].
|
15938
|
+
# link:https://developer.openstack.org/api-ref/network[OpenStack Networking API].
|
15669
15939
|
# The entity representing the external network inside {product-name} is removed automatically,
|
15670
|
-
# if
|
15940
|
+
# if xref:types-open_stack_network_provider-attributes-auto_sync[`auto_sync`] is enabled for the provider,
|
15671
15941
|
# otherwise the entity has to be removed using this method.
|
15672
15942
|
#
|
15673
15943
|
# @param opts [Hash] Additional options.
|
@@ -17243,7 +17513,7 @@ module OvirtSDK4
|
|
17243
17513
|
# using the `id` or `name` attributes. The rest of
|
17244
17514
|
# the attributes will be ignored.
|
17245
17515
|
#
|
17246
|
-
# NOTE: If
|
17516
|
+
# NOTE: If xref:types-open_stack_network_provider-attributes-auto_sync[`auto_sync`] is
|
17247
17517
|
# enabled for the provider, the network might be imported automatically. To
|
17248
17518
|
# prevent this, automatic import can be disabled by setting the `auto_sync` to false,
|
17249
17519
|
# and enabling it again after importing the network.
|
@@ -18771,7 +19041,7 @@ module OvirtSDK4
|
|
18771
19041
|
private_constant :ADD
|
18772
19042
|
|
18773
19043
|
#
|
18774
|
-
# Adds a permit to the role. The permit name can be retrieved from the
|
19044
|
+
# Adds a permit to the role. The permit name can be retrieved from the xref:services-cluster_levels[cluster_levels] service.
|
18775
19045
|
#
|
18776
19046
|
# For example to assign a permit `create_vm` to the role with id `123` send a request like this:
|
18777
19047
|
#
|
@@ -19931,7 +20201,7 @@ module OvirtSDK4
|
|
19931
20201
|
#
|
19932
20202
|
# Updates a role. You are allowed to update `name`, `description` and `administrative` attributes after role is
|
19933
20203
|
# created. Within this endpoint you can't add or remove roles permits you need to use
|
19934
|
-
#
|
20204
|
+
# xref:services-permits[service] that manages permits of role.
|
19935
20205
|
#
|
19936
20206
|
# For example to update role's `name`, `description` and `administrative` attributes send a request like this:
|
19937
20207
|
#
|
@@ -20623,6 +20893,7 @@ module OvirtSDK4
|
|
20623
20893
|
# ----
|
20624
20894
|
# <action/>
|
20625
20895
|
# ----
|
20896
|
+
# NOTE: Confirm that the commit operation is finished and the virtual machine is down before running the virtual machine.
|
20626
20897
|
#
|
20627
20898
|
# @param opts [Hash] Additional options.
|
20628
20899
|
#
|
@@ -21124,8 +21395,8 @@ module OvirtSDK4
|
|
21124
21395
|
#
|
21125
21396
|
# [IMPORTANT]
|
21126
21397
|
# ====
|
21127
|
-
# When a snapshot is created the default value for the
|
21128
|
-
# persist_memorystate
|
21398
|
+
# When a snapshot is created, the default value for the
|
21399
|
+
# xref:types-snapshot-attributes-persist_memorystate[persist_memorystate] attribute is `true`. That means that the content of the memory of the virtual
|
21129
21400
|
# machine will be included in the snapshot, and it also means that the virtual machine will be paused
|
21130
21401
|
# for a longer time. That can negatively affect applications that are very sensitive to timing (NTP
|
21131
21402
|
# servers, for example). In those cases make sure that you set the attribute to `false`:
|
@@ -21298,7 +21569,10 @@ module OvirtSDK4
|
|
21298
21569
|
private_constant :UPDATE
|
21299
21570
|
|
21300
21571
|
#
|
21301
|
-
#
|
21572
|
+
# Replaces the key with a new resource.
|
21573
|
+
#
|
21574
|
+
# IMPORTANT: Since version 4.4.8 of the engine this operation is deprecated, and preserved only for backwards
|
21575
|
+
# compatibility. It will be removed in the future. Instead please use DELETE followed by xref:services-ssh_public_keys-methods-add[add operation].
|
21302
21576
|
#
|
21303
21577
|
# @param key [SshPublicKey] The `key` to update.
|
21304
21578
|
# @param opts [Hash] Additional options.
|
@@ -22134,7 +22408,7 @@ module OvirtSDK4
|
|
22134
22408
|
# ----
|
22135
22409
|
#
|
22136
22410
|
# Note that this operation is only applicable to block storage domains (i.e., storage domains with the
|
22137
|
-
#
|
22411
|
+
# xref:types-storage_type[storage type] of iSCSI or FCP).
|
22138
22412
|
#
|
22139
22413
|
# @param opts [Hash] Additional options.
|
22140
22414
|
#
|
@@ -22284,7 +22558,7 @@ module OvirtSDK4
|
|
22284
22558
|
#
|
22285
22559
|
# Updates a storage domain.
|
22286
22560
|
#
|
22287
|
-
# Not all of the
|
22561
|
+
# Not all of the xref:types-storage_domain[StorageDomain]'s attributes are updatable after creation. Those that can be
|
22288
22562
|
# updated are: `name`, `description`, `comment`, `warning_low_space_indicator`, `critical_space_action_blocker` and
|
22289
22563
|
# `wipe_after_delete.` (Note that changing the `wipe_after_delete` attribute will not change the wipe after delete
|
22290
22564
|
# property of disks that already exist).
|
@@ -22658,7 +22932,7 @@ module OvirtSDK4
|
|
22658
22932
|
# Copies a disk to the specified storage domain.
|
22659
22933
|
#
|
22660
22934
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
22661
|
-
# compatibility. It will be removed in the future. To copy a disk use the
|
22935
|
+
# compatibility. It will be removed in the future. To copy a disk use the xref:services-disk-methods-copy[copy]
|
22662
22936
|
# operation of the service that manages that disk.
|
22663
22937
|
#
|
22664
22938
|
# @param opts [Hash] Additional options.
|
@@ -22690,7 +22964,7 @@ module OvirtSDK4
|
|
22690
22964
|
# Exports a disk to an export storage domain.
|
22691
22965
|
#
|
22692
22966
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
22693
|
-
# compatibility. It will be removed in the future. To export a disk use the
|
22967
|
+
# compatibility. It will be removed in the future. To export a disk use the xref:services-disk-methods-export[export]
|
22694
22968
|
# operation of the service that manages that disk.
|
22695
22969
|
#
|
22696
22970
|
# @param opts [Hash] Additional options.
|
@@ -22751,7 +23025,7 @@ module OvirtSDK4
|
|
22751
23025
|
# Moves a disk to another storage domain.
|
22752
23026
|
#
|
22753
23027
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
22754
|
-
# compatibility. It will be removed in the future. To move a disk use the
|
23028
|
+
# compatibility. It will be removed in the future. To move a disk use the xref:services-disk-methods-move[move]
|
22755
23029
|
# operation of the service that manages that disk.
|
22756
23030
|
#
|
22757
23031
|
# @param opts [Hash] Additional options.
|
@@ -22814,7 +23088,7 @@ module OvirtSDK4
|
|
22814
23088
|
# Removes a disk.
|
22815
23089
|
#
|
22816
23090
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
22817
|
-
# compatibility. It will be removed in the future. To remove a disk use the
|
23091
|
+
# compatibility. It will be removed in the future. To remove a disk use the xref:services-disk-methods-remove[remove]
|
22818
23092
|
# operation of the service that manages that disk.
|
22819
23093
|
#
|
22820
23094
|
# @param opts [Hash] Additional options.
|
@@ -22841,7 +23115,7 @@ module OvirtSDK4
|
|
22841
23115
|
# Sparsify the disk.
|
22842
23116
|
#
|
22843
23117
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
22844
|
-
# compatibility. It will be removed in the future. To remove a disk use the
|
23118
|
+
# compatibility. It will be removed in the future. To remove a disk use the xref:services-disk-methods-remove[remove]
|
22845
23119
|
# operation of the service that manages that disk.
|
22846
23120
|
#
|
22847
23121
|
# @param opts [Hash] Additional options.
|
@@ -22869,7 +23143,7 @@ module OvirtSDK4
|
|
22869
23143
|
#
|
22870
23144
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
22871
23145
|
# compatibility. It will be removed in the future. To update a disk use the
|
22872
|
-
#
|
23146
|
+
# xref:services-disk-methods-update[update] operation of the service that manages that disk.
|
22873
23147
|
#
|
22874
23148
|
# @param disk [Disk] The update to apply to the disk.
|
22875
23149
|
# @param opts [Hash] Additional options.
|
@@ -22947,9 +23221,9 @@ module OvirtSDK4
|
|
22947
23221
|
# Adds or registers a disk.
|
22948
23222
|
#
|
22949
23223
|
# IMPORTANT: Since version 4.2 of the {engine-name} this operation is deprecated, and preserved only for backwards
|
22950
|
-
# compatibility. It will be removed in the future. To add a new disk use the
|
23224
|
+
# compatibility. It will be removed in the future. To add a new disk use the xref:services-disks-methods-add[add]
|
22951
23225
|
# operation of the service that manages the disks of the system. To register an unregistered disk use the
|
22952
|
-
#
|
23226
|
+
# xref:services-attached_storage_domain_disk-methods-register[register] operation of the service that manages
|
22953
23227
|
# that disk.
|
22954
23228
|
#
|
22955
23229
|
# @param disk [Disk] The disk to add or register.
|
@@ -23402,7 +23676,7 @@ module OvirtSDK4
|
|
23402
23676
|
#
|
23403
23677
|
# WARNING: Please note that this attribute has been deprecated since version 4.2.1 of the engine, and preserved only for backward
|
23404
23678
|
# compatibility. It will be removed in the future. To specify `vnic_profile_mappings` use the `vnic_profile_mappings`
|
23405
|
-
# attribute inside the
|
23679
|
+
# attribute inside the xref:types-registration_configuration[RegistrationConfiguration] type.
|
23406
23680
|
#
|
23407
23681
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
23408
23682
|
#
|
@@ -23752,7 +24026,7 @@ module OvirtSDK4
|
|
23752
24026
|
#
|
23753
24027
|
# WARNING: Please note that this attribute has been deprecated since version 4.2.1 of the engine, and preserved only for backward
|
23754
24028
|
# compatibility. It will be removed in the future. To specify `vnic_profile_mappings` use the `vnic_profile_mappings`
|
23755
|
-
# attribute inside the
|
24029
|
+
# attribute inside the xref:types-registration_configuration[RegistrationConfiguration] type.
|
23756
24030
|
#
|
23757
24031
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
23758
24032
|
#
|
@@ -24047,7 +24321,7 @@ module OvirtSDK4
|
|
24047
24321
|
#
|
24048
24322
|
# Adds a new storage domain.
|
24049
24323
|
#
|
24050
|
-
# Creation of a new
|
24324
|
+
# Creation of a new xref:types-storage_domain[StorageDomain] requires the `name`, `type`, `host`, and `storage`
|
24051
24325
|
# attributes. Identify the `host` attribute with the `id` or `name` attributes. In {product-name} 3.6 and
|
24052
24326
|
# later you can enable the wipe after delete option by default on the storage domain. To configure this, specify
|
24053
24327
|
# `wipe_after_delete` in the POST request. This option can be edited after the domain is created, but doing so will
|
@@ -25395,6 +25669,15 @@ module OvirtSDK4
|
|
25395
25669
|
@external_host_providers_service ||= ExternalHostProvidersService.new(self, 'externalhostproviders')
|
25396
25670
|
end
|
25397
25671
|
|
25672
|
+
#
|
25673
|
+
# Reference to service facilitating import of external templates.
|
25674
|
+
#
|
25675
|
+
# @return [ExternalTemplateImportsService] A reference to `external_template_imports` service.
|
25676
|
+
#
|
25677
|
+
def external_template_imports_service
|
25678
|
+
@external_template_imports_service ||= ExternalTemplateImportsService.new(self, 'externaltemplateimports')
|
25679
|
+
end
|
25680
|
+
|
25398
25681
|
#
|
25399
25682
|
# Reference to service facilitating import of external virtual machines.
|
25400
25683
|
#
|
@@ -25725,6 +26008,12 @@ module OvirtSDK4
|
|
25725
26008
|
if path.start_with?('externalhostproviders/')
|
25726
26009
|
return external_host_providers_service.service(path[22..-1])
|
25727
26010
|
end
|
26011
|
+
if path == 'externaltemplateimports'
|
26012
|
+
return external_template_imports_service
|
26013
|
+
end
|
26014
|
+
if path.start_with?('externaltemplateimports/')
|
26015
|
+
return external_template_imports_service.service(path[24..-1])
|
26016
|
+
end
|
25728
26017
|
if path == 'externalvmimports'
|
25729
26018
|
return external_vm_imports_service
|
25730
26019
|
end
|
@@ -25909,37 +26198,46 @@ module OvirtSDK4
|
|
25909
26198
|
#
|
25910
26199
|
# Get the values of specific configuration option.
|
25911
26200
|
#
|
25912
|
-
# For example to retrieve the values of configuration option `
|
26201
|
+
# For example to retrieve the values of configuration option `MigrationPolicies` send a request like this:
|
25913
26202
|
#
|
25914
26203
|
# [source]
|
25915
26204
|
# ----
|
25916
|
-
# GET /ovirt-engine/api/options/
|
26205
|
+
# GET /ovirt-engine/api/options/MigrationPolicies
|
25917
26206
|
# ----
|
25918
26207
|
#
|
25919
26208
|
# The response to that request will be the following:
|
25920
26209
|
#
|
25921
26210
|
# [source,xml]
|
25922
26211
|
# ----
|
25923
|
-
#
|
25924
|
-
#
|
25925
|
-
#
|
25926
|
-
# <
|
25927
|
-
#
|
25928
|
-
#
|
25929
|
-
#
|
25930
|
-
#
|
25931
|
-
#
|
25932
|
-
#
|
25933
|
-
#
|
25934
|
-
#
|
25935
|
-
#
|
25936
|
-
#
|
25937
|
-
#
|
25938
|
-
#
|
25939
|
-
#
|
25940
|
-
#
|
25941
|
-
#
|
25942
|
-
#
|
26212
|
+
# <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
26213
|
+
# <system_option href="/ovirt-engine/api/options/MigrationPolicies" id="MigrationPolicies">
|
26214
|
+
# <name>MigrationPolicies</name>
|
26215
|
+
# <values>
|
26216
|
+
# <system_option_value>
|
26217
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26218
|
+
# <version>4.2</version>
|
26219
|
+
# </system_option_value>
|
26220
|
+
# <system_option_value>
|
26221
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26222
|
+
# <version>4.3</version>
|
26223
|
+
# </system_option_value>
|
26224
|
+
# <system_option_value>
|
26225
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26226
|
+
# <version>4.4</version>
|
26227
|
+
# </system_option_value>
|
26228
|
+
# <system_option_value>
|
26229
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26230
|
+
# <version>4.5</version>
|
26231
|
+
# </system_option_value>
|
26232
|
+
# <system_option_value>
|
26233
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26234
|
+
# <version>4.6</version>
|
26235
|
+
# </system_option_value>
|
26236
|
+
# <system_option_value>
|
26237
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26238
|
+
# <version>4.7</version>
|
26239
|
+
# </system_option_value>
|
26240
|
+
# </values>
|
25943
26241
|
# </system_option>
|
25944
26242
|
# ----
|
25945
26243
|
#
|
@@ -25962,26 +26260,26 @@ module OvirtSDK4
|
|
25962
26260
|
# should be returned.
|
25963
26261
|
# If this parameter isn't used then all the versions will be returned.
|
25964
26262
|
#
|
25965
|
-
# For example, to get the value of the `
|
26263
|
+
# For example, to get the value of the `MigrationPolicies` option but only for version `4.2` send
|
25966
26264
|
# a request like this:
|
25967
26265
|
#
|
25968
26266
|
# [source]
|
25969
26267
|
# ----
|
25970
|
-
# GET /ovirt-engine/api/options/
|
26268
|
+
# GET /ovirt-engine/api/options/MigrationPolicies?version=4.2
|
25971
26269
|
# ----
|
25972
26270
|
#
|
25973
26271
|
# The response to that request will be like this:
|
25974
26272
|
#
|
25975
26273
|
# [source,xml]
|
25976
26274
|
# ----
|
25977
|
-
# <system_option href="/ovirt-engine/api/options/
|
25978
|
-
#
|
25979
|
-
#
|
25980
|
-
#
|
25981
|
-
#
|
25982
|
-
#
|
25983
|
-
#
|
25984
|
-
#
|
26275
|
+
# <system_option href="/ovirt-engine/api/options/MigrationPolicies" id="MigrationPolicies">
|
26276
|
+
# <name>MigrationPolicies</name>
|
26277
|
+
# <values>
|
26278
|
+
# <system_option_value>
|
26279
|
+
# <value>[{"id":{"uuid":"80554327-0569-496b-bdeb-fcbbf52b827b"},...}]</value>
|
26280
|
+
# <version>4.2</version>
|
26281
|
+
# </system_option_value>
|
26282
|
+
# </values>
|
25985
26283
|
# </system_option>
|
25986
26284
|
# ----
|
25987
26285
|
#
|
@@ -26797,6 +27095,27 @@ module OvirtSDK4
|
|
26797
27095
|
# </action>
|
26798
27096
|
# ----
|
26799
27097
|
#
|
27098
|
+
# Since version 4.2 of the engine it is also possible to export a template as a virtual appliance (OVA).
|
27099
|
+
# For example, to export template `123` as an OVA file named `myvm.ova` that is placed in the directory `/home/ovirt/` on host `myhost`:
|
27100
|
+
#
|
27101
|
+
# [source]
|
27102
|
+
# ----
|
27103
|
+
# POST /ovirt-engine/api/templates/123/export
|
27104
|
+
# ----
|
27105
|
+
#
|
27106
|
+
# With a request body like this:
|
27107
|
+
#
|
27108
|
+
# [source,xml]
|
27109
|
+
# ----
|
27110
|
+
# <action>
|
27111
|
+
# <host>
|
27112
|
+
# <name>myhost</name>
|
27113
|
+
# </host>
|
27114
|
+
# <directory>/home/ovirt</directory>
|
27115
|
+
# <filename>myvm.ova</filename>
|
27116
|
+
# </action>
|
27117
|
+
# ----
|
27118
|
+
#
|
26800
27119
|
# @param opts [Hash] Additional options.
|
26801
27120
|
#
|
26802
27121
|
# @option opts [Boolean] :exclusive Indicates if the existing templates with the same name should be overwritten.
|
@@ -27045,6 +27364,15 @@ module OvirtSDK4
|
|
27045
27364
|
@graphics_consoles_service ||= TemplateGraphicsConsolesService.new(self, 'graphicsconsoles')
|
27046
27365
|
end
|
27047
27366
|
|
27367
|
+
#
|
27368
|
+
# Reference to the service that manages mediated devices associated with the template.
|
27369
|
+
#
|
27370
|
+
# @return [TemplateMediatedDevicesService] A reference to `mediated_devices` service.
|
27371
|
+
#
|
27372
|
+
def mediated_devices_service
|
27373
|
+
@mediated_devices_service ||= TemplateMediatedDevicesService.new(self, 'mediateddevices')
|
27374
|
+
end
|
27375
|
+
|
27048
27376
|
#
|
27049
27377
|
# Returns a reference to the service that manages the NICs that are associated with the template.
|
27050
27378
|
#
|
@@ -27110,6 +27438,12 @@ module OvirtSDK4
|
|
27110
27438
|
if path.start_with?('graphicsconsoles/')
|
27111
27439
|
return graphics_consoles_service.service(path[17..-1])
|
27112
27440
|
end
|
27441
|
+
if path == 'mediateddevices'
|
27442
|
+
return mediated_devices_service
|
27443
|
+
end
|
27444
|
+
if path.start_with?('mediateddevices/')
|
27445
|
+
return mediated_devices_service.service(path[16..-1])
|
27446
|
+
end
|
27113
27447
|
if path == 'nics'
|
27114
27448
|
return nics_service
|
27115
27449
|
end
|
@@ -27776,6 +28110,238 @@ module OvirtSDK4
|
|
27776
28110
|
|
27777
28111
|
end
|
27778
28112
|
|
28113
|
+
class TemplateMediatedDeviceService < Service
|
28114
|
+
|
28115
|
+
GET = [
|
28116
|
+
[:follow, String].freeze,
|
28117
|
+
].freeze
|
28118
|
+
|
28119
|
+
private_constant :GET
|
28120
|
+
|
28121
|
+
#
|
28122
|
+
# Gets mediated device configuration of the template.
|
28123
|
+
#
|
28124
|
+
# @param opts [Hash] Additional options.
|
28125
|
+
#
|
28126
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
28127
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
28128
|
+
#
|
28129
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
28130
|
+
#
|
28131
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
28132
|
+
#
|
28133
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
28134
|
+
# given then the timeout set globally for the connection will be used.
|
28135
|
+
#
|
28136
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
28137
|
+
#
|
28138
|
+
# @return [VmMediatedDevice]
|
28139
|
+
#
|
28140
|
+
def get(opts = {})
|
28141
|
+
internal_get(GET, opts)
|
28142
|
+
end
|
28143
|
+
|
28144
|
+
REMOVE = [
|
28145
|
+
[:async, TrueClass].freeze,
|
28146
|
+
].freeze
|
28147
|
+
|
28148
|
+
private_constant :REMOVE
|
28149
|
+
|
28150
|
+
#
|
28151
|
+
# Remove the mediated device from the template.
|
28152
|
+
#
|
28153
|
+
# @param opts [Hash] Additional options.
|
28154
|
+
#
|
28155
|
+
# @option opts [Boolean] :async Indicates if the remove should be performed asynchronously.
|
28156
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
28157
|
+
#
|
28158
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
28159
|
+
#
|
28160
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
28161
|
+
# given then the timeout set globally for the connection will be used.
|
28162
|
+
#
|
28163
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
28164
|
+
#
|
28165
|
+
def remove(opts = {})
|
28166
|
+
internal_remove(REMOVE, opts)
|
28167
|
+
end
|
28168
|
+
|
28169
|
+
UPDATE = [
|
28170
|
+
[:async, TrueClass].freeze,
|
28171
|
+
].freeze
|
28172
|
+
|
28173
|
+
private_constant :UPDATE
|
28174
|
+
|
28175
|
+
#
|
28176
|
+
# Updates the information about the mediated device.
|
28177
|
+
#
|
28178
|
+
# You can update the information using `specParams` element.
|
28179
|
+
#
|
28180
|
+
# For example, to update a mediated device, send a request like this:
|
28181
|
+
#
|
28182
|
+
# [source]
|
28183
|
+
# ----
|
28184
|
+
# PUT /ovirt-engine/api/templates/123/mediateddevices/00000000-0000-0000-0000-000000000000
|
28185
|
+
# <vm_mediated_device>
|
28186
|
+
# <spec_params>
|
28187
|
+
# <property>
|
28188
|
+
# <name>mdevType</name>
|
28189
|
+
# <value>nvidia-11</value>
|
28190
|
+
# </property>
|
28191
|
+
# </spec_params>
|
28192
|
+
# </vm_mediated_device>
|
28193
|
+
# ----
|
28194
|
+
#
|
28195
|
+
# with response body:
|
28196
|
+
#
|
28197
|
+
# [source,xml]
|
28198
|
+
# ----
|
28199
|
+
# <vm_mediated_device href="/ovirt-engine/api/templates/123/mediateddevices/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
|
28200
|
+
# <template href="/ovirt-engine/api/templates/123" id="123"/>
|
28201
|
+
# <spec_params>
|
28202
|
+
# <property>
|
28203
|
+
# <name>mdevType</name>
|
28204
|
+
# <value>nvidia-11</value>
|
28205
|
+
# </property>
|
28206
|
+
# </spec_params>
|
28207
|
+
# </vm_mediated_device>
|
28208
|
+
# ----
|
28209
|
+
#
|
28210
|
+
# @param devices [VmMediatedDevice] The information about the mediated device.
|
28211
|
+
#
|
28212
|
+
# The request data must contain `specParams` properties.
|
28213
|
+
# The response data contains complete information about the
|
28214
|
+
# updated mediated device.
|
28215
|
+
# @param opts [Hash] Additional options.
|
28216
|
+
#
|
28217
|
+
# @option opts [Boolean] :async Indicates if the update should be performed asynchronously.
|
28218
|
+
#
|
28219
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
28220
|
+
#
|
28221
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
28222
|
+
#
|
28223
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
28224
|
+
# given then the timeout set globally for the connection will be used.
|
28225
|
+
#
|
28226
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
28227
|
+
#
|
28228
|
+
# @return [VmMediatedDevice]
|
28229
|
+
#
|
28230
|
+
def update(devices, opts = {})
|
28231
|
+
internal_update(devices, VmMediatedDevice, UPDATE, opts)
|
28232
|
+
end
|
28233
|
+
|
28234
|
+
#
|
28235
|
+
# Locates the service corresponding to the given path.
|
28236
|
+
#
|
28237
|
+
# @param path [String] The path of the service.
|
28238
|
+
#
|
28239
|
+
# @return [Service] A reference to the service.
|
28240
|
+
#
|
28241
|
+
def service(path)
|
28242
|
+
if path.nil? || path == ''
|
28243
|
+
return self
|
28244
|
+
end
|
28245
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
28246
|
+
end
|
28247
|
+
|
28248
|
+
end
|
28249
|
+
|
28250
|
+
class TemplateMediatedDevicesService < Service
|
28251
|
+
|
28252
|
+
ADD = [
|
28253
|
+
].freeze
|
28254
|
+
|
28255
|
+
private_constant :ADD
|
28256
|
+
|
28257
|
+
#
|
28258
|
+
# Add new mediated device to the template.
|
28259
|
+
#
|
28260
|
+
# @param device [VmMediatedDevice] The `device` to add.
|
28261
|
+
#
|
28262
|
+
# @param opts [Hash] Additional options.
|
28263
|
+
#
|
28264
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
28265
|
+
#
|
28266
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
28267
|
+
#
|
28268
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
28269
|
+
# given then the timeout set globally for the connection will be used.
|
28270
|
+
#
|
28271
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
28272
|
+
#
|
28273
|
+
# @return [VmMediatedDevice]
|
28274
|
+
#
|
28275
|
+
def add(device, opts = {})
|
28276
|
+
internal_add(device, VmMediatedDevice, ADD, opts)
|
28277
|
+
end
|
28278
|
+
|
28279
|
+
LIST = [
|
28280
|
+
[:follow, String].freeze,
|
28281
|
+
[:max, Integer].freeze,
|
28282
|
+
].freeze
|
28283
|
+
|
28284
|
+
private_constant :LIST
|
28285
|
+
|
28286
|
+
#
|
28287
|
+
# Lists all the configured mediated devices of the template.
|
28288
|
+
#
|
28289
|
+
# The order of the returned list of mediated devices isn't guaranteed.
|
28290
|
+
#
|
28291
|
+
# @param opts [Hash] Additional options.
|
28292
|
+
#
|
28293
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
28294
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
28295
|
+
#
|
28296
|
+
# @option opts [Integer] :max Sets the maximum number of mediated devices to return.
|
28297
|
+
# If not specified all the mediated devices are returned.
|
28298
|
+
#
|
28299
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
28300
|
+
#
|
28301
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
28302
|
+
#
|
28303
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
28304
|
+
# given then the timeout set globally for the connection will be used.
|
28305
|
+
#
|
28306
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
28307
|
+
#
|
28308
|
+
# @return [Array<VmMediatedDevice>]
|
28309
|
+
#
|
28310
|
+
def list(opts = {})
|
28311
|
+
internal_get(LIST, opts)
|
28312
|
+
end
|
28313
|
+
|
28314
|
+
#
|
28315
|
+
# Returns a reference to the service that manages a mediated device of a template.
|
28316
|
+
#
|
28317
|
+
# @param id [String] The identifier of the `device`.
|
28318
|
+
#
|
28319
|
+
# @return [TemplateMediatedDeviceService] A reference to the `device` service.
|
28320
|
+
#
|
28321
|
+
def device_service(id)
|
28322
|
+
TemplateMediatedDeviceService.new(self, id)
|
28323
|
+
end
|
28324
|
+
|
28325
|
+
#
|
28326
|
+
# Locates the service corresponding to the given path.
|
28327
|
+
#
|
28328
|
+
# @param path [String] The path of the service.
|
28329
|
+
#
|
28330
|
+
# @return [Service] A reference to the service.
|
28331
|
+
#
|
28332
|
+
def service(path)
|
28333
|
+
if path.nil? || path == ''
|
28334
|
+
return self
|
28335
|
+
end
|
28336
|
+
index = path.index('/')
|
28337
|
+
if index.nil?
|
28338
|
+
return device_service(path)
|
28339
|
+
end
|
28340
|
+
return device_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
|
28341
|
+
end
|
28342
|
+
|
28343
|
+
end
|
28344
|
+
|
27779
28345
|
class TemplateNicService < Service
|
27780
28346
|
|
27781
28347
|
GET = [
|
@@ -28215,7 +28781,7 @@ module OvirtSDK4
|
|
28215
28781
|
# original virtual machine. To do so use the `vm.disk_attachments` attribute, specifying the identifier of the disk
|
28216
28782
|
# of the original virtual machine and the characteristics that you want to change. For example, if the original
|
28217
28783
|
# virtual machine has a disk with the identifier `456`, and, for that disk, you want to change the name to `mydisk`
|
28218
|
-
# the format to
|
28784
|
+
# the format to xref:types-disk_format[_Copy On Write_] and make it xref:types-disk[sparse], send a request body like
|
28219
28785
|
# this:
|
28220
28786
|
#
|
28221
28787
|
# [source,xml]
|
@@ -28885,12 +29451,16 @@ module OvirtSDK4
|
|
28885
29451
|
# <user_options>
|
28886
29452
|
# <property>
|
28887
29453
|
# <name>test</name>
|
28888
|
-
# <value>
|
29454
|
+
# <value>["any","JSON"]</value>
|
28889
29455
|
# </property>
|
28890
29456
|
# </user_options>
|
28891
29457
|
# </user>
|
28892
29458
|
# ----
|
28893
29459
|
#
|
29460
|
+
# IMPORTANT: Since version 4.4.5 of the engine this operation is deprecated, and preserved only for backwards
|
29461
|
+
# compatibility. It will be removed in the future. Please use the xref:services-user_option[options]
|
29462
|
+
# endpoint instead.
|
29463
|
+
#
|
28894
29464
|
# @param user [User] The `user` to update.
|
28895
29465
|
# @param opts [Hash] Additional options.
|
28896
29466
|
#
|
@@ -28927,6 +29497,15 @@ module OvirtSDK4
|
|
28927
29497
|
@groups_service ||= DomainUserGroupsService.new(self, 'groups')
|
28928
29498
|
end
|
28929
29499
|
|
29500
|
+
#
|
29501
|
+
# Locates the `options` service.
|
29502
|
+
#
|
29503
|
+
# @return [UserOptionsService] A reference to `options` service.
|
29504
|
+
#
|
29505
|
+
def options_service
|
29506
|
+
@options_service ||= UserOptionsService.new(self, 'options')
|
29507
|
+
end
|
29508
|
+
|
28930
29509
|
#
|
28931
29510
|
# Locates the `permissions` service.
|
28932
29511
|
#
|
@@ -28986,6 +29565,12 @@ module OvirtSDK4
|
|
28986
29565
|
if path.start_with?('groups/')
|
28987
29566
|
return groups_service.service(path[7..-1])
|
28988
29567
|
end
|
29568
|
+
if path == 'options'
|
29569
|
+
return options_service
|
29570
|
+
end
|
29571
|
+
if path.start_with?('options/')
|
29572
|
+
return options_service.service(path[8..-1])
|
29573
|
+
end
|
28989
29574
|
if path == 'permissions'
|
28990
29575
|
return permissions_service
|
28991
29576
|
end
|
@@ -29015,6 +29600,219 @@ module OvirtSDK4
|
|
29015
29600
|
|
29016
29601
|
end
|
29017
29602
|
|
29603
|
+
class UserOptionService < Service
|
29604
|
+
|
29605
|
+
GET = [
|
29606
|
+
].freeze
|
29607
|
+
|
29608
|
+
private_constant :GET
|
29609
|
+
|
29610
|
+
#
|
29611
|
+
# Returns a user profile property of type JSON.
|
29612
|
+
#
|
29613
|
+
# Example request(for user with identifier `123` and option with identifier `456`):
|
29614
|
+
#
|
29615
|
+
# [source]
|
29616
|
+
# ----
|
29617
|
+
# GET /ovirt-engine/api/users/123/options/456
|
29618
|
+
# ----
|
29619
|
+
#
|
29620
|
+
# The result will be the following XML document:
|
29621
|
+
#
|
29622
|
+
# [source,xml]
|
29623
|
+
# ----
|
29624
|
+
# <user_option href="/ovirt-engine/api/users/123/options/456" id="456">
|
29625
|
+
# <name>SomeName</name>
|
29626
|
+
# <content>["any", "JSON"]</content>
|
29627
|
+
# <user href="/ovirt-engine/api/users/123" id="123"/>
|
29628
|
+
# </user_option>
|
29629
|
+
# ----
|
29630
|
+
#
|
29631
|
+
# @param opts [Hash] Additional options.
|
29632
|
+
#
|
29633
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
29634
|
+
#
|
29635
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
29636
|
+
#
|
29637
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
29638
|
+
# given then the timeout set globally for the connection will be used.
|
29639
|
+
#
|
29640
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
29641
|
+
#
|
29642
|
+
# @return [UserOption]
|
29643
|
+
#
|
29644
|
+
def get(opts = {})
|
29645
|
+
internal_get(GET, opts)
|
29646
|
+
end
|
29647
|
+
|
29648
|
+
REMOVE = [
|
29649
|
+
].freeze
|
29650
|
+
|
29651
|
+
private_constant :REMOVE
|
29652
|
+
|
29653
|
+
#
|
29654
|
+
# Deletes an existing property of type JSON.
|
29655
|
+
#
|
29656
|
+
# Example request(for user with identifier `123` and option with identifier `456`):
|
29657
|
+
#
|
29658
|
+
# [source]
|
29659
|
+
# ----
|
29660
|
+
# DELETE /ovirt-engine/api/users/123/options/456
|
29661
|
+
# ----
|
29662
|
+
#
|
29663
|
+
# @param opts [Hash] Additional options.
|
29664
|
+
#
|
29665
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
29666
|
+
#
|
29667
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
29668
|
+
#
|
29669
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
29670
|
+
# given then the timeout set globally for the connection will be used.
|
29671
|
+
#
|
29672
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
29673
|
+
#
|
29674
|
+
def remove(opts = {})
|
29675
|
+
internal_remove(REMOVE, opts)
|
29676
|
+
end
|
29677
|
+
|
29678
|
+
#
|
29679
|
+
# Locates the service corresponding to the given path.
|
29680
|
+
#
|
29681
|
+
# @param path [String] The path of the service.
|
29682
|
+
#
|
29683
|
+
# @return [Service] A reference to the service.
|
29684
|
+
#
|
29685
|
+
def service(path)
|
29686
|
+
if path.nil? || path == ''
|
29687
|
+
return self
|
29688
|
+
end
|
29689
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
29690
|
+
end
|
29691
|
+
|
29692
|
+
end
|
29693
|
+
|
29694
|
+
class UserOptionsService < Service
|
29695
|
+
|
29696
|
+
ADD = [
|
29697
|
+
].freeze
|
29698
|
+
|
29699
|
+
private_constant :ADD
|
29700
|
+
|
29701
|
+
#
|
29702
|
+
# Adds a new user profile property of type JSON.
|
29703
|
+
#
|
29704
|
+
# Example request(for user with identifier `123`):
|
29705
|
+
#
|
29706
|
+
# [source]
|
29707
|
+
# ----
|
29708
|
+
# POST /ovirt-engine/api/users/123/options
|
29709
|
+
# ----
|
29710
|
+
#
|
29711
|
+
# Payload:
|
29712
|
+
#
|
29713
|
+
# [source,xml]
|
29714
|
+
# ----
|
29715
|
+
# <user_option>
|
29716
|
+
# <name>SomeName</name>
|
29717
|
+
# <content>["any", "JSON"]</content>
|
29718
|
+
# </user_option>
|
29719
|
+
# ----
|
29720
|
+
#
|
29721
|
+
# @param option [UserOption] The `option` to add.
|
29722
|
+
#
|
29723
|
+
# @param opts [Hash] Additional options.
|
29724
|
+
#
|
29725
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
29726
|
+
#
|
29727
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
29728
|
+
#
|
29729
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
29730
|
+
# given then the timeout set globally for the connection will be used.
|
29731
|
+
#
|
29732
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
29733
|
+
#
|
29734
|
+
# @return [UserOption]
|
29735
|
+
#
|
29736
|
+
def add(option, opts = {})
|
29737
|
+
internal_add(option, UserOption, ADD, opts)
|
29738
|
+
end
|
29739
|
+
|
29740
|
+
LIST = [
|
29741
|
+
].freeze
|
29742
|
+
|
29743
|
+
private_constant :LIST
|
29744
|
+
|
29745
|
+
#
|
29746
|
+
# Returns a list of user profile properties of type JSON.
|
29747
|
+
#
|
29748
|
+
# Example request(for user with identifier `123`):
|
29749
|
+
#
|
29750
|
+
# [source]
|
29751
|
+
# ----
|
29752
|
+
# GET /ovirt-engine/api/users/123/options
|
29753
|
+
# ----
|
29754
|
+
#
|
29755
|
+
# The result will be the following XML document:
|
29756
|
+
#
|
29757
|
+
# [source,xml]
|
29758
|
+
# ----
|
29759
|
+
# <user_options>
|
29760
|
+
# <user_option href="/ovirt-engine/api/users/123/options/456" id="456">
|
29761
|
+
# <name>SomeName</name>
|
29762
|
+
# <content>["any", "JSON"]</content>
|
29763
|
+
# <user href="/ovirt-engine/api/users/123" id="123"/>
|
29764
|
+
# </user_option>
|
29765
|
+
# </user_options>
|
29766
|
+
# ----
|
29767
|
+
#
|
29768
|
+
# @param opts [Hash] Additional options.
|
29769
|
+
#
|
29770
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
29771
|
+
#
|
29772
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
29773
|
+
#
|
29774
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
29775
|
+
# given then the timeout set globally for the connection will be used.
|
29776
|
+
#
|
29777
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
29778
|
+
#
|
29779
|
+
# @return [Array<UserOption>]
|
29780
|
+
#
|
29781
|
+
def list(opts = {})
|
29782
|
+
internal_get(LIST, opts)
|
29783
|
+
end
|
29784
|
+
|
29785
|
+
#
|
29786
|
+
# Locates the `option` service.
|
29787
|
+
#
|
29788
|
+
# @param id [String] The identifier of the `option`.
|
29789
|
+
#
|
29790
|
+
# @return [UserOptionService] A reference to the `option` service.
|
29791
|
+
#
|
29792
|
+
def option_service(id)
|
29793
|
+
UserOptionService.new(self, id)
|
29794
|
+
end
|
29795
|
+
|
29796
|
+
#
|
29797
|
+
# Locates the service corresponding to the given path.
|
29798
|
+
#
|
29799
|
+
# @param path [String] The path of the service.
|
29800
|
+
#
|
29801
|
+
# @return [Service] A reference to the service.
|
29802
|
+
#
|
29803
|
+
def service(path)
|
29804
|
+
if path.nil? || path == ''
|
29805
|
+
return self
|
29806
|
+
end
|
29807
|
+
index = path.index('/')
|
29808
|
+
if index.nil?
|
29809
|
+
return option_service(path)
|
29810
|
+
end
|
29811
|
+
return option_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
|
29812
|
+
end
|
29813
|
+
|
29814
|
+
end
|
29815
|
+
|
29018
29816
|
class UsersService < Service
|
29019
29817
|
|
29020
29818
|
ADD = [
|
@@ -29046,7 +29844,7 @@ module OvirtSDK4
|
|
29046
29844
|
# ----
|
29047
29845
|
#
|
29048
29846
|
# In case you are working with Active Directory you have to pass user principal name (UPN) as `username`, followed
|
29049
|
-
# by authorization provider name. Due to https://bugzilla.redhat.com/1147900[bug 1147900] you need to provide
|
29847
|
+
# by authorization provider name. Due to link:https://bugzilla.redhat.com/1147900[bug 1147900] you need to provide
|
29050
29848
|
# also `principal` parameter set to UPN of the user.
|
29051
29849
|
#
|
29052
29850
|
# For example, to add the user with UPN `myuser@mysubdomain.mydomain.com` from the `myextension-authz`
|
@@ -29351,6 +30149,55 @@ module OvirtSDK4
|
|
29351
30149
|
|
29352
30150
|
class VmService < MeasurableService
|
29353
30151
|
|
30152
|
+
AUTO_PIN_CPU_AND_NUMA_NODES = [
|
30153
|
+
[:async, TrueClass].freeze,
|
30154
|
+
[:optimize_cpu_settings, TrueClass].freeze,
|
30155
|
+
].freeze
|
30156
|
+
|
30157
|
+
private_constant :AUTO_PIN_CPU_AND_NUMA_NODES
|
30158
|
+
|
30159
|
+
#
|
30160
|
+
# Apply an automatic CPU and NUMA configuration on the VM.
|
30161
|
+
#
|
30162
|
+
# IMPORTANT: Since version 4.5 of the engine this operation is deprecated, and preserved only for backwards
|
30163
|
+
# compatibility. It will be removed in the future. Instead please use PUT followed by xref:services-vm-methods-update[update operation].
|
30164
|
+
#
|
30165
|
+
# An example for a request:
|
30166
|
+
# [source]
|
30167
|
+
# ----
|
30168
|
+
# POST /ovirt-engine/api/vms/123/autopincpuandnumanodes
|
30169
|
+
# ----
|
30170
|
+
#
|
30171
|
+
# With a request body like this:
|
30172
|
+
#
|
30173
|
+
# [source,xml]
|
30174
|
+
# ----
|
30175
|
+
# <action>
|
30176
|
+
# <optimize_cpu_settings>true</optimize_cpu_settings>
|
30177
|
+
# </action>
|
30178
|
+
# ----
|
30179
|
+
#
|
30180
|
+
# @param opts [Hash] Additional options.
|
30181
|
+
#
|
30182
|
+
# @option opts [Boolean] :async Indicates if the detach action should be performed asynchronously.
|
30183
|
+
#
|
30184
|
+
# @option opts [Boolean] :optimize_cpu_settings Specifies how the auto CPU and NUMA configuration is applied.
|
30185
|
+
# If set to true, will adjust the CPU topology to fit the VM pinned host hardware.
|
30186
|
+
# Otherwise, it will use the VM CPU topology.
|
30187
|
+
#
|
30188
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
30189
|
+
#
|
30190
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
30191
|
+
#
|
30192
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
30193
|
+
# given then the timeout set globally for the connection will be used.
|
30194
|
+
#
|
30195
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
30196
|
+
#
|
30197
|
+
def auto_pin_cpu_and_numa_nodes(opts = {})
|
30198
|
+
internal_action(:autopincpuandnumanodes, nil, AUTO_PIN_CPU_AND_NUMA_NODES, opts)
|
30199
|
+
end
|
30200
|
+
|
29354
30201
|
CANCEL_MIGRATION = [
|
29355
30202
|
[:async, TrueClass].freeze,
|
29356
30203
|
].freeze
|
@@ -29435,7 +30282,7 @@ module OvirtSDK4
|
|
29435
30282
|
#
|
29436
30283
|
# Permanently restores the virtual machine to the state of the previewed snapshot.
|
29437
30284
|
#
|
29438
|
-
# See the
|
30285
|
+
# See the xref:services-vm-methods-preview_snapshot[preview_snapshot] operation for details.
|
29439
30286
|
#
|
29440
30287
|
# @param opts [Hash] Additional options.
|
29441
30288
|
#
|
@@ -29547,6 +30394,8 @@ module OvirtSDK4
|
|
29547
30394
|
# </action>
|
29548
30395
|
# ----
|
29549
30396
|
#
|
30397
|
+
# NOTE: Confirm that the export operation has completed before attempting any actions on the export domain.
|
30398
|
+
#
|
29550
30399
|
# @param opts [Hash] Additional options.
|
29551
30400
|
#
|
29552
30401
|
# @option opts [Boolean] :async Indicates if the export should be performed asynchronously.
|
@@ -29619,6 +30468,7 @@ module OvirtSDK4
|
|
29619
30468
|
[:filter, TrueClass].freeze,
|
29620
30469
|
[:follow, String].freeze,
|
29621
30470
|
[:next_run, TrueClass].freeze,
|
30471
|
+
[:ovf_as_ova, TrueClass].freeze,
|
29622
30472
|
].freeze
|
29623
30473
|
|
29624
30474
|
private_constant :GET
|
@@ -29671,6 +30521,16 @@ module OvirtSDK4
|
|
29671
30521
|
# GET /vms/{vm:id};next_run=true
|
29672
30522
|
# ----
|
29673
30523
|
#
|
30524
|
+
# @option opts [Boolean] :ovf_as_ova Indicates if the results should expose the OVF as it appears in OVA files of that VM. The OVF document
|
30525
|
+
# describing the virtual machine. This parameter will work only when all_content=True is set.
|
30526
|
+
# The OVF will be presented in `initialization.configuration.data`.
|
30527
|
+
#
|
30528
|
+
# For example:
|
30529
|
+
# [source]
|
30530
|
+
# ----
|
30531
|
+
# GET /vms/{vm:id}?all_content=true&ovf_as_ova=true
|
30532
|
+
# ----
|
30533
|
+
#
|
29674
30534
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
29675
30535
|
#
|
29676
30536
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -29857,8 +30717,8 @@ module OvirtSDK4
|
|
29857
30717
|
#
|
29858
30718
|
# The snapshot is indicated with the `snapshot.id` parameter. It is restored temporarily, so that the content can
|
29859
30719
|
# be inspected. Once that inspection is finished, the state of the virtual machine can be made permanent, using the
|
29860
|
-
#
|
29861
|
-
#
|
30720
|
+
# xref:services-vm-methods-commit_snapshot[commit_snapshot] method, or discarded using the
|
30721
|
+
# xref:services-vm-methods-undo_snapshot[undo_snapshot] method.
|
29862
30722
|
#
|
29863
30723
|
# @param opts [Hash] Additional options.
|
29864
30724
|
#
|
@@ -29919,6 +30779,7 @@ module OvirtSDK4
|
|
29919
30779
|
|
29920
30780
|
REBOOT = [
|
29921
30781
|
[:async, TrueClass].freeze,
|
30782
|
+
[:force, TrueClass].freeze,
|
29922
30783
|
].freeze
|
29923
30784
|
|
29924
30785
|
private_constant :REBOOT
|
@@ -29941,10 +30802,29 @@ module OvirtSDK4
|
|
29941
30802
|
# <action/>
|
29942
30803
|
# ----
|
29943
30804
|
#
|
30805
|
+
# To reboot the VM even if a backup is running for it,
|
30806
|
+
# the action should include the 'force' element.
|
30807
|
+
#
|
30808
|
+
# For example, to force reboot virtual machine `123`:
|
30809
|
+
#
|
30810
|
+
# ----
|
30811
|
+
# POST /ovirt-engine/api/vms/123/reboot
|
30812
|
+
# ----
|
30813
|
+
#
|
30814
|
+
# [source,xml]
|
30815
|
+
# ----
|
30816
|
+
# <action>
|
30817
|
+
# <force>true</force>
|
30818
|
+
# </action>
|
30819
|
+
# ----
|
30820
|
+
#
|
29944
30821
|
# @param opts [Hash] Additional options.
|
29945
30822
|
#
|
29946
30823
|
# @option opts [Boolean] :async Indicates if the reboot should be performed asynchronously.
|
29947
30824
|
#
|
30825
|
+
# @option opts [Boolean] :force Indicates if the VM should be forcibly rebooted even
|
30826
|
+
# if a backup is running for it.
|
30827
|
+
#
|
29948
30828
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
29949
30829
|
#
|
29950
30830
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -30023,8 +30903,90 @@ module OvirtSDK4
|
|
30023
30903
|
internal_action(:reordermacaddresses, nil, REORDER_MAC_ADDRESSES, opts)
|
30024
30904
|
end
|
30025
30905
|
|
30906
|
+
RESET = [
|
30907
|
+
[:async, TrueClass].freeze,
|
30908
|
+
].freeze
|
30909
|
+
|
30910
|
+
private_constant :RESET
|
30911
|
+
|
30912
|
+
#
|
30913
|
+
# Sends a reset request to a virtual machine.
|
30914
|
+
#
|
30915
|
+
# For example:
|
30916
|
+
#
|
30917
|
+
# [source]
|
30918
|
+
# ----
|
30919
|
+
# POST /ovirt-engine/api/vms/123/reset
|
30920
|
+
# ----
|
30921
|
+
#
|
30922
|
+
# The reset action does not take any action specific parameters; therefore, the request body should contain an
|
30923
|
+
# empty `action`:
|
30924
|
+
#
|
30925
|
+
# [source,xml]
|
30926
|
+
# ----
|
30927
|
+
# <action/>
|
30928
|
+
# ----
|
30929
|
+
#
|
30930
|
+
# @param opts [Hash] Additional options.
|
30931
|
+
#
|
30932
|
+
# @option opts [Boolean] :async Indicates if the reset should be performed asynchronously.
|
30933
|
+
#
|
30934
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
30935
|
+
#
|
30936
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
30937
|
+
#
|
30938
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
30939
|
+
# given then the timeout set globally for the connection will be used.
|
30940
|
+
#
|
30941
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
30942
|
+
#
|
30943
|
+
def reset(opts = {})
|
30944
|
+
internal_action(:reset, nil, RESET, opts)
|
30945
|
+
end
|
30946
|
+
|
30947
|
+
SCREENSHOT = [
|
30948
|
+
].freeze
|
30949
|
+
|
30950
|
+
private_constant :SCREENSHOT
|
30951
|
+
|
30952
|
+
#
|
30953
|
+
# Captures screenshot of the current state of the VM.
|
30954
|
+
#
|
30955
|
+
# For example:
|
30956
|
+
#
|
30957
|
+
# [source]
|
30958
|
+
# ----
|
30959
|
+
# POST /ovirt-engine/api/vms/123/screenshot
|
30960
|
+
# ----
|
30961
|
+
#
|
30962
|
+
# The screenshot action does not take any action specific parameters; therefore, the request body should contain an
|
30963
|
+
# empty `action`:
|
30964
|
+
#
|
30965
|
+
# [source,xml]
|
30966
|
+
# ----
|
30967
|
+
# <action/>
|
30968
|
+
#
|
30969
|
+
#
|
30970
|
+
# ----
|
30971
|
+
#
|
30972
|
+
# @param opts [Hash] Additional options.
|
30973
|
+
#
|
30974
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
30975
|
+
#
|
30976
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
30977
|
+
#
|
30978
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
30979
|
+
# given then the timeout set globally for the connection will be used.
|
30980
|
+
#
|
30981
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
30982
|
+
#
|
30983
|
+
def screenshot(opts = {})
|
30984
|
+
internal_action(:screenshot, nil, SCREENSHOT, opts)
|
30985
|
+
end
|
30986
|
+
|
30026
30987
|
SHUTDOWN = [
|
30027
30988
|
[:async, TrueClass].freeze,
|
30989
|
+
[:force, TrueClass].freeze,
|
30028
30990
|
[:reason, String].freeze,
|
30029
30991
|
].freeze
|
30030
30992
|
|
@@ -30048,10 +31010,29 @@ module OvirtSDK4
|
|
30048
31010
|
# <action/>
|
30049
31011
|
# ----
|
30050
31012
|
#
|
31013
|
+
# To shutdown the VM even if a backup is running for it,
|
31014
|
+
# the action should include the 'force' element.
|
31015
|
+
#
|
31016
|
+
# For example, to force shutdown virtual machine `123`:
|
31017
|
+
#
|
31018
|
+
# ----
|
31019
|
+
# POST /ovirt-engine/api/vms/123/shutdown
|
31020
|
+
# ----
|
31021
|
+
#
|
31022
|
+
# [source,xml]
|
31023
|
+
# ----
|
31024
|
+
# <action>
|
31025
|
+
# <force>true</force>
|
31026
|
+
# </action>
|
31027
|
+
# ----
|
31028
|
+
#
|
30051
31029
|
# @param opts [Hash] Additional options.
|
30052
31030
|
#
|
30053
31031
|
# @option opts [Boolean] :async Indicates if the shutdown should be performed asynchronously.
|
30054
31032
|
#
|
31033
|
+
# @option opts [Boolean] :force Indicates if the VM should be forcibly shutdown even
|
31034
|
+
# if a backup is running for it.
|
31035
|
+
#
|
30055
31036
|
# @option opts [String] :reason The reason the virtual machine was stopped.
|
30056
31037
|
# Optionally set by user when shutting down the virtual machine.
|
30057
31038
|
#
|
@@ -30114,10 +31095,10 @@ module OvirtSDK4
|
|
30114
31095
|
# @option opts [Boolean] :pause If set to `true`, start the virtual machine in paused mode. The default is `false`.
|
30115
31096
|
#
|
30116
31097
|
# @option opts [Boolean] :use_cloud_init If set to `true`, the initialization type is set to _cloud-init_. The default value is `false`.
|
30117
|
-
# See https://cloudinit.readthedocs.io/en/latest[
|
31098
|
+
# See link:https://cloudinit.readthedocs.io/en/latest[cloud-init documentation] for details.
|
30118
31099
|
#
|
30119
31100
|
# @option opts [Boolean] :use_ignition If set to `true`, the initialization type is set to _Ignition_. The default value is `false`.
|
30120
|
-
# See https://coreos.com/ignition/docs/latest/[
|
31101
|
+
# See link:https://coreos.com/ignition/docs/latest/[Ignition documentation] for details.
|
30121
31102
|
#
|
30122
31103
|
# @option opts [Boolean] :use_initialization If set to `true`, the initialization type is set by the VM's OS.
|
30123
31104
|
# Windows will set to _Sysprep_, Linux to _cloud-init_ and RedHat CoreOS to _Ignition_.
|
@@ -30126,7 +31107,7 @@ module OvirtSDK4
|
|
30126
31107
|
# The default value is `false`.
|
30127
31108
|
#
|
30128
31109
|
# @option opts [Boolean] :use_sysprep If set to `true`, the initialization type is set to _Sysprep_. The default value is `false`.
|
30129
|
-
# See https://en.wikipedia.org/wiki/Sysprep[
|
31110
|
+
# See link:https://en.wikipedia.org/wiki/Sysprep[Sysprep] for details.
|
30130
31111
|
#
|
30131
31112
|
# @option opts [Vm] :vm The definition of the virtual machine for this specific run.
|
30132
31113
|
#
|
@@ -30168,6 +31149,7 @@ module OvirtSDK4
|
|
30168
31149
|
|
30169
31150
|
STOP = [
|
30170
31151
|
[:async, TrueClass].freeze,
|
31152
|
+
[:force, TrueClass].freeze,
|
30171
31153
|
[:reason, String].freeze,
|
30172
31154
|
].freeze
|
30173
31155
|
|
@@ -30191,10 +31173,29 @@ module OvirtSDK4
|
|
30191
31173
|
# <action/>
|
30192
31174
|
# ----
|
30193
31175
|
#
|
31176
|
+
# To stop the VM even if a backup is running for it,
|
31177
|
+
# the action should include the 'force' element.
|
31178
|
+
#
|
31179
|
+
# For example, to force stop virtual machine `123`:
|
31180
|
+
#
|
31181
|
+
# ----
|
31182
|
+
# POST /ovirt-engine/api/vms/123/stop
|
31183
|
+
# ----
|
31184
|
+
#
|
31185
|
+
# [source,xml]
|
31186
|
+
# ----
|
31187
|
+
# <action>
|
31188
|
+
# <force>true</force>
|
31189
|
+
# </action>
|
31190
|
+
# ----
|
31191
|
+
#
|
30194
31192
|
# @param opts [Hash] Additional options.
|
30195
31193
|
#
|
30196
31194
|
# @option opts [Boolean] :async Indicates if the stop action should be performed asynchronously.
|
30197
31195
|
#
|
31196
|
+
# @option opts [Boolean] :force Indicates if the VM should be forcibly stop even
|
31197
|
+
# if a backup is running for it.
|
31198
|
+
#
|
30198
31199
|
# @option opts [String] :reason The reason the virtual machine was stopped.
|
30199
31200
|
# Optionally set by user when shutting down the virtual machine.
|
30200
31201
|
#
|
@@ -30335,8 +31336,8 @@ module OvirtSDK4
|
|
30335
31336
|
# the SPICE protocol.
|
30336
31337
|
#
|
30337
31338
|
# In order to obtain an authentication token for a specific protocol, for
|
30338
|
-
# example for VNC, use the `ticket` method of the
|
30339
|
-
# service
|
31339
|
+
# example for VNC, use the `ticket` method of the
|
31340
|
+
# xref:services-vm_graphics_console[service], which manages the graphics consoles of the virtual machine, by sending
|
30340
31341
|
# a request:
|
30341
31342
|
#
|
30342
31343
|
# [source]
|
@@ -30459,7 +31460,7 @@ module OvirtSDK4
|
|
30459
31460
|
#
|
30460
31461
|
# Restores the virtual machine to the state it had before previewing the snapshot.
|
30461
31462
|
#
|
30462
|
-
# See the
|
31463
|
+
# See the xref:services-vm-methods-preview_snapshot[preview_snapshot] operation for details.
|
30463
31464
|
#
|
30464
31465
|
# @param opts [Hash] Additional options.
|
30465
31466
|
#
|
@@ -30548,6 +31549,15 @@ module OvirtSDK4
|
|
30548
31549
|
@cdroms_service ||= VmCdromsService.new(self, 'cdroms')
|
30549
31550
|
end
|
30550
31551
|
|
31552
|
+
#
|
31553
|
+
# List of checkpoints of this virtual machine.
|
31554
|
+
#
|
31555
|
+
# @return [VmCheckpointsService] A reference to `checkpoints` service.
|
31556
|
+
#
|
31557
|
+
def checkpoints_service
|
31558
|
+
@checkpoints_service ||= VmCheckpointsService.new(self, 'checkpoints')
|
31559
|
+
end
|
31560
|
+
|
30551
31561
|
#
|
30552
31562
|
# List of disks attached to this virtual machine.
|
30553
31563
|
#
|
@@ -30585,6 +31595,15 @@ module OvirtSDK4
|
|
30585
31595
|
@katello_errata_service ||= KatelloErrataService.new(self, 'katelloerrata')
|
30586
31596
|
end
|
30587
31597
|
|
31598
|
+
#
|
31599
|
+
# Reference to the service that manages mediated devices associated with the VM.
|
31600
|
+
#
|
31601
|
+
# @return [VmMediatedDevicesService] A reference to `mediated_devices` service.
|
31602
|
+
#
|
31603
|
+
def mediated_devices_service
|
31604
|
+
@mediated_devices_service ||= VmMediatedDevicesService.new(self, 'mediateddevices')
|
31605
|
+
end
|
31606
|
+
|
30588
31607
|
#
|
30589
31608
|
# Locates the `nics` service.
|
30590
31609
|
#
|
@@ -30701,6 +31720,12 @@ module OvirtSDK4
|
|
30701
31720
|
if path.start_with?('cdroms/')
|
30702
31721
|
return cdroms_service.service(path[7..-1])
|
30703
31722
|
end
|
31723
|
+
if path == 'checkpoints'
|
31724
|
+
return checkpoints_service
|
31725
|
+
end
|
31726
|
+
if path.start_with?('checkpoints/')
|
31727
|
+
return checkpoints_service.service(path[12..-1])
|
31728
|
+
end
|
30704
31729
|
if path == 'diskattachments'
|
30705
31730
|
return disk_attachments_service
|
30706
31731
|
end
|
@@ -30725,6 +31750,12 @@ module OvirtSDK4
|
|
30725
31750
|
if path.start_with?('katelloerrata/')
|
30726
31751
|
return katello_errata_service.service(path[14..-1])
|
30727
31752
|
end
|
31753
|
+
if path == 'mediateddevices'
|
31754
|
+
return mediated_devices_service
|
31755
|
+
end
|
31756
|
+
if path.start_with?('mediateddevices/')
|
31757
|
+
return mediated_devices_service.service(path[16..-1])
|
31758
|
+
end
|
30728
31759
|
if path == 'nics'
|
30729
31760
|
return nics_service
|
30730
31761
|
end
|
@@ -30915,6 +31946,20 @@ module OvirtSDK4
|
|
30915
31946
|
# Finalize the virtual machine backup entity.
|
30916
31947
|
#
|
30917
31948
|
# End backup, unlock resources, and perform cleanups.
|
31949
|
+
# To finalize a virtual machine with an id '123' and a backup with an id '456'
|
31950
|
+
# send a request as follows:
|
31951
|
+
#
|
31952
|
+
# [source]
|
31953
|
+
# ----
|
31954
|
+
# POST /ovirt-engine/api/vms/123/backups/456/finalize
|
31955
|
+
# ----
|
31956
|
+
#
|
31957
|
+
# With a request body as follows:
|
31958
|
+
#
|
31959
|
+
# [source,xml]
|
31960
|
+
# ----
|
31961
|
+
# <action />
|
31962
|
+
# ----
|
30918
31963
|
#
|
30919
31964
|
# @param opts [Hash] Additional options.
|
30920
31965
|
#
|
@@ -31106,6 +32151,8 @@ module OvirtSDK4
|
|
31106
32151
|
class VmBackupsService < Service
|
31107
32152
|
|
31108
32153
|
ADD = [
|
32154
|
+
[:require_consistency, TrueClass].freeze,
|
32155
|
+
[:use_active, TrueClass].freeze,
|
31109
32156
|
].freeze
|
31110
32157
|
|
31111
32158
|
private_constant :ADD
|
@@ -31125,7 +32172,6 @@ module OvirtSDK4
|
|
31125
32172
|
#
|
31126
32173
|
# [source,xml]
|
31127
32174
|
# ----
|
31128
|
-
# POST /ovirt-engine/api/vms/123/backups
|
31129
32175
|
# <backup>
|
31130
32176
|
# <from_checkpoint_id>previous-checkpoint-uuid</from_checkpoint_id>
|
31131
32177
|
# <disks>
|
@@ -31152,10 +32198,55 @@ module OvirtSDK4
|
|
31152
32198
|
# </backup>
|
31153
32199
|
# ----
|
31154
32200
|
#
|
32201
|
+
# To provide the ID of the created backup, send a request like this:
|
32202
|
+
#
|
32203
|
+
# [source]
|
32204
|
+
# ----
|
32205
|
+
# POST /ovirt-engine/api/vms/123/backups
|
32206
|
+
# ----
|
32207
|
+
#
|
32208
|
+
# With a request body like this:
|
32209
|
+
#
|
32210
|
+
# [source,xml]
|
32211
|
+
# ----
|
32212
|
+
# <backup id="backup-uuid">
|
32213
|
+
# <from_checkpoint_id>previous-checkpoint-uuid</from_checkpoint_id>
|
32214
|
+
# <disks>
|
32215
|
+
# <disk id="disk-uuid" />
|
32216
|
+
# ...
|
32217
|
+
# </disks>
|
32218
|
+
# </backup>
|
32219
|
+
# ----
|
32220
|
+
#
|
31155
32221
|
# @param backup [Backup] The information about the virtual machine backup entity.
|
31156
32222
|
#
|
31157
32223
|
# @param opts [Hash] Additional options.
|
31158
32224
|
#
|
32225
|
+
# @option opts [Boolean] :require_consistency Indicates if the backup will fail if VM failed to freeze or not.
|
32226
|
+
#
|
32227
|
+
# If requireConsistency=True VM backup will fail in case of a
|
32228
|
+
# failure to freeze the VM.
|
32229
|
+
#
|
32230
|
+
# The REST API call should look like this:
|
32231
|
+
#
|
32232
|
+
# ....
|
32233
|
+
# POST /ovirt-engine/api/vms/123/backups?require_consistency=true
|
32234
|
+
# ....
|
32235
|
+
#
|
32236
|
+
# The default value of the requireConsistency flag is `false`.
|
32237
|
+
#
|
32238
|
+
# @option opts [Boolean] :use_active Indicate whether to use the active volume for performing the backup.
|
32239
|
+
#
|
32240
|
+
# If useActive=False a snapshot will be created for the backup operation.
|
32241
|
+
#
|
32242
|
+
# The REST API call should look like this:
|
32243
|
+
#
|
32244
|
+
# ....
|
32245
|
+
# POST /ovirt-engine/api/vms/123/backups?use_active=false
|
32246
|
+
# ....
|
32247
|
+
#
|
32248
|
+
# The default value of the useActive flag is `false`.
|
32249
|
+
#
|
31159
32250
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
31160
32251
|
#
|
31161
32252
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -31330,7 +32421,7 @@ module OvirtSDK4
|
|
31330
32421
|
# ----
|
31331
32422
|
#
|
31332
32423
|
# By default the above operations change permanently the disk that will be visible to the virtual machine
|
31333
|
-
# after the next boot, but they
|
32424
|
+
# after the next boot, but they do not have any effect on the currently running virtual machine. If you want
|
31334
32425
|
# to change the disk that is visible to the current running virtual machine, add the `current=true` parameter.
|
31335
32426
|
# For example, to eject the current disk send a request like this:
|
31336
32427
|
#
|
@@ -31483,20 +32574,21 @@ module OvirtSDK4
|
|
31483
32574
|
|
31484
32575
|
end
|
31485
32576
|
|
31486
|
-
class
|
32577
|
+
class VmCheckpointService < Service
|
31487
32578
|
|
31488
|
-
|
31489
|
-
[:
|
32579
|
+
GET = [
|
32580
|
+
[:follow, String].freeze,
|
31490
32581
|
].freeze
|
31491
32582
|
|
31492
|
-
private_constant :
|
32583
|
+
private_constant :GET
|
31493
32584
|
|
31494
32585
|
#
|
31495
|
-
#
|
32586
|
+
# Returns information about the virtual machine checkpoint.
|
31496
32587
|
#
|
31497
32588
|
# @param opts [Hash] Additional options.
|
31498
32589
|
#
|
31499
|
-
# @option opts [
|
32590
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
32591
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
31500
32592
|
#
|
31501
32593
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
31502
32594
|
#
|
@@ -31507,23 +32599,26 @@ module OvirtSDK4
|
|
31507
32599
|
#
|
31508
32600
|
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
31509
32601
|
#
|
31510
|
-
|
31511
|
-
|
32602
|
+
# @return [Checkpoint]
|
32603
|
+
#
|
32604
|
+
def get(opts = {})
|
32605
|
+
internal_get(GET, opts)
|
31512
32606
|
end
|
31513
32607
|
|
31514
|
-
|
32608
|
+
REMOVE = [
|
31515
32609
|
[:async, TrueClass].freeze,
|
31516
32610
|
].freeze
|
31517
32611
|
|
31518
|
-
private_constant :
|
32612
|
+
private_constant :REMOVE
|
31519
32613
|
|
31520
32614
|
#
|
31521
|
-
#
|
32615
|
+
# Remove the virtual machine checkpoint entity.
|
31522
32616
|
#
|
31523
|
-
#
|
32617
|
+
# Remove the checkpoint from libvirt and the database.
|
31524
32618
|
#
|
31525
|
-
# @
|
32619
|
+
# @param opts [Hash] Additional options.
|
31526
32620
|
#
|
32621
|
+
# @option opts [Boolean] :async Indicates if the remove should be performed asynchronously.
|
31527
32622
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
31528
32623
|
#
|
31529
32624
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -31533,39 +32628,43 @@ module OvirtSDK4
|
|
31533
32628
|
#
|
31534
32629
|
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
31535
32630
|
#
|
31536
|
-
def
|
31537
|
-
|
32631
|
+
def remove(opts = {})
|
32632
|
+
internal_remove(REMOVE, opts)
|
31538
32633
|
end
|
31539
32634
|
|
31540
|
-
EXPORT = [
|
31541
|
-
[:async, TrueClass].freeze,
|
31542
|
-
[:filter, TrueClass].freeze,
|
31543
|
-
].freeze
|
31544
|
-
|
31545
|
-
private_constant :EXPORT
|
31546
|
-
|
31547
32635
|
#
|
31548
|
-
#
|
32636
|
+
# A reference to the service that lists the disks in checkpoint.
|
31549
32637
|
#
|
31550
|
-
# @
|
32638
|
+
# @return [VmCheckpointDisksService] A reference to `disks` service.
|
31551
32639
|
#
|
31552
|
-
|
31553
|
-
|
31554
|
-
|
31555
|
-
|
31556
|
-
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32640
|
+
def disks_service
|
32641
|
+
@disks_service ||= VmCheckpointDisksService.new(self, 'disks')
|
32642
|
+
end
|
32643
|
+
|
31557
32644
|
#
|
31558
|
-
#
|
32645
|
+
# Locates the service corresponding to the given path.
|
31559
32646
|
#
|
31560
|
-
# @
|
31561
|
-
# given then the timeout set globally for the connection will be used.
|
32647
|
+
# @param path [String] The path of the service.
|
31562
32648
|
#
|
31563
|
-
# @
|
32649
|
+
# @return [Service] A reference to the service.
|
31564
32650
|
#
|
31565
|
-
def
|
31566
|
-
|
32651
|
+
def service(path)
|
32652
|
+
if path.nil? || path == ''
|
32653
|
+
return self
|
32654
|
+
end
|
32655
|
+
if path == 'disks'
|
32656
|
+
return disks_service
|
32657
|
+
end
|
32658
|
+
if path.start_with?('disks/')
|
32659
|
+
return disks_service.service(path[6..-1])
|
32660
|
+
end
|
32661
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
31567
32662
|
end
|
31568
32663
|
|
32664
|
+
end
|
32665
|
+
|
32666
|
+
class VmCheckpointDiskService < Service
|
32667
|
+
|
31569
32668
|
GET = [
|
31570
32669
|
[:follow, String].freeze,
|
31571
32670
|
].freeze
|
@@ -31573,7 +32672,273 @@ module OvirtSDK4
|
|
31573
32672
|
private_constant :GET
|
31574
32673
|
|
31575
32674
|
#
|
31576
|
-
#
|
32675
|
+
# Retrieves the description of the disk.
|
32676
|
+
#
|
32677
|
+
# @param opts [Hash] Additional options.
|
32678
|
+
#
|
32679
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
32680
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
32681
|
+
#
|
32682
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32683
|
+
#
|
32684
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
32685
|
+
#
|
32686
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
32687
|
+
# given then the timeout set globally for the connection will be used.
|
32688
|
+
#
|
32689
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
32690
|
+
#
|
32691
|
+
# @return [Disk]
|
32692
|
+
#
|
32693
|
+
def get(opts = {})
|
32694
|
+
internal_get(GET, opts)
|
32695
|
+
end
|
32696
|
+
|
32697
|
+
#
|
32698
|
+
# Locates the service corresponding to the given path.
|
32699
|
+
#
|
32700
|
+
# @param path [String] The path of the service.
|
32701
|
+
#
|
32702
|
+
# @return [Service] A reference to the service.
|
32703
|
+
#
|
32704
|
+
def service(path)
|
32705
|
+
if path.nil? || path == ''
|
32706
|
+
return self
|
32707
|
+
end
|
32708
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
32709
|
+
end
|
32710
|
+
|
32711
|
+
end
|
32712
|
+
|
32713
|
+
class VmCheckpointDisksService < Service
|
32714
|
+
|
32715
|
+
LIST = [
|
32716
|
+
[:follow, String].freeze,
|
32717
|
+
[:max, Integer].freeze,
|
32718
|
+
].freeze
|
32719
|
+
|
32720
|
+
private_constant :LIST
|
32721
|
+
|
32722
|
+
#
|
32723
|
+
# Returns the list of disks in checkpoint.
|
32724
|
+
#
|
32725
|
+
# @param opts [Hash] Additional options.
|
32726
|
+
#
|
32727
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
32728
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
32729
|
+
#
|
32730
|
+
# @option opts [Integer] :max Sets the maximum number of disks to return. If not specified, all the disks are returned.
|
32731
|
+
#
|
32732
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32733
|
+
#
|
32734
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
32735
|
+
#
|
32736
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
32737
|
+
# given then the timeout set globally for the connection will be used.
|
32738
|
+
#
|
32739
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
32740
|
+
#
|
32741
|
+
# @return [Array<Disk>]
|
32742
|
+
#
|
32743
|
+
def list(opts = {})
|
32744
|
+
internal_get(LIST, opts)
|
32745
|
+
end
|
32746
|
+
|
32747
|
+
#
|
32748
|
+
# A reference to the service that manages a specific disk.
|
32749
|
+
#
|
32750
|
+
# @param id [String] The identifier of the `disk`.
|
32751
|
+
#
|
32752
|
+
# @return [VmCheckpointDiskService] A reference to the `disk` service.
|
32753
|
+
#
|
32754
|
+
def disk_service(id)
|
32755
|
+
VmCheckpointDiskService.new(self, id)
|
32756
|
+
end
|
32757
|
+
|
32758
|
+
#
|
32759
|
+
# Locates the service corresponding to the given path.
|
32760
|
+
#
|
32761
|
+
# @param path [String] The path of the service.
|
32762
|
+
#
|
32763
|
+
# @return [Service] A reference to the service.
|
32764
|
+
#
|
32765
|
+
def service(path)
|
32766
|
+
if path.nil? || path == ''
|
32767
|
+
return self
|
32768
|
+
end
|
32769
|
+
index = path.index('/')
|
32770
|
+
if index.nil?
|
32771
|
+
return disk_service(path)
|
32772
|
+
end
|
32773
|
+
return disk_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
|
32774
|
+
end
|
32775
|
+
|
32776
|
+
end
|
32777
|
+
|
32778
|
+
class VmCheckpointsService < Service
|
32779
|
+
|
32780
|
+
LIST = [
|
32781
|
+
[:follow, String].freeze,
|
32782
|
+
[:max, Integer].freeze,
|
32783
|
+
].freeze
|
32784
|
+
|
32785
|
+
private_constant :LIST
|
32786
|
+
|
32787
|
+
#
|
32788
|
+
# The list of virtual machine checkpoints.
|
32789
|
+
#
|
32790
|
+
# To get a list of checkpoints for a virtual machine with an id '123', send a request as follows:
|
32791
|
+
#
|
32792
|
+
# [source]
|
32793
|
+
# ----
|
32794
|
+
# GET /ovirt-engine/api/vms/123/checkpoints
|
32795
|
+
# ----
|
32796
|
+
#
|
32797
|
+
# @param opts [Hash] Additional options.
|
32798
|
+
#
|
32799
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
32800
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
32801
|
+
#
|
32802
|
+
# @option opts [Integer] :max Sets the maximum number of virtual machine checkpoints to return.
|
32803
|
+
# If not specified, all the virtual machine checkpoints are returned.
|
32804
|
+
#
|
32805
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32806
|
+
#
|
32807
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
32808
|
+
#
|
32809
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
32810
|
+
# given then the timeout set globally for the connection will be used.
|
32811
|
+
#
|
32812
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
32813
|
+
#
|
32814
|
+
# @return [Array<Checkpoint>]
|
32815
|
+
#
|
32816
|
+
def list(opts = {})
|
32817
|
+
internal_get(LIST, opts)
|
32818
|
+
end
|
32819
|
+
|
32820
|
+
#
|
32821
|
+
# Returns a reference to the service that manages a specific VM checkpoint.
|
32822
|
+
#
|
32823
|
+
# @param id [String] The identifier of the `checkpoint`.
|
32824
|
+
#
|
32825
|
+
# @return [VmCheckpointService] A reference to the `checkpoint` service.
|
32826
|
+
#
|
32827
|
+
def checkpoint_service(id)
|
32828
|
+
VmCheckpointService.new(self, id)
|
32829
|
+
end
|
32830
|
+
|
32831
|
+
#
|
32832
|
+
# Locates the service corresponding to the given path.
|
32833
|
+
#
|
32834
|
+
# @param path [String] The path of the service.
|
32835
|
+
#
|
32836
|
+
# @return [Service] A reference to the service.
|
32837
|
+
#
|
32838
|
+
def service(path)
|
32839
|
+
if path.nil? || path == ''
|
32840
|
+
return self
|
32841
|
+
end
|
32842
|
+
index = path.index('/')
|
32843
|
+
if index.nil?
|
32844
|
+
return checkpoint_service(path)
|
32845
|
+
end
|
32846
|
+
return checkpoint_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
|
32847
|
+
end
|
32848
|
+
|
32849
|
+
end
|
32850
|
+
|
32851
|
+
class VmDiskService < MeasurableService
|
32852
|
+
|
32853
|
+
ACTIVATE = [
|
32854
|
+
[:async, TrueClass].freeze,
|
32855
|
+
].freeze
|
32856
|
+
|
32857
|
+
private_constant :ACTIVATE
|
32858
|
+
|
32859
|
+
#
|
32860
|
+
# Executes the `activate` method.
|
32861
|
+
#
|
32862
|
+
# @param opts [Hash] Additional options.
|
32863
|
+
#
|
32864
|
+
# @option opts [Boolean] :async Indicates if the activation should be performed asynchronously.
|
32865
|
+
#
|
32866
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32867
|
+
#
|
32868
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
32869
|
+
#
|
32870
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
32871
|
+
# given then the timeout set globally for the connection will be used.
|
32872
|
+
#
|
32873
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
32874
|
+
#
|
32875
|
+
def activate(opts = {})
|
32876
|
+
internal_action(:activate, nil, ACTIVATE, opts)
|
32877
|
+
end
|
32878
|
+
|
32879
|
+
DEACTIVATE = [
|
32880
|
+
[:async, TrueClass].freeze,
|
32881
|
+
].freeze
|
32882
|
+
|
32883
|
+
private_constant :DEACTIVATE
|
32884
|
+
|
32885
|
+
#
|
32886
|
+
# Executes the `deactivate` method.
|
32887
|
+
#
|
32888
|
+
# @param opts [Hash] Additional options.
|
32889
|
+
#
|
32890
|
+
# @option opts [Boolean] :async Indicates if the deactivation should be performed asynchronously.
|
32891
|
+
#
|
32892
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32893
|
+
#
|
32894
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
32895
|
+
#
|
32896
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
32897
|
+
# given then the timeout set globally for the connection will be used.
|
32898
|
+
#
|
32899
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
32900
|
+
#
|
32901
|
+
def deactivate(opts = {})
|
32902
|
+
internal_action(:deactivate, nil, DEACTIVATE, opts)
|
32903
|
+
end
|
32904
|
+
|
32905
|
+
EXPORT = [
|
32906
|
+
[:async, TrueClass].freeze,
|
32907
|
+
[:filter, TrueClass].freeze,
|
32908
|
+
].freeze
|
32909
|
+
|
32910
|
+
private_constant :EXPORT
|
32911
|
+
|
32912
|
+
#
|
32913
|
+
# Executes the `export` method.
|
32914
|
+
#
|
32915
|
+
# @param opts [Hash] Additional options.
|
32916
|
+
#
|
32917
|
+
# @option opts [Boolean] :async Indicates if the export should be performed asynchronously.
|
32918
|
+
#
|
32919
|
+
# @option opts [Boolean] :filter Indicates if the results should be filtered according to the permissions of the user.
|
32920
|
+
#
|
32921
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
32922
|
+
#
|
32923
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
32924
|
+
#
|
32925
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
32926
|
+
# given then the timeout set globally for the connection will be used.
|
32927
|
+
#
|
32928
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
32929
|
+
#
|
32930
|
+
def export(opts = {})
|
32931
|
+
internal_action(:export, nil, EXPORT, opts)
|
32932
|
+
end
|
32933
|
+
|
32934
|
+
GET = [
|
32935
|
+
[:follow, String].freeze,
|
32936
|
+
].freeze
|
32937
|
+
|
32938
|
+
private_constant :GET
|
32939
|
+
|
32940
|
+
#
|
32941
|
+
# Returns the representation of the object managed by this service.
|
31577
32942
|
#
|
31578
32943
|
# @param opts [Hash] Additional options.
|
31579
32944
|
#
|
@@ -31664,8 +33029,7 @@ module OvirtSDK4
|
|
31664
33029
|
# Detach the disk from the virtual machine.
|
31665
33030
|
#
|
31666
33031
|
# NOTE: In version 3 of the API this used to also remove the disk completely from the system, but starting with
|
31667
|
-
# version 4 it doesn't. If you need to remove it completely use the
|
31668
|
-
# method of the top level disk service>>.
|
33032
|
+
# version 4 it doesn't. If you need to remove it completely use the xref:services-disk-methods-remove[remove method of the top level disk service].
|
31669
33033
|
#
|
31670
33034
|
# @param opts [Hash] Additional options.
|
31671
33035
|
#
|
@@ -32373,7 +33737,7 @@ module OvirtSDK4
|
|
32373
33737
|
# POST /ovirt-engine/api/vms/123/hostdevices
|
32374
33738
|
# ----
|
32375
33739
|
#
|
32376
|
-
# With request body of type
|
33740
|
+
# With request body of type xref:types-host_device[HostDevice], for example
|
32377
33741
|
#
|
32378
33742
|
# [source,xml]
|
32379
33743
|
# ----
|
@@ -32385,7 +33749,7 @@ module OvirtSDK4
|
|
32385
33749
|
#
|
32386
33750
|
# NOTE: Attachment of a PCI device that is part of a bigger IOMMU group will result in attachment of the remaining
|
32387
33751
|
# devices from that IOMMU group as "placeholders". These devices are then identified using the `placeholder`
|
32388
|
-
# attribute of the
|
33752
|
+
# attribute of the xref:types-host_device[HostDevice] type set to `true`.
|
32389
33753
|
#
|
32390
33754
|
# In case you want attach a device that already serves as an IOMMU placeholder, simply issue an explicit Add operation
|
32391
33755
|
# for it, and its `placeholder` flag will be cleared, and the device will be accessible to the virtual machine.
|
@@ -32474,6 +33838,238 @@ module OvirtSDK4
|
|
32474
33838
|
|
32475
33839
|
end
|
32476
33840
|
|
33841
|
+
class VmMediatedDeviceService < Service
|
33842
|
+
|
33843
|
+
GET = [
|
33844
|
+
[:follow, String].freeze,
|
33845
|
+
].freeze
|
33846
|
+
|
33847
|
+
private_constant :GET
|
33848
|
+
|
33849
|
+
#
|
33850
|
+
# Retrieves the configuration of mediated devices in the virtual machine.
|
33851
|
+
#
|
33852
|
+
# @param opts [Hash] Additional options.
|
33853
|
+
#
|
33854
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
33855
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
33856
|
+
#
|
33857
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
33858
|
+
#
|
33859
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
33860
|
+
#
|
33861
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
33862
|
+
# given then the timeout set globally for the connection will be used.
|
33863
|
+
#
|
33864
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
33865
|
+
#
|
33866
|
+
# @return [VmMediatedDevice]
|
33867
|
+
#
|
33868
|
+
def get(opts = {})
|
33869
|
+
internal_get(GET, opts)
|
33870
|
+
end
|
33871
|
+
|
33872
|
+
REMOVE = [
|
33873
|
+
[:async, TrueClass].freeze,
|
33874
|
+
].freeze
|
33875
|
+
|
33876
|
+
private_constant :REMOVE
|
33877
|
+
|
33878
|
+
#
|
33879
|
+
# Remove the mediated device from the virtual machine.
|
33880
|
+
#
|
33881
|
+
# @param opts [Hash] Additional options.
|
33882
|
+
#
|
33883
|
+
# @option opts [Boolean] :async Indicates if the remove should be performed asynchronously.
|
33884
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
33885
|
+
#
|
33886
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
33887
|
+
#
|
33888
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
33889
|
+
# given then the timeout set globally for the connection will be used.
|
33890
|
+
#
|
33891
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
33892
|
+
#
|
33893
|
+
def remove(opts = {})
|
33894
|
+
internal_remove(REMOVE, opts)
|
33895
|
+
end
|
33896
|
+
|
33897
|
+
UPDATE = [
|
33898
|
+
[:async, TrueClass].freeze,
|
33899
|
+
].freeze
|
33900
|
+
|
33901
|
+
private_constant :UPDATE
|
33902
|
+
|
33903
|
+
#
|
33904
|
+
# Updates the information about the mediated device.
|
33905
|
+
#
|
33906
|
+
# You can update the information using `specParams` element.
|
33907
|
+
#
|
33908
|
+
# For example, to update a mediated device, send a request like this:
|
33909
|
+
#
|
33910
|
+
# [source]
|
33911
|
+
# ----
|
33912
|
+
# PUT /ovirt-engine/api/vms/123/mediateddevices/00000000-0000-0000-0000-000000000000
|
33913
|
+
# <vm_mediated_device>
|
33914
|
+
# <spec_params>
|
33915
|
+
# <property>
|
33916
|
+
# <name>mdevType</name>
|
33917
|
+
# <value>nvidia-11</value>
|
33918
|
+
# </property>
|
33919
|
+
# </spec_params>
|
33920
|
+
# </vm_mediated_device>
|
33921
|
+
# ----
|
33922
|
+
#
|
33923
|
+
# with response body:
|
33924
|
+
#
|
33925
|
+
# [source,xml]
|
33926
|
+
# ----
|
33927
|
+
# <vm_mediated_device href="/ovirt-engine/api/vms/123/mediateddevices/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
|
33928
|
+
# <vm href="/ovirt-engine/api/vms/123" id="123"/>
|
33929
|
+
# <spec_params>
|
33930
|
+
# <property>
|
33931
|
+
# <name>mdevType</name>
|
33932
|
+
# <value>nvidia-11</value>
|
33933
|
+
# </property>
|
33934
|
+
# </spec_params>
|
33935
|
+
# </vm_mediated_device>
|
33936
|
+
# ----
|
33937
|
+
#
|
33938
|
+
# @param device [VmMediatedDevice] The information about the mediated device.
|
33939
|
+
#
|
33940
|
+
# The request data must contain `specParams` properties.
|
33941
|
+
# The response data contains complete information about the
|
33942
|
+
# updated mediated device.
|
33943
|
+
# @param opts [Hash] Additional options.
|
33944
|
+
#
|
33945
|
+
# @option opts [Boolean] :async Indicates if the update should be performed asynchronously.
|
33946
|
+
#
|
33947
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
33948
|
+
#
|
33949
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
33950
|
+
#
|
33951
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
33952
|
+
# given then the timeout set globally for the connection will be used.
|
33953
|
+
#
|
33954
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
33955
|
+
#
|
33956
|
+
# @return [VmMediatedDevice]
|
33957
|
+
#
|
33958
|
+
def update(device, opts = {})
|
33959
|
+
internal_update(device, VmMediatedDevice, UPDATE, opts)
|
33960
|
+
end
|
33961
|
+
|
33962
|
+
#
|
33963
|
+
# Locates the service corresponding to the given path.
|
33964
|
+
#
|
33965
|
+
# @param path [String] The path of the service.
|
33966
|
+
#
|
33967
|
+
# @return [Service] A reference to the service.
|
33968
|
+
#
|
33969
|
+
def service(path)
|
33970
|
+
if path.nil? || path == ''
|
33971
|
+
return self
|
33972
|
+
end
|
33973
|
+
raise Error.new("The path \"#{path}\" doesn't correspond to any service")
|
33974
|
+
end
|
33975
|
+
|
33976
|
+
end
|
33977
|
+
|
33978
|
+
class VmMediatedDevicesService < Service
|
33979
|
+
|
33980
|
+
ADD = [
|
33981
|
+
].freeze
|
33982
|
+
|
33983
|
+
private_constant :ADD
|
33984
|
+
|
33985
|
+
#
|
33986
|
+
# Add a new mediated device to the virtual machine.
|
33987
|
+
#
|
33988
|
+
# @param device [VmMediatedDevice] The `device` to add.
|
33989
|
+
#
|
33990
|
+
# @param opts [Hash] Additional options.
|
33991
|
+
#
|
33992
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
33993
|
+
#
|
33994
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
33995
|
+
#
|
33996
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
33997
|
+
# given then the timeout set globally for the connection will be used.
|
33998
|
+
#
|
33999
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
34000
|
+
#
|
34001
|
+
# @return [VmMediatedDevice]
|
34002
|
+
#
|
34003
|
+
def add(device, opts = {})
|
34004
|
+
internal_add(device, VmMediatedDevice, ADD, opts)
|
34005
|
+
end
|
34006
|
+
|
34007
|
+
LIST = [
|
34008
|
+
[:follow, String].freeze,
|
34009
|
+
[:max, Integer].freeze,
|
34010
|
+
].freeze
|
34011
|
+
|
34012
|
+
private_constant :LIST
|
34013
|
+
|
34014
|
+
#
|
34015
|
+
# Lists all the configured mediated devices of the virtual machine.
|
34016
|
+
#
|
34017
|
+
# The order of the returned list of mediated devices is not guaranteed.
|
34018
|
+
#
|
34019
|
+
# @param opts [Hash] Additional options.
|
34020
|
+
#
|
34021
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
34022
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
34023
|
+
#
|
34024
|
+
# @option opts [Integer] :max Sets the maximum number of mediated devices to return.
|
34025
|
+
# If not specified all the mediated devices are returned.
|
34026
|
+
#
|
34027
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
34028
|
+
#
|
34029
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
34030
|
+
#
|
34031
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
34032
|
+
# given then the timeout set globally for the connection will be used.
|
34033
|
+
#
|
34034
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
34035
|
+
#
|
34036
|
+
# @return [Array<VmMediatedDevice>]
|
34037
|
+
#
|
34038
|
+
def list(opts = {})
|
34039
|
+
internal_get(LIST, opts)
|
34040
|
+
end
|
34041
|
+
|
34042
|
+
#
|
34043
|
+
# Returns a reference to the service that manages a mediated device of a virtual machine.
|
34044
|
+
#
|
34045
|
+
# @param id [String] The identifier of the `device`.
|
34046
|
+
#
|
34047
|
+
# @return [VmMediatedDeviceService] A reference to the `device` service.
|
34048
|
+
#
|
34049
|
+
def device_service(id)
|
34050
|
+
VmMediatedDeviceService.new(self, id)
|
34051
|
+
end
|
34052
|
+
|
34053
|
+
#
|
34054
|
+
# Locates the service corresponding to the given path.
|
34055
|
+
#
|
34056
|
+
# @param path [String] The path of the service.
|
34057
|
+
#
|
34058
|
+
# @return [Service] A reference to the service.
|
34059
|
+
#
|
34060
|
+
def service(path)
|
34061
|
+
if path.nil? || path == ''
|
34062
|
+
return self
|
34063
|
+
end
|
34064
|
+
index = path.index('/')
|
34065
|
+
if index.nil?
|
34066
|
+
return device_service(path)
|
34067
|
+
end
|
34068
|
+
return device_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
|
34069
|
+
end
|
34070
|
+
|
34071
|
+
end
|
34072
|
+
|
32477
34073
|
class VmNicService < MeasurableService
|
32478
34074
|
|
32479
34075
|
ACTIVATE = [
|
@@ -32662,7 +34258,7 @@ module OvirtSDK4
|
|
32662
34258
|
#
|
32663
34259
|
# Reference to the service that manages the network filter parameters of the NIC.
|
32664
34260
|
#
|
32665
|
-
# A single top-level network filter may assigned to the NIC by the NIC's
|
34261
|
+
# A single top-level network filter may assigned to the NIC by the NIC's xref:types-vnic_profile[vNIC Profile].
|
32666
34262
|
#
|
32667
34263
|
# @return [NicNetworkFilterParametersService] A reference to `network_filter_parameters` service.
|
32668
34264
|
#
|
@@ -33027,6 +34623,7 @@ module OvirtSDK4
|
|
33027
34623
|
# </cpu>
|
33028
34624
|
# <index>0</index>
|
33029
34625
|
# <memory>1024</memory>
|
34626
|
+
# <numa_tune_mode>strict</numa_tune_mode>
|
33030
34627
|
# </vm_numa_node>
|
33031
34628
|
# ----
|
33032
34629
|
#
|
@@ -33245,6 +34842,7 @@ module OvirtSDK4
|
|
33245
34842
|
|
33246
34843
|
UPDATE = [
|
33247
34844
|
[:async, TrueClass].freeze,
|
34845
|
+
[:seal, TrueClass].freeze,
|
33248
34846
|
].freeze
|
33249
34847
|
|
33250
34848
|
private_constant :UPDATE
|
@@ -33277,6 +34875,33 @@ module OvirtSDK4
|
|
33277
34875
|
#
|
33278
34876
|
# @option opts [Boolean] :async Indicates if the update should be performed asynchronously.
|
33279
34877
|
#
|
34878
|
+
# @option opts [Boolean] :seal Specifies if virtual machines created for the pool should be sealed after creation.
|
34879
|
+
#
|
34880
|
+
# If this optional parameter is provided, and its value is `true`, virtual machines created for the pool
|
34881
|
+
# will be sealed after creation. If the value is 'false', the virtual machines will not be sealed.
|
34882
|
+
# If the parameter is not provided, the virtual machines will be sealed, only if they are created from
|
34883
|
+
# a sealed template and their guest OS is not set to Windows. This parameter affects only the virtual machines
|
34884
|
+
# created when the pool is updated.
|
34885
|
+
#
|
34886
|
+
# For example, to update a virtual machine pool and to seal the additional virtual machines that are created,
|
34887
|
+
# send a request like this:
|
34888
|
+
#
|
34889
|
+
# [source]
|
34890
|
+
# ----
|
34891
|
+
# PUT /ovirt-engine/api/vmpools/123?seal=true
|
34892
|
+
# ----
|
34893
|
+
#
|
34894
|
+
# With the following body:
|
34895
|
+
#
|
34896
|
+
# [source,xml]
|
34897
|
+
# ----
|
34898
|
+
# <vmpool>
|
34899
|
+
# <name>VM_Pool_B</name>
|
34900
|
+
# <description>Virtual Machine Pool B</description>
|
34901
|
+
# <size>7</size>
|
34902
|
+
# </vmpool>
|
34903
|
+
# ----
|
34904
|
+
#
|
33280
34905
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
33281
34906
|
#
|
33282
34907
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -33326,6 +34951,7 @@ module OvirtSDK4
|
|
33326
34951
|
class VmPoolsService < Service
|
33327
34952
|
|
33328
34953
|
ADD = [
|
34954
|
+
[:seal, TrueClass].freeze,
|
33329
34955
|
].freeze
|
33330
34956
|
|
33331
34957
|
private_constant :ADD
|
@@ -33356,6 +34982,34 @@ module OvirtSDK4
|
|
33356
34982
|
#
|
33357
34983
|
# @param opts [Hash] Additional options.
|
33358
34984
|
#
|
34985
|
+
# @option opts [Boolean] :seal Specifies if virtual machines created for the pool should be sealed after creation.
|
34986
|
+
#
|
34987
|
+
# If this optional parameter is provided, and its value is `true`, virtual machines created for the pool
|
34988
|
+
# will be sealed after creation. If the value is 'false', the virtual machines will not be sealed.
|
34989
|
+
# If the parameter is not provided, the virtual machines will be sealed, only if they are created from
|
34990
|
+
# a sealed template and their guest OS is not set to Windows. This parameter affects only the virtual machines
|
34991
|
+
# created when the pool is created.
|
34992
|
+
#
|
34993
|
+
# For example, to create a virtual machine pool with 5 virtual machines and to seal them, send a request
|
34994
|
+
# like this:
|
34995
|
+
#
|
34996
|
+
# [source]
|
34997
|
+
# ----
|
34998
|
+
# POST /ovirt-engine/api/vmpools?seal=true
|
34999
|
+
# ----
|
35000
|
+
#
|
35001
|
+
# With the following body:
|
35002
|
+
#
|
35003
|
+
# [source,xml]
|
35004
|
+
# ----
|
35005
|
+
# <vmpool>
|
35006
|
+
# <name>mypool</name>
|
35007
|
+
# <cluster id="123"/>
|
35008
|
+
# <template id="456"/>
|
35009
|
+
# <size>5</size>
|
35010
|
+
# </vmpool>
|
35011
|
+
# ----
|
35012
|
+
#
|
33359
35013
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
33360
35014
|
#
|
33361
35015
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -33978,6 +35632,7 @@ module OvirtSDK4
|
|
33978
35632
|
[:clone, TrueClass].freeze,
|
33979
35633
|
[:clone_permissions, TrueClass].freeze,
|
33980
35634
|
[:filter, TrueClass].freeze,
|
35635
|
+
[:seal, TrueClass].freeze,
|
33981
35636
|
].freeze
|
33982
35637
|
|
33983
35638
|
private_constant :ADD
|
@@ -34118,7 +35773,7 @@ module OvirtSDK4
|
|
34118
35773
|
# ----
|
34119
35774
|
#
|
34120
35775
|
# In order to boot from CDROM, you first need to insert a disk, as described in the
|
34121
|
-
#
|
35776
|
+
# xref:services-vm_cdrom[CDROM service]. Then booting from that CDROM can be specified using the `os.boot.devices`
|
34122
35777
|
# attribute:
|
34123
35778
|
#
|
34124
35779
|
# [source,xml]
|
@@ -34144,7 +35799,7 @@ module OvirtSDK4
|
|
34144
35799
|
# @option opts [Boolean] :clone Specifies if the virtual machine should be independent of the template.
|
34145
35800
|
#
|
34146
35801
|
# When a virtual machine is created from a template by default the disks of the virtual machine depend on
|
34147
|
-
# the disks of the template, they are using the https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
35802
|
+
# the disks of the template, they are using the link:https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
34148
35803
|
# mechanism so that only the differences from the template take up real storage space. If this parameter is
|
34149
35804
|
# specified and the value is `true` then the disks of the created virtual machine will be _cloned_, and
|
34150
35805
|
# independent of the template. For example, to create an independent virtual machine, send a request like this:
|
@@ -34207,6 +35862,36 @@ module OvirtSDK4
|
|
34207
35862
|
# Machine will fail unless the Virtual Machine has been previously created by the admin as
|
34208
35863
|
# a user (meaning with filter=true).
|
34209
35864
|
#
|
35865
|
+
# @option opts [Boolean] :seal Specifies if the virtual machine should be sealed after creation.
|
35866
|
+
#
|
35867
|
+
# If this optional parameter is provided, and its value is `true`, the virtual machine will be sealed after
|
35868
|
+
# creation. If the value is 'false', the virtual machine will not be sealed. If the parameter is not provided,
|
35869
|
+
# the virtual machine will be sealed, only if it is created from a sealed template and its guest OS is not set
|
35870
|
+
# to Windows.
|
35871
|
+
#
|
35872
|
+
# For example, to create a virtual machine from the `mytemplate` template and to seal it, send a request
|
35873
|
+
# like this:
|
35874
|
+
#
|
35875
|
+
# [source]
|
35876
|
+
# ----
|
35877
|
+
# POST /ovirt-engine/api/vms?seal=true
|
35878
|
+
# ----
|
35879
|
+
#
|
35880
|
+
# With a request body like this:
|
35881
|
+
#
|
35882
|
+
# [source,xml]
|
35883
|
+
# ----
|
35884
|
+
# <vm>
|
35885
|
+
# <name>myvm<name>
|
35886
|
+
# <template>
|
35887
|
+
# <name>mytemplate<name>
|
35888
|
+
# </template>
|
35889
|
+
# <cluster>
|
35890
|
+
# <name>mycluster<name>
|
35891
|
+
# </cluster>
|
35892
|
+
# </vm>
|
35893
|
+
# ----
|
35894
|
+
#
|
34210
35895
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
34211
35896
|
#
|
34212
35897
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -34226,6 +35911,7 @@ module OvirtSDK4
|
|
34226
35911
|
[:clone, TrueClass].freeze,
|
34227
35912
|
[:clone_permissions, TrueClass].freeze,
|
34228
35913
|
[:filter, TrueClass].freeze,
|
35914
|
+
[:seal, TrueClass].freeze,
|
34229
35915
|
].freeze
|
34230
35916
|
|
34231
35917
|
private_constant :ADD_FROM_CONFIGURATION
|
@@ -34240,7 +35926,7 @@ module OvirtSDK4
|
|
34240
35926
|
# @option opts [Boolean] :clone Specifies if the virtual machine should be independent of the template.
|
34241
35927
|
#
|
34242
35928
|
# When a virtual machine is created from a template by default the disks of the virtual machine depend on
|
34243
|
-
# the disks of the template, they are using the https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
35929
|
+
# the disks of the template, they are using the link:https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
34244
35930
|
# mechanism so that only the differences from the template take up real storage space. If this parameter is
|
34245
35931
|
# specified and the value is `true` then the disks of the created virtual machine will be _cloned_, and
|
34246
35932
|
# independent of the template. For example, to create an independent virtual machine, send a request like this:
|
@@ -34303,6 +35989,36 @@ module OvirtSDK4
|
|
34303
35989
|
# Machine will fail unless the Virtual Machine has been previously created by the admin as
|
34304
35990
|
# a user (meaning with filter=true).
|
34305
35991
|
#
|
35992
|
+
# @option opts [Boolean] :seal Specifies if the virtual machine should be sealed after creation.
|
35993
|
+
#
|
35994
|
+
# If this optional parameter is provided, and its value is `true`, the virtual machine will be sealed after
|
35995
|
+
# creation. If the value is 'false', the virtual machine will not be sealed. If the parameter is not provided,
|
35996
|
+
# the virtual machine will be sealed, only if it is created from a sealed template and its guest OS is not set
|
35997
|
+
# to Windows.
|
35998
|
+
#
|
35999
|
+
# For example, to create a virtual machine from the `mytemplate` template and to seal it, send a request
|
36000
|
+
# like this:
|
36001
|
+
#
|
36002
|
+
# [source]
|
36003
|
+
# ----
|
36004
|
+
# POST /ovirt-engine/api/vms?seal=true
|
36005
|
+
# ----
|
36006
|
+
#
|
36007
|
+
# With a request body like this:
|
36008
|
+
#
|
36009
|
+
# [source,xml]
|
36010
|
+
# ----
|
36011
|
+
# <vm>
|
36012
|
+
# <name>myvm<name>
|
36013
|
+
# <template>
|
36014
|
+
# <name>mytemplate<name>
|
36015
|
+
# </template>
|
36016
|
+
# <cluster>
|
36017
|
+
# <name>mycluster<name>
|
36018
|
+
# </cluster>
|
36019
|
+
# </vm>
|
36020
|
+
# ----
|
36021
|
+
#
|
34306
36022
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
34307
36023
|
#
|
34308
36024
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -34322,6 +36038,7 @@ module OvirtSDK4
|
|
34322
36038
|
[:clone, TrueClass].freeze,
|
34323
36039
|
[:clone_permissions, TrueClass].freeze,
|
34324
36040
|
[:filter, TrueClass].freeze,
|
36041
|
+
[:seal, TrueClass].freeze,
|
34325
36042
|
].freeze
|
34326
36043
|
|
34327
36044
|
private_constant :ADD_FROM_SCRATCH
|
@@ -34336,7 +36053,7 @@ module OvirtSDK4
|
|
34336
36053
|
# @option opts [Boolean] :clone Specifies if the virtual machine should be independent of the template.
|
34337
36054
|
#
|
34338
36055
|
# When a virtual machine is created from a template by default the disks of the virtual machine depend on
|
34339
|
-
# the disks of the template, they are using the https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
36056
|
+
# the disks of the template, they are using the link:https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
34340
36057
|
# mechanism so that only the differences from the template take up real storage space. If this parameter is
|
34341
36058
|
# specified and the value is `true` then the disks of the created virtual machine will be _cloned_, and
|
34342
36059
|
# independent of the template. For example, to create an independent virtual machine, send a request like this:
|
@@ -34399,6 +36116,36 @@ module OvirtSDK4
|
|
34399
36116
|
# Machine will fail unless the Virtual Machine has been previously created by the admin as
|
34400
36117
|
# a user (meaning with filter=true).
|
34401
36118
|
#
|
36119
|
+
# @option opts [Boolean] :seal Specifies if the virtual machine should be sealed after creation.
|
36120
|
+
#
|
36121
|
+
# If this optional parameter is provided, and its value is `true`, the virtual machine will be sealed after
|
36122
|
+
# creation. If the value is 'false', the virtual machine will not be sealed. If the parameter is not provided,
|
36123
|
+
# the virtual machine will be sealed, only if it is created from a sealed template and its guest OS is not set
|
36124
|
+
# to Windows.
|
36125
|
+
#
|
36126
|
+
# For example, to create a virtual machine from the `mytemplate` template and to seal it, send a request
|
36127
|
+
# like this:
|
36128
|
+
#
|
36129
|
+
# [source]
|
36130
|
+
# ----
|
36131
|
+
# POST /ovirt-engine/api/vms?seal=true
|
36132
|
+
# ----
|
36133
|
+
#
|
36134
|
+
# With a request body like this:
|
36135
|
+
#
|
36136
|
+
# [source,xml]
|
36137
|
+
# ----
|
36138
|
+
# <vm>
|
36139
|
+
# <name>myvm<name>
|
36140
|
+
# <template>
|
36141
|
+
# <name>mytemplate<name>
|
36142
|
+
# </template>
|
36143
|
+
# <cluster>
|
36144
|
+
# <name>mycluster<name>
|
36145
|
+
# </cluster>
|
36146
|
+
# </vm>
|
36147
|
+
# ----
|
36148
|
+
#
|
34402
36149
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
34403
36150
|
#
|
34404
36151
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -34418,6 +36165,7 @@ module OvirtSDK4
|
|
34418
36165
|
[:clone, TrueClass].freeze,
|
34419
36166
|
[:clone_permissions, TrueClass].freeze,
|
34420
36167
|
[:filter, TrueClass].freeze,
|
36168
|
+
[:seal, TrueClass].freeze,
|
34421
36169
|
].freeze
|
34422
36170
|
|
34423
36171
|
private_constant :ADD_FROM_SNAPSHOT
|
@@ -34432,7 +36180,7 @@ module OvirtSDK4
|
|
34432
36180
|
# @option opts [Boolean] :clone Specifies if the virtual machine should be independent of the template.
|
34433
36181
|
#
|
34434
36182
|
# When a virtual machine is created from a template by default the disks of the virtual machine depend on
|
34435
|
-
# the disks of the template, they are using the https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
36183
|
+
# the disks of the template, they are using the link:https://en.wikipedia.org/wiki/Copy-on-write[_copy on write_]
|
34436
36184
|
# mechanism so that only the differences from the template take up real storage space. If this parameter is
|
34437
36185
|
# specified and the value is `true` then the disks of the created virtual machine will be _cloned_, and
|
34438
36186
|
# independent of the template. For example, to create an independent virtual machine, send a request like this:
|
@@ -34495,6 +36243,36 @@ module OvirtSDK4
|
|
34495
36243
|
# Machine will fail unless the Virtual Machine has been previously created by the admin as
|
34496
36244
|
# a user (meaning with filter=true).
|
34497
36245
|
#
|
36246
|
+
# @option opts [Boolean] :seal Specifies if the virtual machine should be sealed after creation.
|
36247
|
+
#
|
36248
|
+
# If this optional parameter is provided, and its value is `true`, the virtual machine will be sealed after
|
36249
|
+
# creation. If the value is 'false', the virtual machine will not be sealed. If the parameter is not provided,
|
36250
|
+
# the virtual machine will be sealed, only if it is created from a sealed template and its guest OS is not set
|
36251
|
+
# to Windows.
|
36252
|
+
#
|
36253
|
+
# For example, to create a virtual machine from the `mytemplate` template and to seal it, send a request
|
36254
|
+
# like this:
|
36255
|
+
#
|
36256
|
+
# [source]
|
36257
|
+
# ----
|
36258
|
+
# POST /ovirt-engine/api/vms?seal=true
|
36259
|
+
# ----
|
36260
|
+
#
|
36261
|
+
# With a request body like this:
|
36262
|
+
#
|
36263
|
+
# [source,xml]
|
36264
|
+
# ----
|
36265
|
+
# <vm>
|
36266
|
+
# <name>myvm<name>
|
36267
|
+
# <template>
|
36268
|
+
# <name>mytemplate<name>
|
36269
|
+
# </template>
|
36270
|
+
# <cluster>
|
36271
|
+
# <name>mycluster<name>
|
36272
|
+
# </cluster>
|
36273
|
+
# </vm>
|
36274
|
+
# ----
|
36275
|
+
#
|
34498
36276
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
34499
36277
|
#
|
34500
36278
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -34516,6 +36294,7 @@ module OvirtSDK4
|
|
34516
36294
|
[:filter, TrueClass].freeze,
|
34517
36295
|
[:follow, String].freeze,
|
34518
36296
|
[:max, Integer].freeze,
|
36297
|
+
[:ovf_as_ova, TrueClass].freeze,
|
34519
36298
|
[:search, String].freeze,
|
34520
36299
|
].freeze
|
34521
36300
|
|
@@ -34559,6 +36338,16 @@ module OvirtSDK4
|
|
34559
36338
|
#
|
34560
36339
|
# @option opts [Integer] :max The maximum number of results to return.
|
34561
36340
|
#
|
36341
|
+
# @option opts [Boolean] :ovf_as_ova Indicates if the results should expose the OVF as it appears in OVA files of that VM. The OVF document
|
36342
|
+
# describing the virtual machine. This parameter will work only when all_content=True is set.
|
36343
|
+
# The OVF will be presented in `initialization.configuration.data`.
|
36344
|
+
#
|
36345
|
+
# For example:
|
36346
|
+
# [source]
|
36347
|
+
# ----
|
36348
|
+
# GET /vms?all_content=true&ovf_as_ova=true
|
36349
|
+
# ----
|
36350
|
+
#
|
34562
36351
|
# @option opts [String] :search A query string used to restrict the returned virtual machines.
|
34563
36352
|
#
|
34564
36353
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
@@ -34755,7 +36544,7 @@ module OvirtSDK4
|
|
34755
36544
|
#
|
34756
36545
|
# Please note that there is a default network filter to each VNIC profile.
|
34757
36546
|
# For more details of how the default network filter is calculated please refer to
|
34758
|
-
# the documentation in
|
36547
|
+
# the documentation in xref:services-network_filters[NetworkFilters].
|
34759
36548
|
#
|
34760
36549
|
# NOTE: The automatically created vNIC profile for the external network will be without network filter.
|
34761
36550
|
#
|
@@ -35067,7 +36856,7 @@ module OvirtSDK4
|
|
35067
36856
|
# Copies a disk to the specified storage domain.
|
35068
36857
|
#
|
35069
36858
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
35070
|
-
# compatibility. It will be removed in the future. To copy a disk use the
|
36859
|
+
# compatibility. It will be removed in the future. To copy a disk use the xref:services-disk-methods-copy[copy]
|
35071
36860
|
# operation of the service that manages that disk.
|
35072
36861
|
#
|
35073
36862
|
# @param opts [Hash] Additional options.
|
@@ -35099,7 +36888,7 @@ module OvirtSDK4
|
|
35099
36888
|
# Exports a disk to an export storage domain.
|
35100
36889
|
#
|
35101
36890
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
35102
|
-
# compatibility. It will be removed in the future. To export a disk use the
|
36891
|
+
# compatibility. It will be removed in the future. To export a disk use the xref:services-disk-methods-export[export]
|
35103
36892
|
# operation of the service that manages that disk.
|
35104
36893
|
#
|
35105
36894
|
# @param opts [Hash] Additional options.
|
@@ -35160,7 +36949,7 @@ module OvirtSDK4
|
|
35160
36949
|
# Moves a disk to another storage domain.
|
35161
36950
|
#
|
35162
36951
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
35163
|
-
# compatibility. It will be removed in the future. To move a disk use the
|
36952
|
+
# compatibility. It will be removed in the future. To move a disk use the xref:services-disk-methods-move[move]
|
35164
36953
|
# operation of the service that manages that disk.
|
35165
36954
|
#
|
35166
36955
|
# @param opts [Hash] Additional options.
|
@@ -35216,7 +37005,7 @@ module OvirtSDK4
|
|
35216
37005
|
# Removes a disk.
|
35217
37006
|
#
|
35218
37007
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
35219
|
-
# compatibility. It will be removed in the future. To remove a disk use the
|
37008
|
+
# compatibility. It will be removed in the future. To remove a disk use the xref:services-disk-methods-remove[remove]
|
35220
37009
|
# operation of the service that manages that disk.
|
35221
37010
|
#
|
35222
37011
|
# @param opts [Hash] Additional options.
|
@@ -35243,7 +37032,7 @@ module OvirtSDK4
|
|
35243
37032
|
# Sparsify the disk.
|
35244
37033
|
#
|
35245
37034
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
35246
|
-
# compatibility. It will be removed in the future. To remove a disk use the
|
37035
|
+
# compatibility. It will be removed in the future. To remove a disk use the xref:services-disk-methods-remove[remove]
|
35247
37036
|
# operation of the service that manages that disk.
|
35248
37037
|
#
|
35249
37038
|
# @param opts [Hash] Additional options.
|
@@ -35271,7 +37060,7 @@ module OvirtSDK4
|
|
35271
37060
|
#
|
35272
37061
|
# IMPORTANT: Since version 4.2 of the engine this operation is deprecated, and preserved only for backwards
|
35273
37062
|
# compatibility. It will be removed in the future. To update a disk use the
|
35274
|
-
#
|
37063
|
+
# xref:services-disk-methods-update[update] operation of the service that manages that disk.
|
35275
37064
|
#
|
35276
37065
|
# @param disk [Disk] The update to apply to the disk.
|
35277
37066
|
# @param opts [Hash] Additional options.
|
@@ -35339,6 +37128,60 @@ module OvirtSDK4
|
|
35339
37128
|
|
35340
37129
|
class DiskService < MeasurableService
|
35341
37130
|
|
37131
|
+
CONVERT = [
|
37132
|
+
[:disk, Disk].freeze,
|
37133
|
+
[:follow, String].freeze,
|
37134
|
+
].freeze
|
37135
|
+
|
37136
|
+
private_constant :CONVERT
|
37137
|
+
|
37138
|
+
#
|
37139
|
+
# Converts disk format and/or preallocation mode.
|
37140
|
+
#
|
37141
|
+
# For example, to convert the disk format from preallocated-cow to a sparse-raw image,
|
37142
|
+
# send a request like the following:
|
37143
|
+
#
|
37144
|
+
# [source]
|
37145
|
+
# ----
|
37146
|
+
# POST /ovirt-engine/api/disks/123/convert
|
37147
|
+
# ----
|
37148
|
+
#
|
37149
|
+
# With the following request body:
|
37150
|
+
#
|
37151
|
+
# [source,xml]
|
37152
|
+
# ----
|
37153
|
+
# <action>
|
37154
|
+
# <disk>
|
37155
|
+
# <sparse>true</sparse>
|
37156
|
+
# <format>raw</format>
|
37157
|
+
# </disk>
|
37158
|
+
# </action>
|
37159
|
+
# ----
|
37160
|
+
#
|
37161
|
+
# Note: In order to sparsify a disk, two conversions might be needed if the disk is on a Block Storage Domain.
|
37162
|
+
# For example: If a disk is RAW, converting it to QCOW will result in a larger disk. In order to reduce the size,
|
37163
|
+
# it is possible to convert the disk again to QCOW and keep the same allocation policy.
|
37164
|
+
#
|
37165
|
+
# @param opts [Hash] Additional options.
|
37166
|
+
#
|
37167
|
+
# @option opts [Disk] :disk The description of the disk.
|
37168
|
+
#
|
37169
|
+
# @option opts [String] :follow Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
|
37170
|
+
# of the current request. See <<documents/003_common_concepts/follow, here>> for details.
|
37171
|
+
#
|
37172
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
37173
|
+
#
|
37174
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
37175
|
+
#
|
37176
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
37177
|
+
# given then the timeout set globally for the connection will be used.
|
37178
|
+
#
|
37179
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
37180
|
+
#
|
37181
|
+
def convert(opts = {})
|
37182
|
+
internal_action(:convert, nil, CONVERT, opts)
|
37183
|
+
end
|
37184
|
+
|
35342
37185
|
COPY = [
|
35343
37186
|
[:async, TrueClass].freeze,
|
35344
37187
|
[:disk, Disk].freeze,
|
@@ -35638,7 +37481,7 @@ module OvirtSDK4
|
|
35638
37481
|
# Refreshing a direct LUN disk is useful when:
|
35639
37482
|
#
|
35640
37483
|
# - The LUN was added using the API without the host parameter, and therefore does not contain
|
35641
|
-
# any information from the storage (see
|
37484
|
+
# any information from the storage (see xref:services-disks-methods-add[DisksService::add]).
|
35642
37485
|
# - New information about the LUN is available on the storage and you want to update the LUN with it.
|
35643
37486
|
#
|
35644
37487
|
# To refresh direct LUN disk `123` using host `456`, send the following request:
|
@@ -35742,7 +37585,9 @@ module OvirtSDK4
|
|
35742
37585
|
#
|
35743
37586
|
# * For LUN disks: `alias`, `description` and `shareable`.
|
35744
37587
|
#
|
35745
|
-
# *
|
37588
|
+
# * Cinder integration has been replaced by Managed Block Storage.
|
37589
|
+
#
|
37590
|
+
# * For Managed Block disks: `provisioned_size`, `alias` and `description`.
|
35746
37591
|
#
|
35747
37592
|
# * For VM attached disks, the `qcow_version` can also be updated.
|
35748
37593
|
#
|
@@ -35785,6 +37630,26 @@ module OvirtSDK4
|
|
35785
37630
|
internal_update(disk, Disk, UPDATE, opts)
|
35786
37631
|
end
|
35787
37632
|
|
37633
|
+
#
|
37634
|
+
# Reference to the service that manages the DiskSnapshots.
|
37635
|
+
#
|
37636
|
+
# For example, to list all disk snapshots under the disks resource '123':
|
37637
|
+
#
|
37638
|
+
# ....
|
37639
|
+
# GET /ovirt-engine/api/disks/123/disksnapshots
|
37640
|
+
# ....
|
37641
|
+
#
|
37642
|
+
# For example, to retrieve a specific disk snapshot '789' under the disk resource '123':
|
37643
|
+
# ....
|
37644
|
+
# GET /ovirt-engine/api/disks/123/disksnapshots/789
|
37645
|
+
# ....
|
37646
|
+
#
|
37647
|
+
# @return [DiskSnapshotsService] A reference to `disk_snapshots` service.
|
37648
|
+
#
|
37649
|
+
def disk_snapshots_service
|
37650
|
+
@disk_snapshots_service ||= DiskSnapshotsService.new(self, 'disksnapshots')
|
37651
|
+
end
|
37652
|
+
|
35788
37653
|
#
|
35789
37654
|
# Reference to the service that manages the permissions assigned to the disk.
|
35790
37655
|
#
|
@@ -35814,6 +37679,12 @@ module OvirtSDK4
|
|
35814
37679
|
if path.nil? || path == ''
|
35815
37680
|
return self
|
35816
37681
|
end
|
37682
|
+
if path == 'disksnapshots'
|
37683
|
+
return disk_snapshots_service
|
37684
|
+
end
|
37685
|
+
if path.start_with?('disksnapshots/')
|
37686
|
+
return disk_snapshots_service.service(path[14..-1])
|
37687
|
+
end
|
35817
37688
|
if path == 'permissions'
|
35818
37689
|
return permissions_service
|
35819
37690
|
end
|
@@ -36272,7 +38143,7 @@ module OvirtSDK4
|
|
36272
38143
|
#
|
36273
38144
|
# Removes a brick from the underlying gluster volume and deletes entries from database. This can be used only when
|
36274
38145
|
# removing a single brick without data migration. To remove multiple bricks and with data migration, use
|
36275
|
-
#
|
38146
|
+
# xref:services-gluster_bricks-methods-migrate[migrate] instead.
|
36276
38147
|
#
|
36277
38148
|
# For example, to delete brick `234` from gluster volume `123`, send a request like this:
|
36278
38149
|
#
|
@@ -36308,8 +38179,8 @@ module OvirtSDK4
|
|
36308
38179
|
# Replaces this brick with a new one.
|
36309
38180
|
#
|
36310
38181
|
# IMPORTANT: This operation has been deprecated since version 3.5 of the engine and will be removed in the future.
|
36311
|
-
# Use
|
36312
|
-
#
|
38182
|
+
# Use xref:services-gluster_bricks-methods-add[add brick(s)] and
|
38183
|
+
# xref:services-gluster_bricks-methods-migrate[migrate brick(s)] instead.
|
36313
38184
|
#
|
36314
38185
|
# @param opts [Hash] Additional options.
|
36315
38186
|
#
|
@@ -36928,6 +38799,7 @@ module OvirtSDK4
|
|
36928
38799
|
[:async, TrueClass].freeze,
|
36929
38800
|
[:cluster, Cluster].freeze,
|
36930
38801
|
[:host, Host].freeze,
|
38802
|
+
[:reboot, TrueClass].freeze,
|
36931
38803
|
].freeze
|
36932
38804
|
|
36933
38805
|
private_constant :APPROVE
|
@@ -36949,6 +38821,8 @@ module OvirtSDK4
|
|
36949
38821
|
#
|
36950
38822
|
# @option opts [Host] :host The host to approve.
|
36951
38823
|
#
|
38824
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
38825
|
+
#
|
36952
38826
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
36953
38827
|
#
|
36954
38828
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -36993,10 +38867,10 @@ module OvirtSDK4
|
|
36993
38867
|
# ----
|
36994
38868
|
#
|
36995
38869
|
# IMPORTANT: Since {engine-name} 4.3, it is possible to also specify `commit_on_success` in
|
36996
|
-
# the
|
38870
|
+
# the xref:services-host-methods-setup_networks[setupnetworks] request, in which case the new
|
36997
38871
|
# configuration is automatically saved in the {hypervisor-name} upon completing the setup and
|
36998
38872
|
# re-establishing connectivity between the {hypervisor-name} and {engine-name}, and without
|
36999
|
-
# waiting for a separate
|
38873
|
+
# waiting for a separate xref:services-host-methods-commit_net_config[commitnetconfig] request.
|
37000
38874
|
#
|
37001
38875
|
# @param opts [Hash] Additional options.
|
37002
38876
|
#
|
@@ -37025,6 +38899,9 @@ module OvirtSDK4
|
|
37025
38899
|
#
|
37026
38900
|
# Copy the network configuration of the specified host to current host.
|
37027
38901
|
#
|
38902
|
+
# IMPORTANT: Any network attachments that are not present on the source host will be erased from the target host
|
38903
|
+
# by the copy operation.
|
38904
|
+
#
|
37028
38905
|
# To copy networks from another host, send a request like this:
|
37029
38906
|
#
|
37030
38907
|
# [source]
|
@@ -37037,7 +38914,7 @@ module OvirtSDK4
|
|
37037
38914
|
# [source,xml]
|
37038
38915
|
# ----
|
37039
38916
|
# <action>
|
37040
|
-
# <
|
38917
|
+
# <source_host id="456"/>
|
37041
38918
|
# </action>
|
37042
38919
|
# ----
|
37043
38920
|
#
|
@@ -37093,6 +38970,75 @@ module OvirtSDK4
|
|
37093
38970
|
internal_action(:deactivate, nil, DEACTIVATE, opts)
|
37094
38971
|
end
|
37095
38972
|
|
38973
|
+
DISCOVER_ISCSI = [
|
38974
|
+
[:async, TrueClass].freeze,
|
38975
|
+
[:iscsi, IscsiDetails].freeze,
|
38976
|
+
].freeze
|
38977
|
+
|
38978
|
+
private_constant :DISCOVER_ISCSI
|
38979
|
+
|
38980
|
+
#
|
38981
|
+
# Discovers iSCSI targets on the host, using the initiator details.
|
38982
|
+
# Returns a list of IscsiDetails objects containing the discovered data.
|
38983
|
+
#
|
38984
|
+
# For example, to discover iSCSI targets available in `myiscsi.example.com`,
|
38985
|
+
# from host `123`, send a request like this:
|
38986
|
+
#
|
38987
|
+
# [source]
|
38988
|
+
# ----
|
38989
|
+
# POST /ovirt-engine/api/hosts/123/discoveriscsi
|
38990
|
+
# ----
|
38991
|
+
#
|
38992
|
+
# With a request body like this:
|
38993
|
+
#
|
38994
|
+
# [source,xml]
|
38995
|
+
# ----
|
38996
|
+
# <action>
|
38997
|
+
# <iscsi>
|
38998
|
+
# <address>myiscsi.example.com</address>
|
38999
|
+
# </iscsi>
|
39000
|
+
# </action>
|
39001
|
+
# ----
|
39002
|
+
#
|
39003
|
+
# The result will be like this:
|
39004
|
+
#
|
39005
|
+
# [source,xml]
|
39006
|
+
# ----
|
39007
|
+
# <discovered_targets>
|
39008
|
+
# <iscsi_details>
|
39009
|
+
# <address>10.35.1.72</address>
|
39010
|
+
# <port>3260</port>
|
39011
|
+
# <portal>10.35.1.72:3260,1</portal>
|
39012
|
+
# <target>iqn.2015-08.com.tgt:444</target>
|
39013
|
+
# </iscsi_details>
|
39014
|
+
# </discovered_targets>
|
39015
|
+
# ----
|
39016
|
+
#
|
39017
|
+
# IMPORTANT: When using this method to discover iscsi targets, you can use an FQDN or an
|
39018
|
+
# IP address, but you must use the iscsi details from the discovered targets results to log in
|
39019
|
+
# using the iscsilogin method.
|
39020
|
+
#
|
39021
|
+
# @param opts [Hash] Additional options.
|
39022
|
+
#
|
39023
|
+
# @option opts [Boolean] :async Indicates if the discovery should be performed asynchronously.
|
39024
|
+
#
|
39025
|
+
# @option opts [Array<IscsiDetails>] :discovered_targets The discovered targets including all connection information.
|
39026
|
+
#
|
39027
|
+
# @option opts [IscsiDetails] :iscsi The target iSCSI device.
|
39028
|
+
#
|
39029
|
+
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
39030
|
+
#
|
39031
|
+
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
39032
|
+
#
|
39033
|
+
# @option opts [Integer] :timeout (nil) The timeout for this request, in seconds. If no value is explicitly
|
39034
|
+
# given then the timeout set globally for the connection will be used.
|
39035
|
+
#
|
39036
|
+
# @option opts [Boolean] :wait (true) If `true` wait for the response.
|
39037
|
+
#
|
39038
|
+
def discover_iscsi(opts = {})
|
39039
|
+
internal_action(:discoveriscsi, :discovered_targets, DISCOVER_ISCSI, opts)
|
39040
|
+
end
|
39041
|
+
|
37096
39042
|
ENROLL_CERTIFICATE = [
|
37097
39043
|
[:async, TrueClass].freeze,
|
37098
39044
|
].freeze
|
@@ -37278,6 +39224,7 @@ module OvirtSDK4
|
|
37278
39224
|
[:deploy_hosted_engine, TrueClass].freeze,
|
37279
39225
|
[:host, Host].freeze,
|
37280
39226
|
[:image, String].freeze,
|
39227
|
+
[:reboot, TrueClass].freeze,
|
37281
39228
|
[:root_password, String].freeze,
|
37282
39229
|
[:ssh, Ssh].freeze,
|
37283
39230
|
[:undeploy_hosted_engine, TrueClass].freeze,
|
@@ -37329,9 +39276,10 @@ module OvirtSDK4
|
|
37329
39276
|
# --data '
|
37330
39277
|
# {
|
37331
39278
|
# "root_password": "myrootpassword"
|
39279
|
+
# "deploy_hosted_engine" : "true"
|
37332
39280
|
# }
|
37333
39281
|
# ' \
|
37334
|
-
# "https://engine.example.com/ovirt-engine/api/hosts/123
|
39282
|
+
# "https://engine.example.com/ovirt-engine/api/hosts/123"
|
37335
39283
|
# ----
|
37336
39284
|
#
|
37337
39285
|
# IMPORTANT: Since version 4.1.2 of the engine, when a host is reinstalled we override the host firewall
|
@@ -37354,6 +39302,8 @@ module OvirtSDK4
|
|
37354
39302
|
#
|
37355
39303
|
# @option opts [String] :image When installing {hypervisor-name}, an ISO image file is required.
|
37356
39304
|
#
|
39305
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
39306
|
+
#
|
37357
39307
|
# @option opts [String] :root_password The password of the `root` user used to connect to the host via SSH.
|
37358
39308
|
#
|
37359
39309
|
# @option opts [Ssh] :ssh The SSH details used to connect to the host.
|
@@ -37382,8 +39332,12 @@ module OvirtSDK4
|
|
37382
39332
|
|
37383
39333
|
private_constant :ISCSI_DISCOVER
|
37384
39334
|
|
39335
|
+
#
|
39336
|
+
# This method has been deprecated since Engine version 4.4.6.
|
39337
|
+
# DiscoverIscsi should be used instead.
|
37385
39338
|
#
|
37386
39339
|
# Discovers iSCSI targets on the host, using the initiator details.
|
39340
|
+
# Returns an array of strings containing the discovered data.
|
37387
39341
|
#
|
37388
39342
|
# For example, to discover iSCSI targets available in `myiscsi.example.com`,
|
37389
39343
|
# from host `123`, send a request like this:
|
@@ -37404,32 +39358,14 @@ module OvirtSDK4
|
|
37404
39358
|
# </action>
|
37405
39359
|
# ----
|
37406
39360
|
#
|
37407
|
-
# The result will be like this:
|
37408
|
-
#
|
37409
|
-
# [source,xml]
|
37410
|
-
# ----
|
37411
|
-
# <discovered_targets>
|
37412
|
-
# <iscsi_details>
|
37413
|
-
# <address>10.35.1.72</address>
|
37414
|
-
# <port>3260</port>
|
37415
|
-
# <portal>10.35.1.72:3260,1</portal>
|
37416
|
-
# <target>iqn.2015-08.com.tgt:444</target>
|
37417
|
-
# </iscsi_details>
|
37418
|
-
# </discovered_targets>
|
37419
|
-
# ----
|
37420
|
-
#
|
37421
39361
|
# @param opts [Hash] Additional options.
|
37422
39362
|
#
|
37423
39363
|
# @option opts [Boolean] :async Indicates if the discovery should be performed asynchronously.
|
37424
39364
|
#
|
37425
|
-
# @option opts [Array<IscsiDetails>] :discovered_targets The discovered targets including all connection information.
|
37426
|
-
#
|
37427
39365
|
# @option opts [IscsiDetails] :iscsi The target iSCSI device.
|
37428
39366
|
#
|
37429
39367
|
# @option opts [Array<String>] :iscsi_targets The iSCSI targets.
|
37430
|
-
#
|
37431
|
-
# Since version 4.2 of the engine, this parameter is deprecated, use
|
37432
|
-
# `discovered_targets` instead.
|
39368
|
+
# *
|
37433
39369
|
#
|
37434
39370
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
37435
39371
|
#
|
@@ -37454,6 +39390,10 @@ module OvirtSDK4
|
|
37454
39390
|
#
|
37455
39391
|
# Login to iSCSI targets on the host, using the target details.
|
37456
39392
|
#
|
39393
|
+
#
|
39394
|
+
# IMPORTANT: When using this method to log in, you must use the iscsi details from the
|
39395
|
+
# discovered targets results in the discoveriscsi method.
|
39396
|
+
#
|
37457
39397
|
# @param opts [Hash] Additional options.
|
37458
39398
|
#
|
37459
39399
|
# @option opts [Boolean] :async Indicates if the login should be performed asynchronously.
|
@@ -37619,8 +39559,8 @@ module OvirtSDK4
|
|
37619
39559
|
# <name>bond0</name>
|
37620
39560
|
# </host_nic>
|
37621
39561
|
# <ip_address_assignments>
|
37622
|
-
# <assignment_method>static</assignment_method>
|
37623
39562
|
# <ip_address_assignment>
|
39563
|
+
# <assignment_method>static</assignment_method>
|
37624
39564
|
# <ip>
|
37625
39565
|
# <address>192.168.122.10</address>
|
37626
39566
|
# <netmask>255.255.255.0</netmask>
|
@@ -37724,13 +39664,13 @@ module OvirtSDK4
|
|
37724
39664
|
# ----
|
37725
39665
|
#
|
37726
39666
|
# IMPORTANT: To make sure that the network configuration has been saved in the host, and that it will be applied
|
37727
|
-
# when the host is rebooted, remember to call
|
39667
|
+
# when the host is rebooted, remember to call xref:services-host-methods-commit_net_config[commitnetconfig].
|
37728
39668
|
#
|
37729
39669
|
# IMPORTANT: Since {engine-name} 4.3, it is possible to also specify `commit_on_success` in
|
37730
|
-
# the
|
39670
|
+
# the xref:services-host-methods-setup_networks[setupnetworks] request, in which case the new
|
37731
39671
|
# configuration is automatically saved in the {hypervisor-name} upon completing the setup and
|
37732
39672
|
# re-establishing connectivity between the {hypervisor-name} and {engine-name}, and without
|
37733
|
-
# waiting for a separate
|
39673
|
+
# waiting for a separate xref:services-host-methods-commit_net_config[commitnetconfig] request.
|
37734
39674
|
#
|
37735
39675
|
# @param opts [Hash] Additional options.
|
37736
39676
|
#
|
@@ -37740,7 +39680,7 @@ module OvirtSDK4
|
|
37740
39680
|
#
|
37741
39681
|
# @option opts [Boolean] :commit_on_success Specifies whether to automatically save the configuration in the {hypervisor-name} upon completing
|
37742
39682
|
# the setup and re-establishing connectivity between the {hypervisor-name} and {engine-name},
|
37743
|
-
# and without waiting for a separate
|
39683
|
+
# and without waiting for a separate xref:services-host-methods-commit_net_config[commitnetconfig]
|
37744
39684
|
# request.
|
37745
39685
|
# The default value is `false`, which means that the configuration will not be
|
37746
39686
|
# saved automatically.
|
@@ -37941,7 +39881,7 @@ module OvirtSDK4
|
|
37941
39881
|
# Check if there are upgrades available for the host. If there are upgrades available an icon will be displayed
|
37942
39882
|
# next to host status icon in the Administration Portal. Audit log messages are also added to indicate the
|
37943
39883
|
# availability of upgrades. The upgrade can be started from the webadmin or by using the
|
37944
|
-
#
|
39884
|
+
# xref:services-host-methods-upgrade[upgrade] host action.
|
37945
39885
|
#
|
37946
39886
|
# @param opts [Hash] Additional options.
|
37947
39887
|
#
|
@@ -37963,6 +39903,7 @@ module OvirtSDK4
|
|
37963
39903
|
[:async, TrueClass].freeze,
|
37964
39904
|
[:cluster, Cluster].freeze,
|
37965
39905
|
[:host, Host].freeze,
|
39906
|
+
[:reboot, TrueClass].freeze,
|
37966
39907
|
].freeze
|
37967
39908
|
|
37968
39909
|
private_constant :APPROVE_USING_ROOT_PASSWORD
|
@@ -37982,6 +39923,8 @@ module OvirtSDK4
|
|
37982
39923
|
#
|
37983
39924
|
# @option opts [Host] :host The host to approve.
|
37984
39925
|
#
|
39926
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
39927
|
+
#
|
37985
39928
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
37986
39929
|
#
|
37987
39930
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -38001,6 +39944,7 @@ module OvirtSDK4
|
|
38001
39944
|
[:deploy_hosted_engine, TrueClass].freeze,
|
38002
39945
|
[:host, Host].freeze,
|
38003
39946
|
[:image, String].freeze,
|
39947
|
+
[:reboot, TrueClass].freeze,
|
38004
39948
|
[:root_password, String].freeze,
|
38005
39949
|
[:ssh, Ssh].freeze,
|
38006
39950
|
[:undeploy_hosted_engine, TrueClass].freeze,
|
@@ -38029,6 +39973,8 @@ module OvirtSDK4
|
|
38029
39973
|
#
|
38030
39974
|
# @option opts [String] :image When installing {hypervisor-name}, an ISO image file is required.
|
38031
39975
|
#
|
39976
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
39977
|
+
#
|
38032
39978
|
# @option opts [String] :root_password The password of the `root` user used to connect to the host via SSH.
|
38033
39979
|
#
|
38034
39980
|
# @option opts [Ssh] :ssh The SSH details used to connect to the host.
|
@@ -38084,6 +40030,7 @@ module OvirtSDK4
|
|
38084
40030
|
[:async, TrueClass].freeze,
|
38085
40031
|
[:cluster, Cluster].freeze,
|
38086
40032
|
[:host, Host].freeze,
|
40033
|
+
[:reboot, TrueClass].freeze,
|
38087
40034
|
].freeze
|
38088
40035
|
|
38089
40036
|
private_constant :APPROVE_USING_SSH
|
@@ -38104,6 +40051,8 @@ module OvirtSDK4
|
|
38104
40051
|
#
|
38105
40052
|
# @option opts [Host] :host The host to approve.
|
38106
40053
|
#
|
40054
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
40055
|
+
#
|
38107
40056
|
# @option opts [Hash] :headers ({}) Additional HTTP headers.
|
38108
40057
|
#
|
38109
40058
|
# @option opts [Hash] :query ({}) Additional URL query parameters.
|
@@ -38123,6 +40072,7 @@ module OvirtSDK4
|
|
38123
40072
|
[:deploy_hosted_engine, TrueClass].freeze,
|
38124
40073
|
[:host, Host].freeze,
|
38125
40074
|
[:image, String].freeze,
|
40075
|
+
[:reboot, TrueClass].freeze,
|
38126
40076
|
[:root_password, String].freeze,
|
38127
40077
|
[:ssh, Ssh].freeze,
|
38128
40078
|
[:undeploy_hosted_engine, TrueClass].freeze,
|
@@ -38151,6 +40101,8 @@ module OvirtSDK4
|
|
38151
40101
|
#
|
38152
40102
|
# @option opts [String] :image When installing {hypervisor-name}, an ISO image file is required.
|
38153
40103
|
#
|
40104
|
+
# @option opts [Boolean] :reboot Indicates if the host should be rebooted after successful installation. The default value is `true`.
|
40105
|
+
#
|
38154
40106
|
# @option opts [String] :root_password The password of the `root` user used to connect to the host via SSH.
|
38155
40107
|
#
|
38156
40108
|
# @option opts [Ssh] :ssh The SSH details used to connect to the host.
|
@@ -38210,6 +40162,17 @@ module OvirtSDK4
|
|
38210
40162
|
@affinity_labels_service ||= AssignedAffinityLabelsService.new(self, 'affinitylabels')
|
38211
40163
|
end
|
38212
40164
|
|
40165
|
+
#
|
40166
|
+
# A reference to the list of all host's CPUs with detailed information
|
40167
|
+
# about the topology (socket, core) and with information
|
40168
|
+
# about the current CPU pinning.
|
40169
|
+
#
|
40170
|
+
# @return [HostCpuUnitsService] A reference to `cpu_units` service.
|
40171
|
+
#
|
40172
|
+
def cpu_units_service
|
40173
|
+
@cpu_units_service ||= HostCpuUnitsService.new(self, 'cpuunits')
|
40174
|
+
end
|
40175
|
+
|
38213
40176
|
#
|
38214
40177
|
# A reference to the host devices service. Use this service to view the devices of the host object.
|
38215
40178
|
#
|
@@ -38357,6 +40320,12 @@ module OvirtSDK4
|
|
38357
40320
|
if path.start_with?('affinitylabels/')
|
38358
40321
|
return affinity_labels_service.service(path[15..-1])
|
38359
40322
|
end
|
40323
|
+
if path == 'cpuunits'
|
40324
|
+
return cpu_units_service
|
40325
|
+
end
|
40326
|
+
if path.start_with?('cpuunits/')
|
40327
|
+
return cpu_units_service.service(path[9..-1])
|
40328
|
+
end
|
38360
40329
|
if path == 'devices'
|
38361
40330
|
return devices_service
|
38362
40331
|
end
|