1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
| JSON post { "stack_name": "heat-local-test2", "disable_rollback": true, "parameters": { "image_id": "eef3ab2f-3c8f-4530-8806-15aa7603ba2f", "secgroup_id": "de99ad74-aa45-44fc-bee3-0f29c7005abb", "network_id": "92ef8068-46ba-4db7-b5d0-dcef1089efb2", "flavor_id": "ecs.small_L", "server_az": "nova", "num_resources": "3" }, "template": { "heat_template_version": "2013-05-23", "description": "Template for Create VM Volume,the Volume will be auto Attached by heat.", "parameters": { "num_resources": { "type": "number", "description": "Numbers of Resrouce", "default": 1, "constraints": [{ "range": { "min": 1, "max": 10 } }] }, "image_id": { "type": "string", "description": "ID of the image to use for the instance to be created.", "constraints": [{ "custom_constraint": "glance.image" }] }, "secgroup_id": { "type": "string", "description": "Id of the security groupe" }, "network_id": { "type": "string", "description": "network id" }, "flavor_id": { "type": "string", "description": "Flavor for the server to be created", "constraints": [{ "custom_constraint": "nova.flavor" }] }, "server_az": { "type": "string", "description": "Availablity Zone of the VM", "default": "nova" } }, "resources": { "resgroup": { "type": "OS::Heat::ResourceGroup", "properties": { "count": { "get_param": "num_resources" }, "resource_def": { "type": "file:///opt/kolla-ansible-deploy/openstack/qcloud/dev/bjyt_region_1/CREATE_VM_LOCAL_STORAGE.yaml", "properties": { "image_id": { "get_param": "image_id" }, "secgroup_id": { "get_param": "secgroup_id" }, "network_id": { "get_param": "network_id" }, "flavor_id": { "get_param": "flavor_id" }, "server_az": { "get_param": "server_az" } } } } } }, "outputs": { "myrefs": { "value": { "get_attr": ["resgroup", "refs"] } }, "server_ids": { "value": { "get_attr": ["resgroup", "server_id"] } }, "server_ips": { "value": { "get_attr": ["resgroup", "server_ip"] } }, "server_novnc_urls": { "value": { "get_attr": ["resgroup", "novnc_console_url"] } } } }, "files": { "file:///opt/kolla-ansible-deploy/openstack/dev/bjyt_region_1/CREATE_VM_LOCAL_STORAGE.yaml": "{\"heat_template_version\": \"2013-05-23\", \"description\": \"Template for Create VM\", \"parameters\": {\"image_id\": {\"type\": \"string\", \"description\": \"Image ID or image name to use for the server\", \"constraints\": [{\"custom_constraint\": \"glance.image\"}]}, \"secgroup_id\": {\"type\": \"string\", \"description\": \"Id of the security groupe\"}, \"network_id\": {\"type\": \"string\", \"description\": \"network id\"}, \"flavor_id\": {\"type\": \"string\", \"description\": \"Flavor for the server to be created\", \"constraints\": [{\"custom_constraint\": \"nova.flavor\"}]}, \"server_az\": {\"type\": \"string\", \"description\": \"Availablity zone of the VM\", \"default\": \"nova\"}}, \"resources\": {\"server\": {\"type\": \"OS::Nova::Server\", \"properties\": {\"availability_zone\": {\"get_param\": \"server_az\"}, \"image\": {\"get_param\": \"image_id\"}, \"flavor\": {\"get_param\": \"flavor_id\"}, \"networks\": [{\"network\": {\"get_param\": \"network_id\"}}], \"security_groups\": [{\"get_param\": \"secgroup_id\"}]}}}, \"outputs\": {\"server_id\": {\"value\": {\"get_resource\": \"server\"}}, \"server_ip\": {\"description\": \"Network IP address of server\", \"value\": {\"get_attr\": [\"server\", \"first_address\"]}}, \"novnc_console_url\": {\"value\": {\"get_attr\": [\"server\", \"console_urls\", \"novnc\"]}, \"description\": \"novnc console URLs for the server\"}}}" }, "environment": {} }
|