Class: OvirtSDK4::IscsiBondService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ IscsiBond
Returns the representation of the object managed by this service.
-
#networks_service ⇒ NetworksService
Locates the
networksservice. -
#remove(opts = {}) ⇒ Object
Removes of an existing iSCSI bond.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#storage_server_connections_service ⇒ StorageServerConnectionsService
Locates the
storage_server_connectionsservice. -
#update(bond, opts = {}) ⇒ IscsiBond
Updates an iSCSI bond.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ IscsiBond
Returns the representation of the object managed by this service.
14507 14508 14509 |
# File 'lib/ovirtsdk4/services.rb', line 14507 def get(opts = {}) internal_get(GET, opts) end |
#networks_service ⇒ NetworksService
Locates the networks service.
14592 14593 14594 |
# File 'lib/ovirtsdk4/services.rb', line 14592 def networks_service @networks_service ||= NetworksService.new(self, 'networks') end |
#remove(opts = {}) ⇒ Object
Removes of an existing iSCSI bond.
For example, to remove the iSCSI bond 456 send a request like this:
DELETE /ovirt-engine/api/datacenters/123/iscsibonds/456 HTTP/1.1
14538 14539 14540 |
# File 'lib/ovirtsdk4/services.rb', line 14538 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 |
# File 'lib/ovirtsdk4/services.rb', line 14612 def service(path) if path.nil? || path == '' return self end if path == 'networks' return networks_service end if path.start_with?('networks/') return networks_service.service(path[9..-1]) end if path == 'storageserverconnections' return storage_server_connections_service end if path.start_with?('storageserverconnections/') return storage_server_connections_service.service(path[25..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#storage_server_connections_service ⇒ StorageServerConnectionsService
Locates the storage_server_connections service.
14601 14602 14603 |
# File 'lib/ovirtsdk4/services.rb', line 14601 def storage_server_connections_service @storage_server_connections_service ||= StorageServerConnectionsService.new(self, 'storageserverconnections') end |
#update(bond, opts = {}) ⇒ IscsiBond
Updates an iSCSI bond.
Updating of an iSCSI bond can be done on the name and the description attributes only. For example, to
update the iSCSI bond 456 of data center 123, send a request like this:
PUT /ovirt-engine/api/datacenters/123/iscsibonds/1234 HTTP/1.1
The request body should look like this:
<iscsi_bond>
<name>mybond</name>
<description>My iSCSI bond</description>
</iscsi_bond>
14583 14584 14585 |
# File 'lib/ovirtsdk4/services.rb', line 14583 def update(bond, opts = {}) internal_update(bond, IscsiBond, UPDATE, opts) end |