Files
mistral-extra/examples/create_vm/create_vm_example.yaml
Kirill Izotov 67185c62de Add vagrant environment with devstack and mistral
Also:
 - Fixed several typos

Change-Id: I23d187abf7a1984fc9021a34317852319d7e10a4
2014-07-01 17:51:51 +07:00

37 lines
1023 B
YAML

# This example requires the following properties provided in execution context:
# - nova_url ## url to Nova service, e.g. http://0.0.0.0:8774/v3
# - server_name ## Name of the new instance
# - image_id ## image id from Glance service
# - flavor_id ## flavor id - type of instance hardware
Namespaces:
Nova:
class: std.http
actions:
create-vm:
base-parameters:
url: '{$.nova_url}/{$.openstack.project_id}/servers'
method: POST
headers:
X-Auth-Token: $.openstack.auth_token
Content-Type: application/json
body:
server:
name: $.server_name
imageRef: $.image_id
flavorRef: $.flavor_id
output:
vm_id: $.content.server.id
Workflow:
tasks:
create-vm:
action: Nova.create-vm
parameters:
server_name: $.server_name
image_id: $.image_id
flavor_id: $.flavor_id
nova_url: $.nova_url
publish:
vm_id: $.vm_id