Class: OvirtSDK4::HostService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::HostService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#activate(opts = {}) ⇒ Object
Activates the host for use, for example to run virtual machines.
-
#affinity_labels_service ⇒ AssignedAffinityLabelsService
List of scheduling labels assigned to this host.
-
#approve(opts = {}) ⇒ Object
Approve a pre-installed Hypervisor host for usage in the virtualization environment.
-
#approve_using_root_password(opts = {}) ⇒ Object
Executes the
approve_using_root_password
method. -
#approve_using_ssh(opts = {}) ⇒ Object
Approve the specified host to be added to the engine by using ssh authentication.
-
#commit_net_config(opts = {}) ⇒ Object
Marks the network configuration as good and persists it inside the host.
-
#copy_host_networks(opts = {}) ⇒ Object
Copy the network configuration of the specified host to current host.
-
#deactivate(opts = {}) ⇒ Object
Deactivates the host to perform maintenance tasks.
-
#devices_service ⇒ HostDevicesService
A reference to the host devices service.
-
#discover_iscsi(opts = {}) ⇒ Object
Discovers iSCSI targets on the host, using the initiator details.
-
#enroll_certificate(opts = {}) ⇒ Object
Enrolls the certificate of the host.
-
#external_network_provider_configurations_service ⇒ ExternalNetworkProviderConfigurationsService
External network providers provisioned by the system on the host.
-
#fence(opts = {}) ⇒ Object
Controls the host’s power management device.
-
#fence_agents_service ⇒ FenceAgentsService
A reference to the fence agents service.
-
#force_select_spm(opts = {}) ⇒ Object
To manually set a host as the storage pool manager (SPM).
-
#get(opts = {}) ⇒ Host
Gets the host details.
-
#hooks_service ⇒ HostHooksService
A reference to the host hooks service.
-
#install(opts = {}) ⇒ Object
Installs the latest version of VDSM and related software on the host.
-
#install_using_root_password(opts = {}) ⇒ Object
Install VDSM and other packages required to get the host ready to be used in the engine providing the root password.
-
#install_using_ssh(opts = {}) ⇒ Object
Install VDSM and other packages required to get the host ready to be used in the engine providing the SSH password.
-
#iscsi_discover(opts = {}) ⇒ Object
This method has been deprecated since Engine version 4.4.6.
-
#iscsi_login(opts = {}) ⇒ Object
Login to iSCSI targets on the host, using the target details.
-
#katello_errata_service ⇒ KatelloErrataService
A reference to the service that can show the applicable errata available on the host.
-
#network_attachments_service ⇒ NetworkAttachmentsService
A reference to the network attachments service.
-
#nics_service ⇒ HostNicsService
A reference to the service that manages the network interface devices on the host.
-
#numa_nodes_service ⇒ HostNumaNodesService
A reference to the service that manage NUMA nodes for the host.
-
#permissions_service ⇒ AssignedPermissionsService
A reference to the host permission service.
-
#refresh(opts = {}) ⇒ Object
Refresh the host devices and capabilities.
-
#remove(opts = {}) ⇒ Object
Remove the host from the system.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#setup_networks(opts = {}) ⇒ Object
This method is used to change the configuration of the network interfaces of a host.
-
#statistics_service ⇒ StatisticsService
Locates the
statistics
service. -
#storage_connection_extensions_service ⇒ StorageServerConnectionExtensionsService
A reference to storage connection extensions.
-
#storage_service ⇒ HostStorageService
A reference to the service that manages the host’s storage.
-
#sync_all_networks(opts = {}) ⇒ Object
To synchronize all networks on the host, send a request like this:.
-
#tags_service ⇒ AssignedTagsService
A reference to the host tags service.
-
#unmanaged_networks_service ⇒ UnmanagedNetworksService
A reference to unmanaged networks.
-
#unregistered_storage_domains_discover(opts = {}) ⇒ Object
Discovers the block Storage Domains which are candidates to be imported to the setup.
-
#update(host, opts = {}) ⇒ Host
Update the host properties.
-
#update_using_root_password(host, opts = {}) ⇒ Host
Update the specified host in the system.
-
#update_using_ssh(host, opts = {}) ⇒ Host
Updates the specified host in the system.
-
#upgrade(opts = {}) ⇒ Object
Upgrades VDSM and selected software on the host.
-
#upgrade_check(opts = {}) ⇒ Object
Check if there are upgrades available for the host.
Methods inherited from Service
Instance Method Details
#activate(opts = {}) ⇒ Object
Activates the host for use, for example to run virtual machines.
37791 37792 37793 |
# File 'lib/ovirtsdk4/services.rb', line 37791 def activate(opts = {}) internal_action(:activate, nil, ACTIVATE, opts) end |
#affinity_labels_service ⇒ AssignedAffinityLabelsService
List of scheduling labels assigned to this host.
39151 39152 39153 |
# File 'lib/ovirtsdk4/services.rb', line 39151 def affinity_labels_service @affinity_labels_service ||= AssignedAffinityLabelsService.new(self, 'affinitylabels') end |
#approve(opts = {}) ⇒ Object
Approve a pre-installed Hypervisor host for usage in the virtualization environment.
This action also accepts an optional cluster element to define the target cluster for this host.
37833 37834 37835 |
# File 'lib/ovirtsdk4/services.rb', line 37833 def approve(opts = {}) internal_action(:approve, nil, APPROVE, opts) end |
#approve_using_root_password(opts = {}) ⇒ Object
Executes the approve_using_root_password
method.
38927 38928 38929 |
# File 'lib/ovirtsdk4/services.rb', line 38927 def approve_using_root_password(opts = {}) internal_action(:approve, nil, APPROVE_USING_ROOT_PASSWORD, opts) end |
#approve_using_ssh(opts = {}) ⇒ Object
Approve the specified host to be added to the engine by using ssh authentication. This occurs when the host registers itself with the engine.
39055 39056 39057 |
# File 'lib/ovirtsdk4/services.rb', line 39055 def approve_using_ssh(opts = {}) internal_action(:approve, nil, APPROVE_USING_SSH, opts) end |
#commit_net_config(opts = {}) ⇒ Object
Marks the network configuration as good and persists it inside the host.
An API user commits the network configuration to persist a host network interface attachment or detachment, or persist the creation and deletion of a bonded interface.
Important
|
Networking configuration is only committed after the engine has established that host connectivity is not lost as a result of the configuration changes. If host connectivity is lost, the host requires a reboot and automatically reverts to the previous networking configuration. |
For example, to commit the network configuration of host with id 123
send a request like this:
POST /ovirt-engine/api/hosts/123/commitnetconfig
With a request body like this:
<action/>
Important
|
Since engine-name 4.3, it is possible to also specify commit_on_success in
the setupnetworks request, in which case the new
configuration is automatically saved in the hypervisor-name upon completing the setup and
re-establishing connectivity between the hypervisor-name and engine-name, and without
waiting for a separate commitnetconfig request.
|
37886 37887 37888 |
# File 'lib/ovirtsdk4/services.rb', line 37886 def commit_net_config(opts = {}) internal_action(:commitnetconfig, nil, COMMIT_NET_CONFIG, opts) end |
#copy_host_networks(opts = {}) ⇒ Object
Copy the network configuration of the specified host to current host.
Important
|
Any network attachments that are not present on the source host will be erased from the target host by the copy operation. |
To copy networks from another host, send a request like this:
POST /ovirt-engine/api/hosts/123/copyhostnetworks
With a request body like this:
<action>
<source_host id="456"/>
</action>
37934 37935 37936 |
# File 'lib/ovirtsdk4/services.rb', line 37934 def copy_host_networks(opts = {}) internal_action(:copyhostnetworks, nil, COPY_HOST_NETWORKS, opts) end |
#deactivate(opts = {}) ⇒ Object
Deactivates the host to perform maintenance tasks.
37967 37968 37969 |
# File 'lib/ovirtsdk4/services.rb', line 37967 def deactivate(opts = {}) internal_action(:deactivate, nil, DEACTIVATE, opts) end |
#devices_service ⇒ HostDevicesService
A reference to the host devices service. Use this service to view the devices of the host object.
39160 39161 39162 |
# File 'lib/ovirtsdk4/services.rb', line 39160 def devices_service @devices_service ||= HostDevicesService.new(self, 'devices') end |
#discover_iscsi(opts = {}) ⇒ Object
Discovers iSCSI targets on the host, using the initiator details. Returns a list of IscsiDetails objects containing the discovered data.
For example, to discover iSCSI targets available in myiscsi.example.com
,
from host 123
, send a request like this:
POST /ovirt-engine/api/hosts/123/discoveriscsi
With a request body like this:
<action>
<iscsi>
<address>myiscsi.example.com</address>
</iscsi>
</action>
The result will be like this:
<discovered_targets>
<iscsi_details>
<address>10.35.1.72</address>
<port>3260</port>
<portal>10.35.1.72:3260,1</portal>
<target>iqn.2015-08.com.tgt:444</target>
</iscsi_details>
</discovered_targets>
38032 38033 38034 |
# File 'lib/ovirtsdk4/services.rb', line 38032 def discover_iscsi(opts = {}) internal_action(:discoveriscsi, :discovered_targets, DISCOVER_ISCSI, opts) end |
#enroll_certificate(opts = {}) ⇒ Object
Enrolls the certificate of the host. Useful in case you get a warning that it is about to expire or has already expired.
38059 38060 38061 |
# File 'lib/ovirtsdk4/services.rb', line 38059 def enroll_certificate(opts = {}) internal_action(:enrollcertificate, nil, ENROLL_CERTIFICATE, opts) end |
#external_network_provider_configurations_service ⇒ ExternalNetworkProviderConfigurationsService
External network providers provisioned by the system on the host.
39169 39170 39171 |
# File 'lib/ovirtsdk4/services.rb', line 39169 def external_network_provider_configurations_service @external_network_provider_configurations_service ||= ExternalNetworkProviderConfigurationsService.new(self, 'externalnetworkproviderconfigurations') end |
#fence(opts = {}) ⇒ Object
Controls the host’s power management device.
For example, to start the host. This can be done via:
#!/bin/sh -ex
url="https://engine.example.com/ovirt-engine/api"
user="[email protected]"
password="..."
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request POST \
--header "Version: 4" \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '
<action>
<fence_type>start</fence_type>
</action>
' \
"${url}/hosts/123/fence"
38119 38120 38121 |
# File 'lib/ovirtsdk4/services.rb', line 38119 def fence(opts = {}) internal_action(:fence, :power_management, FENCE, opts) end |
#fence_agents_service ⇒ FenceAgentsService
A reference to the fence agents service. Use this service to manage fence and power management agents on the host object.
39179 39180 39181 |
# File 'lib/ovirtsdk4/services.rb', line 39179 def fence_agents_service @fence_agents_service ||= FenceAgentsService.new(self, 'fenceagents') end |
#force_select_spm(opts = {}) ⇒ Object
To manually set a host as the storage pool manager (SPM).
POST /ovirt-engine/api/hosts/123/forceselectspm
With a request body like this:
<action/>
38157 38158 38159 |
# File 'lib/ovirtsdk4/services.rb', line 38157 def force_select_spm(opts = {}) internal_action(:forceselectspm, nil, FORCE_SELECT_SPM, opts) end |
#get(opts = {}) ⇒ Host
Gets the host details.
GET /ovirt-engine/api/hosts/123
38211 38212 38213 |
# File 'lib/ovirtsdk4/services.rb', line 38211 def get(opts = {}) internal_get(GET, opts) end |
#hooks_service ⇒ HostHooksService
A reference to the host hooks service. Use this service to view the hooks available in the host object.
39188 39189 39190 |
# File 'lib/ovirtsdk4/services.rb', line 39188 def hooks_service @hooks_service ||= HostHooksService.new(self, 'hooks') end |
#install(opts = {}) ⇒ Object
Installs the latest version of VDSM and related software on the host.
The action also performs every configuration steps on the host which is done during adding host to the engine: kdump configuration, hosted-engine deploy, kernel options changes, etc.
The host type defines additional parameters for the action.
Example of installing a host, using curl
and JSON, plain:
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--request PUT \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Version: 4" \
--user "[email protected]:..." \
--data '
{
"root_password": "myrootpassword"
}
' \
"https://engine.example.com/ovirt-engine/api/hosts/123"
Example of installing a host using curl
and JSON with hosted engine components:
curl \
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--request PUT \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Version: 4" \
--user "[email protected]:..." \
--data '
{
"root_password": "myrootpassword"
"deploy_hosted_engine" : "true"
}
' \
"https://engine.example.com/ovirt-engine/api/hosts/123"
Important
|
Since version 4.1.2 of the engine, when a host is reinstalled we override the host firewall definitions by default. |
38318 38319 38320 |
# File 'lib/ovirtsdk4/services.rb', line 38318 def install(opts = {}) internal_action(:install, nil, INSTALL, opts) end |
#install_using_root_password(opts = {}) ⇒ Object
Install VDSM and other packages required to get the host ready to be used in the engine providing the root password. This has been deprecated.
38985 38986 38987 |
# File 'lib/ovirtsdk4/services.rb', line 38985 def install_using_root_password(opts = {}) internal_action(:install, nil, INSTALL_USING_ROOT_PASSWORD, opts) end |
#install_using_ssh(opts = {}) ⇒ Object
Install VDSM and other packages required to get the host ready to be used in the engine providing the SSH password.
39113 39114 39115 |
# File 'lib/ovirtsdk4/services.rb', line 39113 def install_using_ssh(opts = {}) internal_action(:install, nil, INSTALL_USING_SSH, opts) end |
#iscsi_discover(opts = {}) ⇒ Object
This method has been deprecated since Engine version 4.4.6. DiscoverIscsi should be used instead.
Discovers iSCSI targets on the host, using the initiator details. Returns an array of strings containing the discovered data.
For example, to discover iSCSI targets available in myiscsi.example.com
,
from host 123
, send a request like this:
POST /ovirt-engine/api/hosts/123/iscsidiscover
With a request body like this:
<action>
<iscsi>
<address>myiscsi.example.com</address>
</iscsi>
</action>
38373 38374 38375 |
# File 'lib/ovirtsdk4/services.rb', line 38373 def iscsi_discover(opts = {}) internal_action(:iscsidiscover, :iscsi_targets, ISCSI_DISCOVER, opts) end |
#iscsi_login(opts = {}) ⇒ Object
Login to iSCSI targets on the host, using the target details.
38402 38403 38404 |
# File 'lib/ovirtsdk4/services.rb', line 38402 def iscsi_login(opts = {}) internal_action(:iscsilogin, nil, ISCSI_LOGIN, opts) end |
#katello_errata_service ⇒ KatelloErrataService
A reference to the service that can show the applicable errata available on the host. This information is taken from Katello.
39198 39199 39200 |
# File 'lib/ovirtsdk4/services.rb', line 39198 def katello_errata_service @katello_errata_service ||= KatelloErrataService.new(self, 'katelloerrata') end |
#network_attachments_service ⇒ NetworkAttachmentsService
A reference to the network attachments service. You can use this service to attach Logical networks to host interfaces.
39208 39209 39210 |
# File 'lib/ovirtsdk4/services.rb', line 39208 def @network_attachments_service ||= NetworkAttachmentsService.new(self, 'networkattachments') end |
#nics_service ⇒ HostNicsService
A reference to the service that manages the network interface devices on the host.
39217 39218 39219 |
# File 'lib/ovirtsdk4/services.rb', line 39217 def nics_service @nics_service ||= HostNicsService.new(self, 'nics') end |
#numa_nodes_service ⇒ HostNumaNodesService
A reference to the service that manage NUMA nodes for the host.
39226 39227 39228 |
# File 'lib/ovirtsdk4/services.rb', line 39226 def numa_nodes_service @numa_nodes_service ||= HostNumaNodesService.new(self, 'numanodes') end |
#permissions_service ⇒ AssignedPermissionsService
A reference to the host permission service. Use this service to manage permissions on the host object.
39236 39237 39238 |
# File 'lib/ovirtsdk4/services.rb', line 39236 def @permissions_service ||= AssignedPermissionsService.new(self, 'permissions') end |
#refresh(opts = {}) ⇒ Object
Refresh the host devices and capabilities.
38428 38429 38430 |
# File 'lib/ovirtsdk4/services.rb', line 38428 def refresh(opts = {}) internal_action(:refresh, nil, REFRESH, opts) end |
#remove(opts = {}) ⇒ Object
Remove the host from the system.
#!/bin/sh -ex
url="https://engine.example.com/ovirt-engine/api"
user="[email protected]"
password="..."
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request DELETE \
--header "Version: 4" \
"${url}/hosts/1ff7a191-2f3b-4eff-812b-9f91a30c3acc"
38473 38474 38475 |
# File 'lib/ovirtsdk4/services.rb', line 38473 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
39292 39293 39294 39295 39296 39297 39298 39299 39300 39301 39302 39303 39304 39305 39306 39307 39308 39309 39310 39311 39312 39313 39314 39315 39316 39317 39318 39319 39320 39321 39322 39323 39324 39325 39326 39327 39328 39329 39330 39331 39332 39333 39334 39335 39336 39337 39338 39339 39340 39341 39342 39343 39344 39345 39346 39347 39348 39349 39350 39351 39352 39353 39354 39355 39356 39357 39358 39359 39360 39361 39362 39363 39364 39365 39366 39367 39368 39369 39370 39371 39372 39373 39374 39375 39376 39377 39378 39379 39380 39381 39382 39383 39384 39385 39386 39387 |
# File 'lib/ovirtsdk4/services.rb', line 39292 def service(path) if path.nil? || path == '' return self end if path == 'affinitylabels' return affinity_labels_service end if path.start_with?('affinitylabels/') return affinity_labels_service.service(path[15..-1]) end if path == 'devices' return devices_service end if path.start_with?('devices/') return devices_service.service(path[8..-1]) end if path == 'externalnetworkproviderconfigurations' return external_network_provider_configurations_service end if path.start_with?('externalnetworkproviderconfigurations/') return external_network_provider_configurations_service.service(path[38..-1]) end if path == 'fenceagents' return fence_agents_service end if path.start_with?('fenceagents/') return fence_agents_service.service(path[12..-1]) end if path == 'hooks' return hooks_service end if path.start_with?('hooks/') return hooks_service.service(path[6..-1]) end if path == 'katelloerrata' return katello_errata_service end if path.start_with?('katelloerrata/') return katello_errata_service.service(path[14..-1]) end if path == 'networkattachments' return end if path.start_with?('networkattachments/') return .service(path[19..-1]) end if path == 'nics' return nics_service end if path.start_with?('nics/') return nics_service.service(path[5..-1]) end if path == 'numanodes' return numa_nodes_service end if path.start_with?('numanodes/') return numa_nodes_service.service(path[10..-1]) end if path == 'permissions' return end if path.start_with?('permissions/') return .service(path[12..-1]) end if path == 'statistics' return statistics_service end if path.start_with?('statistics/') return statistics_service.service(path[11..-1]) end if path == 'storage' return storage_service end if path.start_with?('storage/') return storage_service.service(path[8..-1]) end if path == 'storageconnectionextensions' return storage_connection_extensions_service end if path.start_with?('storageconnectionextensions/') return storage_connection_extensions_service.service(path[28..-1]) end if path == 'tags' return end if path.start_with?('tags/') return .service(path[5..-1]) end if path == 'unmanagednetworks' return unmanaged_networks_service end if path.start_with?('unmanagednetworks/') return unmanaged_networks_service.service(path[18..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#setup_networks(opts = {}) ⇒ Object
This method is used to change the configuration of the network interfaces of a host.
For example, if you have a host with three network interfaces eth0
, eth1
and eth2
and you want to configure
a new bond using eth0
and eth1
, and put a VLAN on top of it. Using a simple shell script and the curl
command line HTTP client that can be done as follows:
#!/bin/sh -ex
url="https://engine.example.com/ovirt-engine/api"
user="[email protected]"
password="..."
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request POST \
--header "Version: 4" \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '
<action>
<modified_bonds>
<host_nic>
<name>bond0</name>
<bonding>
<options>
<option>
<name>mode</name>
<value>4</value>
</option>
<option>
<name>miimon</name>
<value>100</value>
</option>
</options>
<slaves>
<host_nic>
<name>eth1</name>
</host_nic>
<host_nic>
<name>eth2</name>
</host_nic>
</slaves>
</bonding>
</host_nic>
</modified_bonds>
<modified_network_attachments>
<network_attachment>
<network>
<name>myvlan</name>
</network>
<host_nic>
<name>bond0</name>
</host_nic>
<ip_address_assignments>
<ip_address_assignment>
<assignment_method>static</assignment_method>
<ip>
<address>192.168.122.10</address>
<netmask>255.255.255.0</netmask>
</ip>
</ip_address_assignment>
</ip_address_assignments>
<dns_resolver_configuration>
<name_servers>
<name_server>1.1.1.1</name_server>
<name_server>2.2.2.2</name_server>
</name_servers>
</dns_resolver_configuration>
</network_attachment>
</modified_network_attachments>
</action>
' \
"${url}/hosts/1ff7a191-2f3b-4eff-812b-9f91a30c3acc/setupnetworks"
Note
|
This is valid for version 4 of the API. In previous versions some elements were represented as XML
attributes instead of XML elements. In particular the options and ip elements were represented as follows:
|
<options name="mode" value="4"/>
<options name="miimon" value="100"/>
<ip address="192.168.122.10" netmask="255.255.255.0"/>
The same thing can be done using the Python SDK with the following code:
# Find the service that manages the collection of hosts:
hosts_service = connection.system_service().hosts_service()
# Find the host:
host = hosts_service.list(search='name=myhost')[0]
# Find the service that manages the host:
host_service = hosts_service.host_service(host.id)
# Configure the network adding a bond with two slaves and attaching it to a
# network with an static IP address:
host_service.setup_networks(
modified_bonds=[
types.HostNic(
name='bond0',
bonding=types.Bonding(
options=[
types.Option(
name='mode',
value='4',
),
types.Option(
name='miimon',
value='100',
),
],
slaves=[
types.HostNic(
name='eth1',
),
types.HostNic(
name='eth2',
),
],
),
),
],
modified_network_attachments=[
types.NetworkAttachment(
network=types.Network(
name='myvlan',
),
host_nic=types.HostNic(
name='bond0',
),
ip_address_assignments=[
types.IpAddressAssignment(
assignment_method=types.BootProtocol.STATIC,
ip=types.Ip(
address='192.168.122.10',
netmask='255.255.255.0',
),
),
],
dns_resolver_configuration=types.DnsResolverConfiguration(
name_servers=[
'1.1.1.1',
'2.2.2.2',
],
),
),
],
)
# After modifying the network configuration it is very important to make it
# persistent:
host_service.commit_net_config()
Important
|
To make sure that the network configuration has been saved in the host, and that it will be applied when the host is rebooted, remember to call commitnetconfig. |
Important
|
Since engine-name 4.3, it is possible to also specify commit_on_success in
the setupnetworks request, in which case the new
configuration is automatically saved in the hypervisor-name upon completing the setup and
re-establishing connectivity between the hypervisor-name and engine-name, and without
waiting for a separate commitnetconfig request.
|
38703 38704 38705 |
# File 'lib/ovirtsdk4/services.rb', line 38703 def setup_networks(opts = {}) internal_action(:setupnetworks, nil, SETUP_NETWORKS, opts) end |
#statistics_service ⇒ StatisticsService
Locates the statistics
service.
39245 39246 39247 |
# File 'lib/ovirtsdk4/services.rb', line 39245 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |
#storage_connection_extensions_service ⇒ StorageServerConnectionExtensionsService
A reference to storage connection extensions.
39263 39264 39265 |
# File 'lib/ovirtsdk4/services.rb', line 39263 def storage_connection_extensions_service @storage_connection_extensions_service ||= StorageServerConnectionExtensionsService.new(self, 'storageconnectionextensions') end |
#storage_service ⇒ HostStorageService
A reference to the service that manages the host’s storage.
39254 39255 39256 |
# File 'lib/ovirtsdk4/services.rb', line 39254 def storage_service @storage_service ||= HostStorageService.new(self, 'storage') end |
#sync_all_networks(opts = {}) ⇒ Object
To synchronize all networks on the host, send a request like this:
POST /ovirt-engine/api/hosts/123/syncallnetworks
With a request body like this:
<action/>
38741 38742 38743 |
# File 'lib/ovirtsdk4/services.rb', line 38741 def sync_all_networks(opts = {}) internal_action(:syncallnetworks, nil, SYNC_ALL_NETWORKS, opts) end |
#tags_service ⇒ AssignedTagsService
A reference to the host tags service. Use this service to manage tags on the host object.
39272 39273 39274 |
# File 'lib/ovirtsdk4/services.rb', line 39272 def @tags_service ||= AssignedTagsService.new(self, 'tags') end |
#unmanaged_networks_service ⇒ UnmanagedNetworksService
A reference to unmanaged networks.
39281 39282 39283 |
# File 'lib/ovirtsdk4/services.rb', line 39281 def unmanaged_networks_service @unmanaged_networks_service ||= UnmanagedNetworksService.new(self, 'unmanagednetworks') end |
#unregistered_storage_domains_discover(opts = {}) ⇒ Object
Discovers the block Storage Domains which are candidates to be imported to the setup. For FCP no arguments are required.
38773 38774 38775 |
# File 'lib/ovirtsdk4/services.rb', line 38773 def unregistered_storage_domains_discover(opts = {}) internal_action(:unregisteredstoragedomainsdiscover, :storage_domains, UNREGISTERED_STORAGE_DOMAINS_DISCOVER, opts) end |
#update(host, opts = {}) ⇒ Host
Update the host properties.
For example, to update a the kernel command line of a host send a request like this:
PUT /ovirt-engine/api/hosts/123
With request body like this:
<host>
<os>
<custom_kernel_cmdline>vfio_iommu_type1.allow_unsafe_interrupts=1</custom_kernel_cmdline>
</os>
</host>
38820 38821 38822 |
# File 'lib/ovirtsdk4/services.rb', line 38820 def update(host, opts = {}) internal_update(host, Host, UPDATE, opts) end |
#update_using_root_password(host, opts = {}) ⇒ Host
Update the specified host in the system. This is deprecated and is provided only for backwards compatibility.
39014 39015 39016 |
# File 'lib/ovirtsdk4/services.rb', line 39014 def update_using_root_password(host, opts = {}) internal_update(host, Host, UPDATE_USING_ROOT_PASSWORD, opts) end |
#update_using_ssh(host, opts = {}) ⇒ Host
Updates the specified host in the system.
39142 39143 39144 |
# File 'lib/ovirtsdk4/services.rb', line 39142 def update_using_ssh(host, opts = {}) internal_update(host, Host, UPDATE_USING_SSH, opts) end |
#upgrade(opts = {}) ⇒ Object
Upgrades VDSM and selected software on the host.
38861 38862 38863 |
# File 'lib/ovirtsdk4/services.rb', line 38861 def upgrade(opts = {}) internal_action(:upgrade, nil, UPGRADE, opts) end |
#upgrade_check(opts = {}) ⇒ Object
Check if there are upgrades available for the host. If there are upgrades available an icon will be displayed next to host status icon in the Administration Portal. Audit log messages are also added to indicate the availability of upgrades. The upgrade can be started from the webadmin or by using the upgrade host action.
38887 38888 38889 |
# File 'lib/ovirtsdk4/services.rb', line 38887 def upgrade_check(opts = {}) internal_action(:upgradecheck, nil, UPGRADE_CHECK, opts) end |