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.
9783 9784 9785 |
# File 'lib/ovirtsdk4/services.rb', line 9783 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.
9820 9821 9822 |
# File 'lib/ovirtsdk4/services.rb', line 9820 def list(opts = {}) internal_get(LIST, opts) end |
#provider_service(id) ⇒ ExternalHostProviderService
Locates the provider
service.
9831 9832 9833 |
# File 'lib/ovirtsdk4/services.rb', line 9831 def provider_service(id) ExternalHostProviderService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 |
# File 'lib/ovirtsdk4/services.rb', line 9842 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 |