openstack cli curl 命令

如有错误欢迎指正,期待您的宝贵意见!

cli

nova flavor-create test 12 1024 10 1 --ephemeral 10

glance  image-create  --name test  --disk-format=iso  --container-format=bare  --is-public=True < /root/dev_env/cirros-0.3.0-x86_64-disk.img

powerkvm:

glance image-create --name=powerkvmppc64el  --property Hypervisor_type=kvm --property  architecture=ppc64  --disk-format=qcow2 --container-format=bare < /root/img/trusty-server-cloudimg-ppc64el-disk1.img


x86:
glance image-create --name=powerkvmppc64el  --property Hypervisor_type=kvm  --property  architecture=x86_64   --disk-format=qcow2 --container-format=bare < /root/img/trusty-server-cloudimg-ppc64el-disk1.img

neutron net-create   test1  --"provider:network_type"="vlan" --"provider:physical_network"="physnet1" --"provider:segmentation_id"=1
neutron subnet-create 787005a6-08f6-470c-8b9e-0d4fa60a94b4 172.24.23.0/24

nova  boot 212-two --flavor 6 --image d892728d-3652-49ca-a943-e8006b0cbbb2 --nic net-id=f4889f14-33ab-4345-b480-92db1d411a67 --nic net-id=e53a41bb-ef78-44dc-a1a6-7c5d881c0876  --user-data /root/img/pass.txt 

neutron net-create external-network --provider:network_type flat --provider:physical_network physnet2 --router:external
neutron subnet-create 440a5d64-41d7-4792-94b6-b6673e49a07a 172.24.23.0/24 --gateway 172.24.20.254  --disable-dhcp --allocation-pool start=172.24.20.83,end=172.24.20.88 --dns-nameserver 202.106.0.20


heat stack-create -f load-balance-powerkvm-count.yaml -P "vip_address=11.0.98.100" test 


curl

curl -i -k  'http://10.0.0.15:8774/v2.1/55651db2ba3549e2a4a5ce0fa93b23f9/servers' -X POST  -H "X-Auth-Project-Id: admin"  -H "Content-Type: application/json" -H 'X-Auth-Token:5019e8fe4a344cf68014c4ff9dad86ef' -d '{"server":{"flavor":{"OS-FLV-EXT-DATA:ephemeral":10,"disk":10,"extra_specs":{"powervm:proc_units":0.5},"ram":512,"vcpus":1},"imageRef":"025b03f4-4e65-4e5f-a20c-66b4818c923b","max_count":1,"name":"test-only","networkRef":"8dbc1cc0-1e58-4820-9561-bc7c07d8cd49","networks":[{"fixed_ip":"192.168.11.8","uuid":"8dbc1cc0-1e58-4820-9561-bc7c07d8cd49"}]}}'




你可能感兴趣的:(openstack)