Class: OvirtSDK4::ExternalHostProviderService
- Inherits:
-
ExternalProviderService
- Object
- Service
- ExternalProviderService
- OvirtSDK4::ExternalHostProviderService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#certificates_service ⇒ ExternalProviderCertificatesService
A service to view certificates for this external provider.
-
#compute_resources_service ⇒ ExternalComputeResourcesService
Locates the
compute_resources
service. -
#discovered_hosts_service ⇒ ExternalDiscoveredHostsService
Locates the
discovered_hosts
service. -
#get(opts = {}) ⇒ ExternalHostProvider
Get external host provider information.
-
#host_groups_service ⇒ ExternalHostGroupsService
Locates the
host_groups
service. -
#hosts_service ⇒ ExternalHostsService
Locates the
hosts
service. -
#import_certificates(opts = {}) ⇒ Object
Import the SSL certificates of the external host provider.
-
#remove(opts = {}) ⇒ Object
Deletes the object managed by this service.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#test_connectivity(opts = {}) ⇒ Object
In order to test connectivity for external provider we need to run following request where 123 is an id of a provider.
-
#update(provider, opts = {}) ⇒ ExternalHostProvider
Update the specified external host provider in the system.
Methods inherited from Service
Instance Method Details
#certificates_service ⇒ ExternalProviderCertificatesService
A service to view certificates for this external provider.
35052 35053 35054 |
# File 'lib/ovirtsdk4/services.rb', line 35052 def certificates_service @certificates_service ||= ExternalProviderCertificatesService.new(self, 'certificates') end |
#compute_resources_service ⇒ ExternalComputeResourcesService
Locates the compute_resources
service.
35061 35062 35063 |
# File 'lib/ovirtsdk4/services.rb', line 35061 def compute_resources_service @compute_resources_service ||= ExternalComputeResourcesService.new(self, 'computeresources') end |
#discovered_hosts_service ⇒ ExternalDiscoveredHostsService
Locates the discovered_hosts
service.
35070 35071 35072 |
# File 'lib/ovirtsdk4/services.rb', line 35070 def discovered_hosts_service @discovered_hosts_service ||= ExternalDiscoveredHostsService.new(self, 'discoveredhosts') end |
#get(opts = {}) ⇒ ExternalHostProvider
Get external host provider information
Host provider, Foreman or Satellite, can be set as an external provider in ovirt. To see details about specific host providers attached to ovirt use this API.
For example, to get the details of host provider 123
, send a request like this:
GET /ovirt-engine/api/externalhostproviders/123
The response will be like this:
<external_host_provider href="/ovirt-engine/api/externalhostproviders/123" id="123">
<name>mysatellite</name>
<requires_authentication>true</requires_authentication>
<url>https://mysatellite.example.com</url>
<username>admin</username>
</external_host_provider>
34931 34932 34933 |
# File 'lib/ovirtsdk4/services.rb', line 34931 def get(opts = {}) internal_get(GET, opts) end |
#host_groups_service ⇒ ExternalHostGroupsService
Locates the host_groups
service.
35079 35080 35081 |
# File 'lib/ovirtsdk4/services.rb', line 35079 def host_groups_service @host_groups_service ||= ExternalHostGroupsService.new(self, 'hostgroups') end |
#hosts_service ⇒ ExternalHostsService
Locates the hosts
service.
35088 35089 35090 |
# File 'lib/ovirtsdk4/services.rb', line 35088 def hosts_service @hosts_service ||= ExternalHostsService.new(self, 'hosts') end |
#import_certificates(opts = {}) ⇒ Object
Import the SSL certificates of the external host provider.
34957 34958 34959 |
# File 'lib/ovirtsdk4/services.rb', line 34957 def import_certificates(opts = {}) internal_action(:importcertificates, nil, IMPORT_CERTIFICATES, opts) end |
#remove(opts = {}) ⇒ Object
Deletes the object managed by this service.
34982 34983 34984 |
# File 'lib/ovirtsdk4/services.rb', line 34982 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
35099 35100 35101 35102 35103 35104 35105 35106 35107 35108 35109 35110 35111 35112 35113 35114 35115 35116 35117 35118 35119 35120 35121 35122 35123 35124 35125 35126 35127 35128 35129 35130 35131 35132 35133 35134 |
# File 'lib/ovirtsdk4/services.rb', line 35099 def service(path) if path.nil? || path == '' return self end if path == 'certificates' return certificates_service end if path.start_with?('certificates/') return certificates_service.service(path[13..-1]) end if path == 'computeresources' return compute_resources_service end if path.start_with?('computeresources/') return compute_resources_service.service(path[17..-1]) end if path == 'discoveredhosts' return discovered_hosts_service end if path.start_with?('discoveredhosts/') return discovered_hosts_service.service(path[16..-1]) end if path == 'hostgroups' return host_groups_service end if path.start_with?('hostgroups/') return host_groups_service.service(path[11..-1]) end if path == 'hosts' return hosts_service end if path.start_with?('hosts/') return hosts_service.service(path[6..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#test_connectivity(opts = {}) ⇒ Object
In order to test connectivity for external provider we need to run following request where 123 is an id of a provider.
POST /ovirt-engine/api/externalhostproviders/123/testconnectivity
35014 35015 35016 |
# File 'lib/ovirtsdk4/services.rb', line 35014 def test_connectivity(opts = {}) internal_action(:testconnectivity, nil, TEST_CONNECTIVITY, opts) end |
#update(provider, opts = {}) ⇒ ExternalHostProvider
Update the specified external host provider in the system.
35043 35044 35045 |
# File 'lib/ovirtsdk4/services.rb', line 35043 def update(provider, opts = {}) internal_update(provider, ExternalHostProvider, UPDATE, opts) end |