Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get block devices for Ceph OSD

GET /provider/ceph/preflight/block_devices

Lists block devices available at given host. This list can be used to choose device to be formatted for use by Ceph Blockdevice OSD.

Query parameters

Parameter Type & Description
host required
string

Host for which block devices should be returned.

Request Examples

Shell
onepanel-rest-cli -u onepanel:$PASSPHRASE getBlockDevices --host https://$HOST:9443

Responses

application/json
200

The block devices description.

PropertyType & Description
blockDevices
array of objects

List of available block devices.

type
string

Device type, as returned by lsblk.

Enum:
diskpart
host required
string

Host on which the device is available.

path required
string
size required
integer

Device size in bytes.

mounted required
boolean

Result of heuristic attempt to detect whether a device or any of its children is mounted.

Example

application/json
{
  "block_devices": [
    {
      "path": "/dev/sda",
      "size": 10000000000,
      "mounted": false
    },
    {
      "path": "/dev/sdb",
      "size": 20000000000,
      "mounted": true
    },
    {
      "path": "/dev/sr0",
      "size": 1073741312,
      "mounted": false
    }
  ]
}
401

Unauthorized request.

403

Forbidden request.

404

Host is not in the cluster.

500

Internal server error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}