此操用來批量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
}
]
}
}