感謝朋友支持本博客。歡迎共同探討交流,由於能力和時間有限,錯誤之處在所不免。歡迎指正!python
若有轉載,請保留源做者博客信息。json
如需交流,歡迎你們博客留言。vim
不少其它詳情請查看文章:openstack_ice之wsgi具體解釋(paste從ini配置文件->routesr具體公佈流程)api
vim /usr/lib/python2.6/site-packages/nova/api/openstack/__init__.py
|
從新啓動openstack-nova-api服務bash
service openstack-nova-api restart
tailf /var/log/nova/api.log
|
vim /usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/os_networks.py
|
所以需要在url前面添加id字段屬性。restful
1:用dashboard經過novaclient組裝。(網絡的由neutronclient組裝,簡單起見,興許文章默認僅僅說起novaclient)
2:經過系統命令好比nova list產生。
3:經過curl本身組裝。
|
接下來具體介紹下假設經過curl調用已公佈的route,開發本身定義api。網絡
curl -i 'http://192.168.1.158:8774/v2/b077619bde964a4eb924db869fba977d/os-networks/test_collection' -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token:$token"
|
vim /usr/lib/python2.6/site-packages/nova/api/openstack/compute/contrib/os_networks.py
|
curl -i 'http://192.168.1.158:8774/v2/b077619bde964a4eb924db869fba977d/os-networks/test_collection' -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token:$token"
|