Openstack api挂载cinder

挂载cinder

import requests
import json

headers={}
headers['Content-Type']='application/json'
headers['X-Auth-Token']=''

body={
    'os-attach':{
        'instance_uuid':'0a3e7257-3752-422d-b219-ef2ee7c8bd2a',
        'mountpoint':'/dev/vdb'
    }
}

a=requests.post(url='http://172.129.33.11:8776/v3/d01c7adaf105421d927f57f3fcac3e7c/volumes/4b78cd7f-ebae-4bcb-8691-5836ecb3d871/action',data=json.dumps(body),headers=headers)
print(a.text)

**/v3/ {project_id} /volumes/ {volume_id} /action
扩展卷大小

 

posted @ 2021-12-15 15:56  衡衡酱  阅读(2)  评论(0)    收藏  举报
Live2D