此操用来批量QoS策略。
请求语法
GET /rest/v1/system/qos?filter=filter&range=i-j HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Host: ip:port
Authorization: authorization请求参数
| 参数 | 类型 | 描述 | 是否必须 |
|---|---|---|---|
| filter | String | 查询的过滤条件。可以选择多个查询,如果是或的关系,使用“or”将查询条件分隔开;如果是与的关系,使用“and”将查询条件分隔开。 支持的过滤条件类型包括:
| 否 |
| range | String | 查询QoS策略的范围,格式为i-j,i和j为正整数,0<j-i<1000。按照QoS策略名称进行排序,返回第i到第j的target。 如果输入的查询范围超过QoS策略的总个数,返回的结果为空,如果未指定range,则返回所有符合条件的QoS策略。 | 否 |
响应结果
表1 响应参数qosPolicy说明
| 名称 | 类型 | 描述 |
|---|---|---|
| qosName | String | QoS策略名称。 |
| IOPS | Long | 每秒能够进行读写操作次数的最大值。 说明 -1表示不限制。 |
| readIOPS | Long | 每秒能够进行读操作次数的最大值。 说明 -1表示不限制。 |
| writeIOPS | Long | 每秒能够进行写操作次数的最大值。 说明 -1表示不限制。 |
| Bps | Long | 每秒可传输数据量的最大值,单位是Bytes/s。 说明 -1表示不限制。 |
| readBps | Long | 读带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
| writeBps | Long | 写带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
| IOPSBurst | Long | 使用Burst功能时,每秒能够进行读写操作次数的最大值。 说明 -1表示不限制。 |
| readIOPSBurst | Long | 使用Burst功能时,每秒能够进行读操作次数的最大值。 说明 -1表示不限制。 |
| writeIOPSBurst | Long | 使用Burst功能时,每秒能够进行写操作次数的最大值。 说明 -1表示不限制。 |
| BpsBurst | Long | 使用Burst功能时,每秒可传输的数据量最大值,单位是Bytes/s。 说明 -1表示不限制。 |
| readBpsBurst | Long | 使用Burst功能时,读带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
| writeBpsBurst | Long | 使用Burst功能时,写带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
| IOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行读写操作所能持续的时间。单位是秒。 |
| readIOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行读操作所能持续的时间。单位是秒。 |
| writeIOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行写操作所能持续的时间。单位是秒。 |
| BpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的流量能力所能持续的时间。单位是秒。 |
| readBpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的读流量能力所能持续的时间。单位是秒。 |
| writeBpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的写流量能力所能持续的时间。单位是秒。 |
| createTime | Long | QoS策略创建的时间。 |
| reclaimPolicy | String | QoS策略的回收策略:
|
| description | String | QoS策略的描述信息。 |
请求示例
查询所有QoS策略。
GET /rest/v1/system/qos HTTP/1.1
Date: Thu, 03 Jul 2025 08:11:07 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.64:1443 响应示例
HTTP/1.1 200 OK
x-hblock-request-id: 81a1353ea5da4425b5e27a7d665651e3
Connection: keep-alive
Content-Length: 1586
Date: Thu, 03 Jul 2025 08:11:07 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"qosPolicies": [
{
"qosName": "QoS-test1",
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1751275484300,
"reclaimPolicy": "Retain",
"IOPS": 0,
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
},
{
"qosName": "QoS6",
"readIOPS": 5000000,
"writeIOPS": 6000000,
"readBps": 1073741824,
"writeBps": 1073741824,
"readIOPSBurst": 5000000,
"writeIOPSBurst": 5000000,
"readBpsBurst": 2147483648,
"writeBpsBurst": 2147483648,
"readIOPSBurstSecs": 10,
"writeIOPSBurstSecs": 10,
"readBpsBurstSecs": 100,
"writeBpsBurstSecs": 100,
"createTime": 1751437708609,
"reclaimPolicy": "Retain",
"description": "It is Qos6",
"IOPS": 5000000,
"Bps": 1073741824,
"IOPSBurst": 5000000,
"BpsBurst": 2147483648,
"IOPSBurstSecs": 10,
"BpsBurstSecs": 100
},
{
"qosName": "QosPolicy20250701103509",
"readIOPSBurst": 0,
"readIOPSBurstSecs": 120,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1751337350718,
"reclaimPolicy": "Retain",
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
},
{
"qosName": "qos11",
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1751443786042,
"reclaimPolicy": "Retain",
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
},
{
"qosName": "qostest2",
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1751342299027,
"reclaimPolicy": "Retain",
"Bps": 4398046511104,
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
},
{
"qosName": "qostest3",
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1751342317324,
"reclaimPolicy": "Retain",
"Bps": 5497558138880,
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
}
]
}
}