Class: OvirtSDK4::ExternalHostProvidersService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(provider, opts = {}) ⇒ ExternalHostProvider
Adds a new external host provider to the system.
-
#list(opts = {}) ⇒ Array<ExternalHostProvider>
Returns the list of external host providers.
-
#provider_service(id) ⇒ ExternalHostProviderService
Locates the
provider
service. -
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(provider, opts = {}) ⇒ ExternalHostProvider
Adds a new external host provider to the system.
8801 8802 8803 |
# File 'lib/ovirtsdk4/services.rb', line 8801 def add(provider, opts = {}) internal_add(provider, ExternalHostProvider, ADD, opts) end |
#list(opts = {}) ⇒ Array<ExternalHostProvider>
Returns the list of external host providers.
The order of the returned list of host providers is not guaranteed.
8838 8839 8840 |
# File 'lib/ovirtsdk4/services.rb', line 8838 def list(opts = {}) internal_get(LIST, opts) end |
#provider_service(id) ⇒ ExternalHostProviderService
Locates the provider
service.
8849 8850 8851 |
# File 'lib/ovirtsdk4/services.rb', line 8849 def provider_service(id) ExternalHostProviderService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 |
# File 'lib/ovirtsdk4/services.rb', line 8860 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return provider_service(path) end return provider_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |