Skip to content

Missing functionality to create volume snapshots #23

Open
@onitake

Description

@onitake
SUMMARY

Migrated from: ansible/ansible#53264

There is currently no CloudStack module that can create volume snapshots.

The cs_volume module has a snapshot parameter, but apparently, it's only used to create a new volume from a snapshot.

I request a full-featured cs_volumesnapshot module that wraps the API calls:

  • createSnapshot
  • createSnapshotFromVMSnapshot
  • deleteSnapshot
  • listSnapshots
  • revertSnapshot

A separate cs_volumesnapshotpolicy module may also be useful, wrapping

  • createSnapshotPolicy
  • deleteSnapshotPolicies
  • listSnapshotPolicies
  • updateSnapshotPolicy
ISSUE TYPE
  • Feature Idea
COMPONENT NAME

lib/ansible/modules/cloud/cloudstack

ADDITIONAL INFORMATION

Example usage of the module would look like this:

- name: create volume snapshot
  cs_volumesnapshot:
    name: web-vm-1-volume-snapshot-1
    volume: web-vm-1-volume
  delegate_to: localhost

- name: create volume snapshot from VM snapshot
  cs_volumesnapshot:
    name: web-vm-1-volume-snapshot-1
    volume: web-vm-1-volume
    vmsnapshot: web-vm-1-snapshot-1
  delegate_to: localhost

- name: revert to volume snapshot
  cs_volumesnapshot:
    name: web-vm-1-volume-snapshot-1
    state: reverted
  delegate_to: localhost

- name: delete volume snapshot
  cs_volumesnapshot:
    name: web-vm-1-volume-snapshot-1
    state: absent
  delegate_to: localhost

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions