CloudStack4.2 二级镜像存储测试

时间:2023-03-08 16:17:57
//添加二级存储
{
"addimagestoreresponse": {
"imagestore": {
"id": "2dda4328-57b5-4901-a5d3-2430361fc90a",
"zoneid": "0589a7b6-29ea-489a-9331-7f7462bd5716",
"zonename": "zone",
"name": "testAdd",
"url": "nfs://192.168.153.34/aa/bb",
"protocol": "nfs",
"providername": "NFS",
"scope": "ZONE",
"details": []
}
}
}

测试URL

http://192.168.153.34:8080/client/api?
command=addImageStore
&response=json
&sessionkey=Y%2Bv%2FSnWyM9Wx1KjznDGYFhwkwdA%3D
&name=test&provider=NFS
&zoneid=0589a7b6-29ea-489a-9331-7f7462bd5716
&url=nfs%3A%2F%2F192.168.151.241%2Faa%2Fbb
&_=1389928586953

{
"listimagestoresresponse": {
"count": 1,
"imagestore": [{
"id": "c480ad54-ad75-4bd9-b0bb-ff7811d06699",
"zoneid": "0589a7b6-29ea-489a-9331-7f7462bd5716",
"zonename": "zone",
"name": "nfs-2",
"url": "nfs://192.168.154.2/export/secondary",
"protocol": "nfs",
"providername": "NFS",
"scope": "ZONE",
"details": []
}]
}
}

列出二级存储

http://192.168.153.34:8080/client/api?
command=listImageStores&response=json
&sessionkey=CTUQMUaaNLk2FECDfHMym6B%2FJYU%3D&
type=SecondaryStorage&page=1&pageSize=1&
listAll=true
&_=1389925616444

{
"deleteimagestoreresponse": {
"success": "true"
}
}

删除二级存储

http://192.168.153.34:8080/client/api?
command=deleteImageStore
&id=951eac9e-86cf-445f-ab9c-9ea827443b25
&response=json
&sessionkey=Y%2Bv%2FSnWyM9Wx1KjznDGYFhwkwdA%3D
&_=1389929059314