Class: OvirtSDK4::StorageServerConnectionExtensionsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(extension, opts = {}) ⇒ StorageConnectionExtension
Creates a new storage server connection extension for the given host.
-
#list(opts = {}) ⇒ Array<StorageConnectionExtension>
Returns the list os storage connection extensions.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#storage_connection_extension_service(id) ⇒ StorageServerConnectionExtensionService
Locates the
storage_connection_extensionservice.
Methods inherited from Service
Instance Method Details
#add(extension, opts = {}) ⇒ StorageConnectionExtension
Creates a new storage server connection extension for the given host.
The extension lets the user define credentials for an iSCSI target for a specific host. For example to use
myuser and mypassword as the credentials when connecting to the iSCSI target from host 123 send a request
like this:
POST /ovirt-engine/api/hosts/123/storageconnectionextensions HTTP/1.1
With a request body like this:
<storage_connection_extension>
<target>iqn.2016-01.com.example:mytarget</target>
<username>myuser</username>
<password>mypassword</password>
</storage_connection_extension>
24785 24786 24787 |
# File 'lib/ovirtsdk4/services.rb', line 24785 def add(extension, opts = {}) internal_add(extension, StorageConnectionExtension, ADD, opts) end |
#list(opts = {}) ⇒ Array<StorageConnectionExtension>
Returns the list os storage connection extensions.
The order of the returned list of storage connections isn’t guaranteed.
24819 24820 24821 |
# File 'lib/ovirtsdk4/services.rb', line 24819 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
24841 24842 24843 24844 24845 24846 24847 24848 24849 24850 |
# File 'lib/ovirtsdk4/services.rb', line 24841 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return storage_connection_extension_service(path) end return storage_connection_extension_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |
#storage_connection_extension_service(id) ⇒ StorageServerConnectionExtensionService
Locates the storage_connection_extension service.
24830 24831 24832 |
# File 'lib/ovirtsdk4/services.rb', line 24830 def storage_connection_extension_service(id) StorageServerConnectionExtensionService.new(self, id) end |