CURL list [ -------------------------------- ]
1, delete nova.network
curl -v -X DELETE -H 'X-Auth-Token: d7f3d029deb54a7fa354b3ded882150a' -H 'X-Tenant-Id: 842748637c7c419a9af9e787350aca6b' -H 'X-User-Id: ea15fa0ea7034fb89fa991585aca9325' -H "Content-type: application/json" http://0.0.0.0:8774/v2/842748637c7c419a9af9e787350aca6b/vpdc_networks/f35f6419-1a76-4b8a-b985-b2595b49338a | python -mjson.tool
2, create nova.network (vlan100 模式)
curl -v -X POST -H 'X-Auth-Token: d3ba55778f4745e4804c2e7689669d49' -H 'X-Tenant-Id: 842748637c7c419a9af9e787350aca6b' -H 'X-User-Id: e745ac0e1c594895991a34bc92c939fc' -H "Content-type: application/json" -d '{"network": {
"label": "lan",
"vlan": 100,
"dns1": "114.114.114.114",
"dns2": "8.8.8.8",
"vlan_start":100,
"security_lan_id":123,
"network_size":62,
"dhcp_enabled": true
}}' http://0.0.0.0:8774/v2/842748637c7c419a9af9e787350aca6b/***_networks
2, create nova.network (FlatDHCPManager 模式)
curl -v -X POST -H 'X-Auth-Token: 9fb501eee04842b3bc232bac65d20942' -H 'X-Tenant-Id: 842748637c7c419a9af9e787350aca6b' -H 'X-User-Id: e745ac0e1c594895991a34bc92c939fc' -H "Content-type: application/json" -d '{"network": {
"label": "lan",
"vlan": 100,
"dns1": "114.114.114.114",
"dns2": "8.8.8.8",
"security_lan_id":123,
"network_size":62,
"dhcp_enabled": true
}}' http://0.0.0.0:8774/v2/842748637c7c419a9af9e787350aca6b/***_networks
3, show nova.network
curl -v -X GET -H 'X-Auth-Token: d7f3d029deb54a7fa354b3ded882150a'
-H 'X-Tenant-Id: 842748637c7c419a9af9e787350aca6b'
-H 'X-User-Id: ea15fa0ea7034fb89fa991585aca9325'
-H "Content-type: application/json" http://0.0.0.0:8774/v2/842748637c7c419a9af9e787350aca6b/vpdc_networks/f35f6419-1a76-4b8a-b985-b2595b49338a | python -mjson.tool
4, history_monitor nova.api
curl -v -d '{historyControl: {hN:HSCloudNode001,
iT:cpu,sT:1377672552.412417,
eT:1377673544.507965}}'
-i http://127.0.0.1:8774/v2/842748637c7c419a9af9e787350aca6b/wqservers/1/action
-X POST -H X-Auth-Project-Id: 842748637c7c419a9af9e787350aca6b
-H Accept: application/json
-H X-Auth-Token: 6740bb82db184190b5b90ff0d23203b9
-H Content-Type: application/json
4, 获取token ID,
curl -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "admin"}}}' -H "Content-type: application/json" http://127.0.0.1:35357/v2.0/tokens | python -m json.tool
5, ioctl nova.compute
curl -v -d '{"ioControl": {"instance_name":"instance-0000000d","limit_size":"50MB"}}'
-i http://127.0.0.1:8774/v2/842748637c7c419a9af9e787350aca6b/servers/59d83dc5-3cfe-4488-b62e-1d338445457a/action
-X POST -H "X-Auth-Project-Id: 842748637c7c419a9af9e787350aca6b"
-H "Accept: application/json"
-H "X-Auth-Token: f406297155a24bffb9a52aa9da5b3e89"
-H "Content-Type: application/json"