class OvirtSDK4::GlusterBrickService

Constants

GET
REMOVE
REPLACE

Public Instance Methods

get(opts = {}) click to toggle source

Get details of a brick.

Retrieves status details of brick from underlying gluster volume with header `All-Content` set to `true`. This is the equivalent of running `gluster volume status <volumename> <brickname> detail`.

For example, to get the details of brick `234` of gluster volume `123`, send a request like this:

source

GET /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/234


Which will return a response body like this:

source,xml

<brick id=“234”>

<name>host1:/rhgs/data/brick1</name>
<brick_dir>/rhgs/data/brick1</brick_dir>
<server_id>111</server_id>
<status>up</status>
<device>/dev/mapper/RHGS_vg1-lv_vmaddldisks</device>
<fs_name>xfs</fs_name>
<gluster_clients>
  <gluster_client>
    <bytes_read>2818417648</bytes_read>
    <bytes_written>1384694844</bytes_written>
    <client_port>1011</client_port>
    <host_name>client2</host_name>
  </gluster_client>
</gluster_clients>
<memory_pools>
  <memory_pool>
    <name>data-server:fd_t</name>
    <alloc_count>1626348</alloc_count>
    <cold_count>1020</cold_count>
    <hot_count>4</hot_count>
    <max_alloc>23</max_alloc>
    <max_stdalloc>0</max_stdalloc>
    <padded_size>140</padded_size>
    <pool_misses>0</pool_misses>
  </memory_pool>
</memory_pools>
<mnt_options>rw,seclabel,noatime,nodiratime,attr2,inode64,sunit=512,swidth=2048,noquota</mnt_options>
<pid>25589</pid>
<port>49155</port>

</brick>


@param opts [Hash] Additional options.

@option opts [String] :follow Indicates which inner links should be followed. The objects referenced by these links will be fetched as part

of the current request. See <<documents/003_common_concepts/follow, here>> for details.

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (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.

@option opts [Boolean] :wait (true) If `true` wait for the response.

@return [GlusterBrick]

# File lib/ovirtsdk4/services.rb, line 38131
def get(opts = {})
  internal_get(GET, opts)
end
remove(opts = {}) click to toggle source

Removes a brick.

Removes a brick from the underlying gluster volume and deletes entries from database. This can be used only when removing a single brick without data migration. To remove multiple bricks and with data migration, use xref:services-gluster_bricks-methods-migrate instead.

For example, to delete brick `234` from gluster volume `123`, send a request like this:

source

DELETE /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/234


@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the remove should be performed asynchronously. @option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (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.

@option opts [Boolean] :wait (true) If `true` wait for the response.

# File lib/ovirtsdk4/services.rb, line 38167
def remove(opts = {})
  internal_remove(REMOVE, opts)
end
replace(opts = {}) click to toggle source

Replaces this brick with a new one.

IMPORTANT: This operation has been deprecated since version 3.5 of the engine and will be removed in the future. Use xref:services-gluster_bricks-methods-add[add brick(s)] and xref:services-gluster_bricks-methods-migrate[migrate brick(s)] instead.

@param opts [Hash] Additional options.

@option opts [Boolean] :async Indicates if the replacement should be performed asynchronously.

@option opts [Boolean] :force

@option opts [Hash] :headers ({}) Additional HTTP headers.

@option opts [Hash] :query ({}) Additional URL query parameters.

@option opts [Integer] :timeout (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.

@option opts [Boolean] :wait (true) If `true` wait for the response.

# File lib/ovirtsdk4/services.rb, line 38200
def replace(opts = {})
  internal_action(:replace, nil, REPLACE, opts)
end
service(path) click to toggle source

Locates the service corresponding to the given path.

@param path [String] The path of the service.

@return [Service] A reference to the service.

# File lib/ovirtsdk4/services.rb, line 38220
def service(path)
  if path.nil? || path == ''
    return self
  end
  if path == 'statistics'
    return statistics_service
  end
  if path.start_with?('statistics/')
    return statistics_service.service(path[11..-1])
  end
  raise Error.new("The path \"#{path}\" doesn't correspond to any service")
end
statistics_service() click to toggle source

Locates the `statistics` service.

@return [StatisticsService] A reference to `statistics` service.

# File lib/ovirtsdk4/services.rb, line 38209
def statistics_service
  @statistics_service ||= StatisticsService.new(self, 'statistics')
end