Class: OvirtSDK4::ExternalHostProvidersService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(provider, opts = {}) ⇒ ExternalHostProvider
Add 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
Add a new external host provider to the system.
9763 9764 9765 |
# File 'lib/ovirtsdk4/services.rb', line 9763 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 isn’t guaranteed.
9800 9801 9802 |
# File 'lib/ovirtsdk4/services.rb', line 9800 def list(opts = {}) internal_get(LIST, opts) end |
#provider_service(id) ⇒ ExternalHostProviderService
Locates the provider
service.
9811 9812 9813 |
# File 'lib/ovirtsdk4/services.rb', line 9811 def provider_service(id) ExternalHostProviderService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 |
# File 'lib/ovirtsdk4/services.rb', line 9822 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 |