76 lines
1.7 KiB
YAML
76 lines
1.7 KiB
YAML
Service:
|
|
name: MyRest
|
|
type: REST_API
|
|
parameters:
|
|
baseUrl: http://some_host
|
|
actions:
|
|
create-vm:
|
|
parameters:
|
|
url: /service/action/execute
|
|
method: GET
|
|
task-parameters:
|
|
flavor_id:
|
|
optional: false
|
|
image_id:
|
|
optional: false
|
|
backup-vm:
|
|
parameters:
|
|
url: url_for_backup
|
|
method: GET
|
|
task-parameters:
|
|
server_id:
|
|
optional: false
|
|
attach-volume:
|
|
parameters:
|
|
url: url_for_attach
|
|
method: GET
|
|
task-parameters:
|
|
size:
|
|
optional: false
|
|
mnt_path:
|
|
optional: false
|
|
format-volume:
|
|
parameters:
|
|
url: url_for_format
|
|
method: GET
|
|
task-parameters:
|
|
volume_id:
|
|
optional: false
|
|
server_id:
|
|
optional: false
|
|
|
|
|
|
Workflow:
|
|
tasks:
|
|
create-vms:
|
|
action: MyRest:create-vm
|
|
parameters:
|
|
image_id: 1234
|
|
flavor_id: 42
|
|
|
|
attach-volumes:
|
|
action: Nova:attach-volume
|
|
parameters:
|
|
size:
|
|
optional: false
|
|
mnt_path:
|
|
optional: false
|
|
dependsOn: [create-vms]
|
|
format-volumes:
|
|
action: Nova:format-volume
|
|
parameters:
|
|
server_id:
|
|
optional: false
|
|
dependsOn: [attach-volumes]
|
|
backup-vms:
|
|
action: Nova:backup-vm
|
|
parameters:
|
|
server_id:
|
|
optional: false
|
|
dependsOn: [create-vms]
|
|
events:
|
|
create-vms:
|
|
type: periodic
|
|
tasks: create-vms
|
|
parameters:
|
|
cron-pattern: "* * * * *" |