Class: OvirtSDK4::IscsiBondService

Inherits:
Service
  • Object
show all
Defined in:
lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb

Instance Method Summary collapse

Methods inherited from Service

#inspect, #to_s

Instance Method Details

#get(opts = {}) ⇒ IscsiBond

Returns the representation of the object managed by this service.

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :follow (String)

    Indicates which inner links should be followed. The objects referenced by these links will be fetched as part of the current request. See here for details.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.

Returns:



14689
14690
14691
# File 'lib/ovirtsdk4/services.rb', line 14689

def get(opts = {})
  internal_get(GET, opts)
end

#networks_serviceNetworksService

Locates the networks service.

Returns:



14777
14778
14779
# File 'lib/ovirtsdk4/services.rb', line 14777

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

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the remove should be performed asynchronously.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.



14721
14722
14723
# File 'lib/ovirtsdk4/services.rb', line 14721

def remove(opts = {})
  internal_remove(REMOVE, opts)
end

#service(path) ⇒ Service

Locates the service corresponding to the given path.

Parameters:

  • path (String)

    The path of the service.

Returns:

  • (Service)

    A reference to the service.

Raises:



14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
# File 'lib/ovirtsdk4/services.rb', line 14797

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_serviceStorageServerConnectionsService

Locates the storage_server_connections service.

Returns:



14786
14787
14788
# File 'lib/ovirtsdk4/services.rb', line 14786

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

The request body should look like this:

<iscsi_bond>
   <name>mybond</name>
   <description>My iSCSI bond</description>
</iscsi_bond>

Parameters:

  • bond (IscsiBond)

    The iSCSI bond to update.

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the update should be performed asynchronously.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.

Returns:



14768
14769
14770
# File 'lib/ovirtsdk4/services.rb', line 14768

def update(bond, opts = {})
  internal_update(bond, IscsiBond, UPDATE, opts)
end