Skip to content

Commit

Permalink
Add create volume snapshot example
Browse files Browse the repository at this point in the history
  • Loading branch information
int32bit committed Apr 25, 2017
1 parent c263633 commit e71531f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/cinder/create_snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
version: "2.0"

create_volume_snapshot:
type: direct

input:
- volume_id
- snapshot_name

description: create a snapshot for a volume.

tasks:
create_snapshot:
description: create a snapshot for a volume
action: cinder.volume_snapshots_create volume_id=<% $.volume_id %> name=<% $.snapshot_name %>
publish:
snapshot_id: <% task(create_snapshot).result.id %>
on-success:
- wait_for_active

wait_for_active:
action: int32bit.cinder.snapshots.assert_status snapshot_id=<% $.snapshot_id %> status='available'
retry:
delay: 10
count: 30
File renamed without changes.

0 comments on commit e71531f

Please sign in to comment.