1
0
mirror of https://github.com/gryf/mistral-evacuate.git synced 2026-02-07 08:45:48 +01:00
Files
mistral-evacuate/host-evacuate.yaml
Dawid Deja 06f5537d49 Add retry policy to workflow
Signed-off-by: Dawid Deja <dawid.deja@intel.com>
2016-02-19 14:45:25 +01:00

35 lines
978 B
YAML

---
version: '2.0'
host-evacuate:
description: Evacuate VMs from given host
type: direct
input:
- search_opts
- on_shared_storage
tasks:
list_vms:
action: nova.servers_list search_opts=<% $.search_opts %>
publish:
vms: <% $.list_vms %>
on-success: filter_vms
filter_vms:
with-items: vm in <% $.vms %>
action: custom.filter flavor=<% $.vm.flavor.id %> metadata=<% $.vm.metadata %> uuid=<% $.vm.id %>
publish:
filtered_vms: <% $.filter_vms %>
on-success: evacuate_vms
retry:
delay: 5
count: 10
evacuate_vms:
with-items: vm in <% $.filtered_vms %>
action: custom.evacuate uuid=<% $.vm.uuid %> evacuate=<% $.vm.evacuate %> on_shared_storage=<% $.on_shared_storage %>
retry:
delay: 5
count: 10