XSKY block-volumes API
BlockVolumeController Operations about Block
BlockVolumeController Operations about Block
swagger: '2.0'
info:
description: XMS is the controller of distributed storage system
version: SDS_4.2.000.0.200302
title: XMS access-paths block-volumes API
contact: {}
license:
name: Commercial
basePath: /v1
tags:
- name: block-volumes
description: 'BlockVolumeController Operations about Block
'
paths:
/block-volumes/:
get:
tags:
- block-volumes
description: List block volumes
operationId: ListBlockVolumes
consumes:
- application/json
produces:
- application/json
parameters:
- name: limit
in: query
description: paging param
required: false
type: integer
format: int64
x-exportParamName: Limit
- name: offset
in: query
description: paging param
required: false
type: integer
format: int64
x-exportParamName: Offset
- name: pool_id
in: query
description: The id of the pool volumes belong to
required: false
type: integer
format: int64
x-exportParamName: PoolId
- name: block_snapshot_id
in: query
description: related snapshot id
required: false
type: integer
format: int64
x-exportParamName: BlockSnapshotId
- name: name
in: query
description: name of volume
required: false
type: string
x-exportParamName: Name
- name: client_group_id
in: query
description: related client group id
required: false
type: integer
format: int64
x-exportParamName: ClientGroupId
- name: mapping_group_id
in: query
description: related mapping group id
required: false
type: integer
format: int64
x-exportParamName: MappingGroupId
- name: access_path_id
in: query
description: related access path id
required: false
type: integer
format: int64
x-exportParamName: AccessPathId
- name: passive
in: query
description: passive or not
required: false
type: boolean
x-exportParamName: Passive
- name: recycled
in: query
description: recycled or not
required: false
type: boolean
x-exportParamName: Recycled
- name: q
in: query
description: query param of search
required: false
type: string
x-exportParamName: Q
- name: sort
in: query
description: sort param of search
required: false
type: string
x-exportParamName: Sort
- name: all
in: query
description: show all volumes
required: false
type: boolean
x-exportParamName: All
- name: dp_block_backup_policy_id
in: query
description: show volumes of specific dp block backup policy
required: false
type: integer
format: int64
x-exportParamName: DpBlockBackupPolicyId
responses:
200:
description: OK
schema:
$ref: '#/definitions/VolumesResp'
400:
description: BadRequest
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
post:
tags:
- block-volumes
description: Create block volume
operationId: CreateBlockVolume
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: volume info
required: true
schema:
$ref: '#/definitions/VolumeCreateReq'
x-exportParamName: Body
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/samples:
get:
tags:
- block-volumes
description: Get samples of multiple block volumes
operationId: BatchGetBlockVolumeSamples
consumes:
- application/json
produces:
- application/json
parameters: []
responses:
200:
description: OK
schema:
$ref: '#/definitions/MultiVolumesSamplesResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:
get:
tags:
- block-volumes
description: get a block volume
operationId: GetBlockVolume
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
responses:
200:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
delete:
tags:
- block-volumes
description: Delete block volume
operationId: DeleteBlockVolume
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- name: bypass_trash
in: query
description: bypass trash or not
required: false
type: boolean
x-exportParamName: BypassTrash
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInHeader: []
- tokenInQuery: []
patch:
tags:
- block-volumes
description: Update block volume info
operationId: UpdateBlockVolume
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: the block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: volume info
required: true
schema:
$ref: '#/definitions/VolumeUpdateReq'
x-exportParamName: Body
responses:
200:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInHeader: []
- tokenInQuery: []
/block-volumes/{block_volume_id}/samples:
get:
tags:
- block-volumes
description: get a block volume's Samples
operationId: GetBlockVolumeSamples
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- name: duration_begin
in: query
description: duration begin timestamp
required: false
type: string
x-exportParamName: DurationBegin
- name: duration_end
in: query
description: duration end timestamp
required: false
type: string
x-exportParamName: DurationEnd
- name: period
in: query
description: samples period
required: false
type: string
x-exportParamName: Period
responses:
200:
description: OK
schema:
$ref: '#/definitions/VolumeSamplesResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:migrate:
post:
tags:
- block-volumes
operationId: MigrateBlockVolume
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: the block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: volume migration info
required: true
schema:
$ref: '#/definitions/VolumeMigrateReq'
x-exportParamName: Body
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:rebuild-replication:
post:
tags:
- block-volumes
description: Rebuild block volume replication
operationId: RebuildBlockVolumeReplication
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- name: force
in: query
description: force rebuild or not
required: false
type: boolean
x-exportParamName: Force
responses:
202:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:set-backup-protection:
post:
tags:
- block-volumes
description: Set backup protection for a block volume
operationId: SetBackupProtection
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: the block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: request info
required: true
schema:
$ref: '#/definitions/VolumeBackupProtectionReq'
x-exportParamName: Body
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:set-crc:
post:
tags:
- block-volumes
description: Set block volume crc
operationId: SetBlockVolumeCrc
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: volume crc info
required: true
schema:
$ref: '#/definitions/VolumeCrcSetReq'
x-exportParamName: Body
responses:
200:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:set-replication:
post:
tags:
- block-volumes
description: Set block volume replication
operationId: SetBlockVolumeReplication
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: volume replication info
required: true
schema:
$ref: '#/definitions/VolumeReplicationSetReq'
x-exportParamName: Body
responses:
202:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:set-snapshot-protection:
post:
tags:
- block-volumes
description: Set snapshot protection for a block volume
operationId: SetSnapshotProtection
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: the block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: request info
required: true
schema:
$ref: '#/definitions/VolumeSnapshotProtectionReq'
x-exportParamName: Body
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:suspend-replication:
post:
tags:
- block-volumes
description: Suspend block volume replication
operationId: SuspendBlockVolumeReplication
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
responses:
202:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:unset-backup-protection:
post:
tags:
- block-volumes
description: Unset backup protection for a block volume
operationId: UnsetBackupProtection
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: the block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- name: force
in: query
description: force unset or not
required: false
type: boolean
x-exportParamName: Force
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:unset-crc:
post:
tags:
- block-volumes
description: Unset block volume crc
operationId: UnsetBlockVolumeCrc
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- in: body
name: body
description: volume crc info
required: true
schema:
$ref: '#/definitions/VolumeCrcSetReq'
x-exportParamName: Body
responses:
200:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:unset-replication:
post:
tags:
- block-volumes
description: Unset block volume replication
operationId: SetBlockVolumeReplication
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
responses:
202:
description: OK
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
409:
description: Conflict
500:
description: InternalServerError
security:
- tokenInQuery: []
- tokenInHeader: []
/block-volumes/{block_volume_id}:unset-snapshot-protection:
post:
tags:
- block-volumes
description: Unset snapshot protection for a block volume
operationId: UnsetSnapshotProtection
consumes:
- application/json
produces:
- application/json
parameters:
- name: block_volume_id
in: path
description: the block volume id
required: true
type: integer
format: int64
x-exportParamName: BlockVolumeId
- name: force
in: query
description: force unset or not
required: false
type: boolean
x-exportParamName: Force
responses:
202:
description: Accepted
schema:
$ref: '#/definitions/VolumeResp'
400:
description: BadRequest
404:
description: NotFound
500:
description: InternalServerError
security:
- tokenInHeader: []
- tokenInQuery: []
definitions:
VolumeRecord:
title: VolumeRecord
allOf:
- $ref: '#/definitions/Volume'
- properties:
samples:
type: array
items:
$ref: '#/definitions/VolumeStat'
description: VolumeRecord defines the response content of volume related API
DpBlockReplicationPolicy_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
title: DpBlockReplicationPolicy_Nestview
TrashResource_Nestview:
type: object
properties:
create:
type: string
format: date-time
expire_time:
type: string
format: date-time
id:
type: integer
format: int64
resource_id:
type: integer
format: int64
resource_type:
type: string
title: TrashResource_Nestview
VolumeReplicationSetReq:
type: object
properties:
block_volume:
$ref: '#/definitions/VolumeReplicationSetReq_Volume'
title: VolumeReplicationSetReq
example:
block_volume:
dest_pool_id: 0
dest_volume_name: dest_volume_name
dp_block_replication_policy_id: 6
VolumeCreateReq:
type: object
required:
- block_volume
properties:
block_volume:
$ref: '#/definitions/VolumeCreateReq_Volume'
title: VolumeCreateReq
example:
block_volume:
flattened: true
replication_pool: replication_pool
replication_version: 2
format: 6
description: description
pool_id: 5
performance_priority: 1
qos:
burst_total_iops: 2
max_total_iops: 9
burst_total_bw: 5
max_total_bw: 7
replication_pool_id: 3
replication_pool_name: replication_pool_name
size: 7
replication_volume: replication_volume
replication_volume_name: replication_volume_name
snapshot_replication_volume: snapshot_replication_volume
block_snapshot_id: 0
name: name
snapshot_replication_pool_id: 1
snapshot_replication_volume_id: 1
remote_cluster_fs_id: remote_cluster_fs_id
snapshot_replication_pool: snapshot_replication_pool
crc_check: true
sn: sn
replication_volume_id: 4
qos_enabled: true
VolumeFailedTask:
type: object
properties:
abort:
type: number
format: double
busy:
type: number
format: double
check_cond:
type: number
format: double
resv_conflict:
type: number
format: double
title: VolumeFailedTask
example:
abort: 7.061401241503109
busy: 9.301444243932576
check_cond: 3.616076749251911
resv_conflict: 2.027123023002322
Paging:
type: object
properties:
count:
type: integer
format: int64
duration:
type: integer
format: int64
duration_begin:
type: string
format: date-time
duration_end:
type: string
format: date-time
limit:
type: integer
format: int64
next:
type: string
offset:
type: integer
format: int64
period:
type: string
total_count:
type: integer
format: int64
truncated:
type: boolean
title: Paging
description: Paging defines paging object
example:
duration: 1
next: next
period: period
offset: 5
total_count: 2
count: 6
duration_end: '2000-01-23T04:56:07.000+00:00'
limit: 5
truncated: true
duration_begin: '2000-01-23T04:56:07.000+00:00'
VolumeUpdateReq:
type: object
required:
- block_volume
properties:
block_volume:
$ref: '#/definitions/VolumeUpdateReq_Volume'
title: VolumeUpdateReq
example:
block_volume:
flattened: true
performance_priority: 6
qos:
burst_total_iops: 2
max_total_iops: 9
burst_total_bw: 5
max_total_bw: 7
size: 1
block_snapshot_id: 0
name: name
action: action
description: description
qos_enabled: true
VolumeMigrateReq:
type: object
properties:
block_volume:
$ref: '#/definitions/VolumeMigrateReq_Volume'
title: VolumeMigrateReq
example:
block_volume:
dest_pool_id: 0
migration_stripes: 6
Snapshot_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
title: Snapshot_Nestview
example:
name: name
id: 0
VolumeSamplesResp:
type: object
required:
- block_volume_samples
properties:
block_volume_samples:
type: array
description: volume samples
items:
$ref: '#/definitions/VolumeStat'
title: VolumeSamplesResp
example:
block_volume_samples:
- migrate_write_iops: 1.1730742509559433
FailedTask:
abort: 7.061401241503109
busy: 9.301444243932576
check_cond: 3.616076749251911
resv_conflict: 2.027123023002322
total_bandwidth_kbyte: 1.284659006116532
write_latency_us: 5.944895607614016
total_iops: 2.8841621266687802
read_latency_us: 6.965117697638846
read_iops: 3.5571952270680973
migrate_write_latency_us: 4.965218492984954
non_io_task:
ats: 5.025004791520295
other: 9.965781217890562
write_same: 6.683562403749608
xcopy: 8.762042012749001
unmap: 9.369310271410669
io_size:
8_32kbyte: 1.4894159098541704
0_4kbyte: 4.145608029883936
32_64kbyte: 7.386281948385884
4_8kbyte: 1.2315135367772556
above_512kbyte: 6.84685269835264
64_512kbyte: 1.0246457001441578
read_bandwidth_kbyte: 6.438423552598547
write_bandwidth_kbyte: 6.778324963048013
migrate_write_bandwidth_kbyte: 7.457744773683766
create: '2000-01-23T04:56:07.000+00:00'
write_iops: 6.878052220127876
queue_depth: 9.018348186070783
- migrate_write_iops: 1.1730742509559433
FailedTask:
abort: 7.061401241503109
busy: 9.301444243932576
check_cond: 3.616076749251911
resv_conflict: 2.027123023002322
total_bandwidth_kbyte: 1.284659006116532
write_latency_us: 5.944895607614016
total_iops: 2.8841621266687802
read_latency_us: 6.965117697638846
read_iops: 3.5571952270680973
migrate_write_latency_us: 4.965218492984954
non_io_task:
ats: 5.025004791520295
other: 9.965781217890562
write_same: 6.683562403749608
xcopy: 8.762042012749001
unmap: 9.369310271410669
io_size:
8_32kbyte: 1.4894159098541704
0_4kbyte: 4.145608029883936
32_64kbyte: 7.386281948385884
4_8kbyte: 1.2315135367772556
above_512kbyte: 6.84685269835264
64_512kbyte: 1.0246457001441578
read_bandwidth_kbyte: 6.438423552598547
write_bandwidth_kbyte: 6.778324963048013
migrate_write_bandwidth_kbyte: 7.457744773683766
create: '2000-01-23T04:56:07.000+00:00'
write_iops: 6.878052220127876
queue_depth: 9.018348186070783
AccessPath_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
title: AccessPath_Nestview
example:
name: name
id: 0
VolumeBackupProtectionReq:
type: object
properties:
block_volume:
$ref: '#/definitions/VolumeBackupProtectionReq_Volume'
title: VolumeBackupProtectionReq
example:
block_volume:
dp_block_backup_policy_id: 0
VolumeResp:
type: object
required:
- block_volume
properties:
block_volume:
description: volume
$ref: '#/definitions/VolumeRecord'
title: VolumeResp
example:
block_volume: ''
VolumeSnapshotProtectionReq_Volume:
type: object
required:
- dp_block_snapshot_policy_id
properties:
dest_pool_id:
type: integer
format: int64
description: destination pool id
dest_volume_name:
type: string
description: destination volume name
dp_block_snapshot_policy_id:
type: integer
format: int64
description: policy
title: VolumeSnapshotProtectionReq_Volume
example:
dest_pool_id: 0
dest_volume_name: dest_volume_name
dp_block_snapshot_policy_id: 6
VolumesResp:
type: object
required:
- block_volumes
properties:
block_volumes:
type: array
description: volumes
items:
$ref: '#/definitions/VolumeRecord'
title: VolumesResp
example:
block_volumes:
- ''
- ''
VolumeCrcSetReq:
type: object
properties:
block_volume:
$ref: '#/definitions/VolumeCrcSetReq_Volume'
title: VolumeCrcSetReq
example:
block_volume:
crc_check: true
VolumeGroup_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
title: VolumeGroup_Nestview
example:
name: name
id: 6
VolumeIOSize:
type: object
properties:
0_4kbyte:
type: number
format: double
32_64kbyte:
type: number
format: double
4_8kbyte:
type: number
format: double
64_512kbyte:
type: number
format: double
8_32kbyte:
type: number
format: double
above_512kbyte:
type: number
format: double
title: VolumeIOSize
example:
8_32kbyte: 1.4894159098541704
0_4kbyte: 4.145608029883936
32_64kbyte: 7.386281948385884
4_8kbyte: 1.2315135367772556
above_512kbyte: 6.84685269835264
64_512kbyte: 1.0246457001441578
CloudPlatform_Nestview:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
type:
type: string
title: CloudPlatform_Nestview
example:
name: name
id: 6
type: type
Volume:
type: object
properties:
access_path:
$ref: '#/definitions/AccessPath_Nestview'
action_status:
type: string
allocated_size:
type: integer
format: int64
block_snapshot_num:
type: integer
format: int64
block_volume_group:
$ref: '#/definitions/VolumeGroup_Nestview'
client_group_num:
type: integer
format: int64
cloud_platform:
$ref: '#/definitions/CloudPlatform_Nestview'
crc_check:
type: boolean
create:
type: string
format: date-time
description:
type: string
dp_block_backup_policy_num:
type: integer
format: int64
dp_block_replication_policy:
$ref: '#/definitions/DpBlockReplicationPolicy_Nestview'
dp_block_snapshot_policy:
$ref: '#/definitions/DpBlockSnapshotPolicy_Nestview'
flattened:
type: boolean
format:
type: integer
format: int64
description: 128 or 129 (advanced)
hidden:
type: boolean
id:
type: integer
format: int64
image_id:
type: string
latest_snapshot_time:
type: string
format: date-time
migration_stripes:
type: integer
format: int64
name:
type: string
original_name:
type: string
original_volume_name:
type: string
passive:
type: boolean
performance_priority:
type: integer
format: int64
description: 0 or 1
pool:
$ref: '#/definitions/Pool_Nestview'
progress:
type: number
format: double
qos:
$ref: '#/definitions/VolumeQosSpec'
qos_enabled:
type: boolean
recycled:
type: boolean
description: trash
remote_cluster:
description: the volume is replicated from a remote cluster, via snapshot or IO
$ref: '#/definitions/RemoteCluster_Nestview'
replication_dest:
type: string
replication_pool:
type: string
replication_pool_id:
type: integer
format: int64
replication_pool_name:
type: string
replication_role:
type: string
replication_status:
type: string
replication_version:
type: integer
format: int64
replication_volume:
type: string
replication_volume_id:
type: integer
format: int64
replication_volume_name:
type: string
size:
type: integer
for
# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/xsky/refs/heads/main/openapi/xsky-block-volumes-api-openapi.yml